Lab 5 – Interrupts
Lab 5 Worksheet
General Interrupt Questions
1. When your program is not in an interrupt service routine, what code is it usually executing?
And, what ‘name’ do we give this code?
_________________________________________________________________________
2. Why keep ISR’s short (i.e. Why shouldn’t you do a lot of processing in them)?
_________________________________________________________________________
__________________________________________________________________________
3. What causes the MSP430 to exit a Low Power Mode (LPMx)?
_________________________________________________________________________
4. Why are interrupts generally preferred over polling?
__________________________________________________________________________
__________________________________________________________________________
Interrupt Flow
5. Name 4 sources of interrupts? (Well, we gave you one, so name 3 more.)
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
6. What signifies that an interrupt has occurred?
A __________ bit is set
What’s the acronym for these types of ‘bits” ___________
7. Write the code to enable a GPIO interrupt on Port 1, pin1 (aka P1.1)?
___________________________________ // setup pin as input
___________________________________ // clear individual flag
___________________________________ // enable individual interrupt
Timer_A
MSP430 Workshop - Interrupts 5 - 39