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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/21/01 22:44
Read: times


 
#10251 - RE: Software Interrupt instruction?
Hi Erik,

this method was also often used on the 8051.
E.g. I use T0 in mode 3, which give me interrupts every 256 cycle for my RTC routine. And some times there was a lot to do inside this interrupt (calculation next day, month, year, compare several alarm times).

Solution: Only the prescaler stages down to 1 second done on interrupt level. Then a call to a RETI instruction was done. After this all following code was executed on subroutine level and finished by a simple RET. During this, other interrupts and also the timer itself can be entered again.

INT_T0:
; do critical
call INT_RETI
; now do all others on subroutine level
ret ;return to main

INT_RETI:
reti ;leave interrupt level


Peter


List of 10 messages in thread
TopicAuthorDate
Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      
RE: Software Interrupt instruction?            01/01/70 00:00      

Back to Subject List