Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   RTI, TOI and TOC programming (http://www.go4expert.com/forums/rti-toi-toc-programming-t14762/)

infinitig35 24Oct2008 19:39

RTI, TOI and TOC programming
 
Hello everyone. I have a homework problem that I'm stuck at, can someone give me a hint on how to proceed with this. Here's the problem:
Write a program that uses both an RTI (Real Time Interrupt) and an TOI (Timer Overflow Interrupt) or a TOC (Timer Output Square). Have each of the interrupts do something different.

thanks

xpi0t0s 25Oct2008 04:24

Re: RTI, TOI and TOC programming
 
This will depend very much on what the last few weeks' course content. These questions are not generic; they are very specific, so any answers will be completely useless unless we just happen to guess precisely what kind of hardware you're using.

Do you understand the question? Whatever hardware you're using that will be the first step. If you don't, then either there's been no info on it in the course so far, in which case why is the teacher asking you, or you haven't been paying attention.

infinitig35 27Oct2008 16:37

Re: RTI, TOI and TOC programming
 
I'm using the Motorolla M68HC11.

infinitig35 11Nov2008 19:00

Re: RTI, TOI and TOC programming
 
Where are the experts at??

xpi0t0s 11Nov2008 19:46

Re: RTI, TOI and TOC programming
 
Where they always were. We don't have details on your hardware (which is more than just the chip - what is the development kit you're using?) so there's nowt we can do, unless one of us by pure chance just happens to have exactly the same as wot you've got on your desk.

Where exactly are you stuck? Do you understand the assignment? Di you understand the concepts (which should have been explained in the course)? Have you designed the program yet? Have you started coding and hit a problem? Are the interrupts being generated correctly? How exactly are they being generated; what external hardware causes an interrupt?

Generally interrupt processing goes along the lines of "ok, we got an interrupt, so disable interrupts to stop us disappearing up our own backside, and look to see what interrupted us. Then set a flag for the main program to pick up on the fact that an interrupt happened, re-enable interrupts and exit as quickly as possible."
The main program needs to setup the interrupts of course, by setting the appropriate interrupt registers, and by checking periodically for whether or not any interrupt has occurred. If you know for certain that interrupts aren't that frequent, you MAY be able to do some limited processing within the interrupt routine, but generally you need to exit as quickly as possible because normally you don't know when the next interrupt will be.

shabbir 11Nov2008 20:47

Re: RTI, TOI and TOC programming
 
Quote:

Originally Posted by xpi0t0s (Post 38779)
Where they always were.

Well said.


All times are GMT +5.5. The time now is 21:00.