Interrupt Sources

After initialization, only the monitoring of the input buttons is performed in the main loop. Other processes and functions are either performed by the CIPs or triggered by interrupt resources. When a certain condition is met, an interrupt flag is set and its corresponding Interrupt Service Routine is performed. Figure 6-3 shows how these routines are executed.
Figure 1. ISR Flowchart

All peripherals used in the firmware are configured using MPLAB® Code Configurator (MCC). For the step-by-step procedure of how all peripherals are configured, refer to Appendix B: MPLAB Code Configurator (MCC) Peripheral Configuration.