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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/17/08 06:43
Read: times


 
#153587 - Actually
Responding to: ???'s previous message
Aravinda Abeygunawardane said:
if you want to exit from interrupt 1 routine you have to use RETI instruction in that routine not on the INT 0 routine.

Actually both the INT0 and the INT1 routines need to end with a RETI.

In fact, every Interrupt Service Routine (ISR) needs to end with a RETI - as that's what clears the hardware's interrupt state!

80C51 family programmer’s guide and instruction set manual said:
RETI
Function:
Return from interrupt
Description: RETI pops the high- and low-order bytes of the PC successively from the stack, and restores the interrupt logic to accept additional interrupts...


It's all in the so-called "bible" for the 8051:

Chapter 1 - 80C51 Family Architecture:
http://www.nxp.com/acrobat_d...ARCH_1.pdf

Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set:
http://www.nxp.com/acrobat_d...UIDE_1.pdf

Chapter 3 - 80C51 Family Hardware Description:
http://www.nxp.com/acrobat_d...WARE_1.pdf



Here are some other introductory & reference materials:
http://www.keil.com/books/8051books.asp
http://www.8052.com/books.phtml
http://www.8052.com/tutorial.phtml


List of 7 messages in thread
TopicAuthorDate
Problems in interrupts            01/01/70 00:00      
   Need more information            01/01/70 00:00      
   questions            01/01/70 00:00      
   this may be the clue            01/01/70 00:00      
      Actually            01/01/70 00:00      
         Somewhat OT, but what the minimum debounce time            01/01/70 00:00      
            Depends on the switch - not the micro            01/01/70 00:00      

Back to Subject List