Interrupts
Introduction
What is an embedded system without interrupts?
If you just needed to solve a math problem you would most likely sit down and use a desktop
computer. Embedded systems, on the other hand, take inputs from real-world events and then
act upon them. These real-world events usually translate into ‘interrupts’ – asynchronous signals
provided to the microcontroller: timers, serial ports, pushbuttons … and so on.
This chapter discusses how interrupts work; how they are implemented on the MSP430 MCU, and
what code we need to write in order to harness their functionality. The lab exercises provided are
relatively simple (using a pushbutton to generate an interrupt), but the skills we learn here will
apply to all the remaining chapters of this workshop.
Learning Objectives
Objectives
- Explain the difference between Polling &
Interrupts
- List the 4 items that are part of the MSP430’s
interrupt processing flow
-
Find the interrupt vector documentation
- Describe the difference between a dedicated and
grouped interrupt
- Write a function to enable interrupts
- Write two ISR functions (one for dedicated, the
other for grouped interrupts)
MSP430 Workshop - Interrupts 5 - 1