| 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
MARCHING ledS - mrdeb Thursday, 11 March 2010 10:48 - [2 replies]
REALISTIC LED candle flicker - mrdeb Wednesday, 10 March 2010 05:48 - [0 replies]
the LCD demo hello world - mrdeb Wednesday, 10 March 2010 05:41 - [29 replies]
USB problem - jon chandler Tuesday, 09 March 2010 11:31 - [3 replies]
Servo Module - andyo Tuesday, 09 March 2010 03:39 - [3 replies]
pic to ps2 communication - roshan Friday, 05 March 2010 01:30 - [7 replies]
Way Off Topic: Worldwide Ignite Week - jon chandler Wednesday, 03 March 2010 20:33 - [4 replies]



If this wasn't a class project that had to be done on a PIC16F690 u...
I am going to send two data from ADC to USART(async mode) to serial...
I was thinking of battery with powered routers or powered for every...
50 rooms - wow. The XBee modules are very easy to use but I'm not ...
Thanks AndyO. What I have to do is design a device to monitor temp...
The circuit used for the remote sensor can be found here: [url]http...
plz i need help do u know from where i could download it or how cou...
hello everyone i'm trying to finish my final project and i want to ...