??? 08/13/05 14:14 Read: times |
#99337 - Routine Responding to: ???'s previous message |
I'm not giving you the routine, try to write it yourself, than if needed come back for help. Some more explanation: When your processor gets an interrupt it will push the address to the next instruction that is going to be executed on the stack. After that it goes to the address for that interrupt and executes the routine you have placed there. When you come to the RETI it gets the address from the stack, restores the interrupt logic and continues where it left off. You don't need to know where that was to do the pop/push of addresses. If you don't know how to do it READ, you can easily get into hard_to_solve problems if you don't know what you are doing.
You can also search in the code library if someone has posted a routine you can use as a template. Good reading is "the bible" Chapter 1 - 80C51 Family Architecture: http://www.semiconductors.philips.com/acrobat/v...ARCH_1.pdf Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set: http://www.semiconductors.philips.com/acrobat/v...UIDE_1.pdf Chapter 3 - 80C51 Family Hardware Description: http://www.semiconductors.philips.com/acrobat/v...WARE_1.pdf Anders |