Handling Interrupts

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:

We will learn about these topics by completing the following recipes:

Understanding the core concepts of how to handle interrupts will help you implement responsive and power-efficient embedded applications.

Before we do this, however, we'll acquire some background knowledge of a few concepts.