Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/17/00 18:34
Read: times


 
#1871 - RE: Interrup Setup and Debuge
Robert,
In your code you will be caught in a loop forever. You have a JNB TFO,$ inside your interrupt routine. Remember the timer interrupt flag is cleared when you vector to the interrupt routine automatically and the interrupt will not interrupt itself (non-recursive). Once you have entered this interrupt you are stuck there.
Try this:
Set your timer interrupt to interrupt every 5ms. In the main part of your code you would have something like
main: ;just a label

jnb my_interrupt_went_off_flag,main ;I like long variable names

;here you do whatever it is you want to do every 5ms and end with
clr my_interrupt_went_off_flag
jmp main

In the interrupt routine you set
my_interrupt_went_off_flag

Remeber to keep interrupt routines short and simple. Handle the chores in main.
Allen


List of 3 messages in thread
TopicAuthorDate
Interrup Setup and Debuge            01/01/70 00:00      
RE: Interrup Setup and Debuge            01/01/70 00:00      
RE: Interrup Setup and Debuge            01/01/70 00:00      

Back to Subject List