One of the primary tasks of embedded applications is communicating with external hardware peripherals. Sending data to peripherals using the output port is easy to understand. When it comes to reading, though, things become more complicated.
Embedded developers have to know when data is available to be read. Since the peripheral is external to the processor, this can happen at any moment in time.
In this chapter, we will learn about what interrupts are and how to work with them. While using an 8-bit microcontroller, 8051, as a target platform, we will learn about the following topics:
- How to implement a basic interrupt handling
- How to generate a signal on the output pin of the Microcontroller Unit (MCU) using interrupts from the timer
- How to use interrupts to count events on the external pins of the MCU
- How to use interrupts to communicate over the...