More about PIC
Timer 0
• The PIC 18 has two to five timers (depends on family)
• They can be used as
• Timer  to generate time delay
• Counters  count event happening outside the
microcontroller.
Timer 0
Timer 0
Timer 0
Timer 0
Timer 0
Timer 0
Timer 0
Timer 1
Timer 1
Timer 1
Timer 0 and 1 in C
Timer 0 and 1 in C
Timer 0 and 1 in C
Interrupt Programming
• Interrupt
• The program associated with interrupt is called the interrupt service routine
(ISR) or interrupt handler.
• Polling
• The microcontroller continuously monitors the status of a given device.
• Round-robin fashion (no priorities).
Interrupt service routine
• Upon activation of an interrupt,
Interrupt vector table (PIC18)
Simplified view of interrupts
INTCON (interrupt control) register
Summary

Lecture 07 more about pic