| Swordfish Code Snippet - Interrupt Priority |
|
|
| Saturday, 04 April 2009 10:24 | |
|
Swordfish will also handle the priority of your Interrupt Service Routines (ISR's). 18F PIC's support twp different Interrupt priority routines. These are known as High and Low Interrupts.
Const ipLow = 1, ipHigh = 2 Interrupt OnTimer1(ipLow) // code statements here End Interrupt Interrupt OnTimer3(ipHigh) // code statements here End Interrupt
Notice that a value of 2 gives a higher priority to OnTimer3. Now if a OnTimer3 interrupt occurs during OnTimer1 interrupt, then the program will stop what it is doing, and go directly to the OnTimer3 handle. When it has finished, it will return to OnTimer1, and continue like nothing happened. Handy.
|
|
| Last Updated ( Tuesday, 14 April 2009 10:09 ) |
Whos Online
- Jon Chandler
- MrDEB
Forum Activity
LCD / 18F1320 - mrdeb Friday, 19 March 2010 07:19 - [0 replies]
A 'throw-away" PIC board - mrdeb Thursday, 18 March 2010 06:19 - [32 replies]
Credit Where Credit's Due - jon chandler Tuesday, 16 March 2010 12:01 - [9 replies]
Marching LEDs - mrdeb Saturday, 13 March 2010 22:54 - [7 replies]
USB 8 Channel Servo Controller - andyo Saturday, 13 March 2010 01:19 - [2 replies]
Dedicated Servo Controller - graham Friday, 12 March 2010 17:58 - [0 replies]
Must have....delta temperature glowies! - graham Friday, 12 March 2010 17:31 - [3 replies]



Graham, Thanks for fixing the spacing on the array. This is how i...
Thanks Graham, It is a problem with Flowcode because the demo wa...
Looks like you've pretty much solved every minor issue that was enc...
The low-cost servo does have one other feature. The origina...
I am not familiar with flowcode, though did you try powering the bo...
Hello there, I am still trying to get the LCD to work but I am pro...
Hi Hop, I've finally got some time this weekend to delve into the ...
Very nice - 900,000 packets and 0 errors - can't ask for better tha...