© Armstrong Subero 2018
Armstrong SuberoProgramming PIC Microcontrollers with XC8https://doi.org/10.1007/978-1-4842-3273-6_8

8. Interrupts, Timers, Counters, and PWM

Armstrong Subero
(1)
Moruga, Trinidad and Tobago
 

Introduction to Interrupts

Interrupts are one of the simplest concepts related to microcontrollers. Let me explain interrupts as simply as possible by referring to everyday life. Imagine that you need to wake up at 6:00 am. There are two ways to know when you have to wake up. One way is to keep checking the clock until it’s 6:00. However, if you do that, then you will not be able to focus on the task at hand, which is getting sleep. The other thing you can do is set your clock to alarm to alert you that it’s 6:00. In both scenarios, ...

Get Programming PIC Microcontrollers with XC8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.