Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
If an interrupt occurs then what code it will execute?
Where can I write the code for the interrupt?
Will I use it like I use a CALL command, like this:
Then interrupt vector is adress 0x0004. So when interrupt occurs the pic will jump to this adress. You can force code to this adress with the org command
ORG 0x0004
;context saving
;Your interrupt code
;context restoring
RETFIE
As a result your program entry (the program start, at adress 0) should contain a jump over the interrupt vector within the first 4 instructions
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.