ABSTRACT

This chapter describes the interrupts and interrupts systems in microcontrollers. It describes basic concepts such as the possible sources for interrupts, the resources that the microcontroller needs for handling them, and how interrupts are serviced. The chapter discusses the interrupts in medium-end programmable integrated circuit (PIC) microcontrollers with a special emphasis on the interrupt service subroutines. It examines several applications in PIC microcontrollers that use interrupts. An interrupt request is an internal or external event that when serviced makes the microcontroller interrupt the execution of the current program and execute another program instead. Microcontrollers have one bit for global control of interrupts. This bit allows or disallows any interrupt request to reach the central processing unit. Servicing an interrupt request means to interrupt the execution of the current program and to move it to execute another program. When the second program ends, it is necessary to continue with the program that was interrupted.