PIC INT 2 Techniques: Int & Polling
Comparing Interruptions & Polling Techniques
2 interruptions & 1 pulling (High and low priorities setups);
By enable High Prior Interruption (TMR4), an LED (connected to PORTD.RD4) will toggle every 200 ms, while, to comparative purpose, by using polling technique, another LED (connected to PORTD.RD4) will toggle every 1s, and again, by enabling Low Prior Interruption (TMR5), an LED (connected to PORTD.RD5) will toggle every 1000 ms (1000ms/200ms => scaled 5:1)
The result, LEDs on RD4 and RD5, will consume interruptions, so its LEDs are
perfectly synchronized (well, not actually…), which is not the case with
the LED RD1 using pulling :/ that will depend on the main routine.
See Preview project too :D; See Calculation memory below:)
That’s it!
In the next episode let’s program ADC interruptions.
See you soon!
Bye!
Related Posts
01º Episode — INT — PIC Unit #05 — The Hello World for Interruptions
02º Episode — INT — PIC Unit #05 — The Hello World for Interruptions