Interrupts in PIC18Fxxx Microcontroller

Updated on 2017/09/27 10:58

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)

legacy-mode-interrupts-pic18.png

Interrupt Logic (Priority Mode)

Interrupts-PIC18-Priority-mode.png

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…

References

  • WikiNote Foundation
Tags:
Created by Sujit Wagh on 2017/09/24 17:48
Translated into en by Sujit Wagh on 2017/09/24 17:55