Chapter 4 e
Chapter 4 e
INTERRUPT PROGRAMMING IN C
At the end of the chapter, student should be able to;
-Know about Interrupts in the PIC and apply C
program to interface PIC with external devices using
interrupts.
Interrupt vs Polling
• A single microcontroller can serve several
devices.
• There are 2 methods for a device to
receive service from microcontroller:
– Interrupt
– Polling
Polling
while(1) {
}
}
while(1) {
}}
while(1) {
T0Delay ( ); }
}
void T0Delay ( ){
T0CON = 0x07;
TMR0H = 0xF0;
TMR0L = 0x00;
}
while(1) {
}
}