Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

PIC Interrupt

Programming in C
By,
M. Zuhair Arfeen
Interrupt vs polling
Interrupt service routine (ISR)
Sources of Interrupt
There are many sources of interrupt in PIC18,
depending upon which peripheral is incorporating into
the chip.
1. There is an interrupt set aside for each timer. Timers 0,
1, 2.
2. Three interrupts are set aside for external hardware
interrupts. Pin RBO (PortB.O), RB1, RB2 are used for
external interrupts INTO, INT1 and INT2 respectively.
3. Serial port has two interrupts, one for receive and
another for transmit.
… contd
The ADC (analog to digital converter) interrupt.
The CCP (compare capture pulse width modulation)
interrupt.
INTCON (interrupt control) register
Programming the serial communication
interrupts

You might also like