View previous topic :: View next topic |
Author |
Message |
Bobhjr
Joined: 18 Oct 2007 Posts: 2
|
PIC18F Separate high and low priority interrupts |
Posted: Thu Oct 18, 2007 9:56 am |
|
|
By using the #build(interrupt=NEWADDRESS) the interrupt dispatcher is located at NEWADDRESS.
I am using the High and Low priority interrupts.
How can I force the compiler to separate the high priority interrupt dispatcher to one Vector and the low priority interrupt dispatcher to a different vector? |
|
|
Ttelmah Guest
|
|
Posted: Thu Oct 18, 2007 3:03 pm |
|
|
It does already. The low priority dispatcher is always put 0x10 addresses higher than the high priority one. So, if the 'FAST', or 'HIGH' keywords are used, normally the high priority goes at address 8, and the low priority dispatcher at address 0x18. If you use the build statement, it sets the address of the high priority dispatcher, and the low priority one is automatically placed 0x10 locations higher (as required by the hardware).
Best Wishes |
|
|
Bobhjr
Joined: 18 Oct 2007 Posts: 2
|
|
Posted: Fri Oct 19, 2007 5:57 am |
|
|
Thanks for the input, I understand what you are saying.
Using #build it groups the two dispatchers together, but I want to separate them.
For example, I want to place the High Priority dispatcher at address 0x0020 and the Low Priority dispatcher at address 0x1000.
From there I could put a “goto 0x0020” at address 0x0008 to redirect the high priority hardware interrupt to the high priority dispatcher.
From there I could put a “goto 0x1000” at address 0x0018 to redirect the low priority hardware interrupt to the high priority dispatcher. |
|
|
|