Interrupts in PIC18Fxxx Microcontroller

Interrupts in PIC18Fxxx Microcontroller

Definition:-Interrupts are events that cause your program to stop what it is doing in order to run an Interrupt Service Routine which will handle the event by taking whatever action is required before finally returning control to your main program.

PIC18 has two vectors: High and Low

  • Interrupts require special functions to service the events that cause them:
  • ISRs must not have any parameters
  • ISRs must not be called by the main code
  • ISRs should not call other functions

Interrupt Logic (Legacy Mode)


Interrupt Logic (Priority Mode)


Fig.Interrupts in PIC18F(Priority mode) 

PIC18 Interrupt Sources

Interrupt Sources

  • 3 or 4 External Interrupts (INT0-INT3)
  • Edge Triggered
  • Rising or Falling selected in INTCON2 register
  • PORTB Interrupt on Change (RB4-RB7)
  • Timer Rollover/Overflow Events
  • Comparator Output Change
  • A/D Conversion Complete
  • Communication Channel Events
  • Other Peripheral Events…


  • WikiNote Foundation

Last modified: Monday, 16 September 2019, 4:41 PM