EasyManuals Logo

Texas Instruments MSP430 Student Guide

Texas Instruments MSP430
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #241 background imageLoading...
Page #241 background image
Lab 5 Interrupts
(Optional) Lab 5b Can You Make a Watchdog Blink?
The goal of this lab is to blink the LED. Rather than using a _delay_cycles() function, we’ll
actually use a timer to tell us when to toggle the LED.
In Lab 4 we used the Watchdog timer as a … well, a watchdog timer. In all other exercises, thus
far, we just turned it off with WDT_A_hold().
In this lab exercise, we’re going to use it as a standard timer (called ‘interval’ timer) to generate a
periodic interrupt. In the interrupt service routine, we’ll toggle the LED.
As we write the ISR code, you may notice that the Watchdog Interval Timer interrupt has a
dedicated interrupt vector. (Whereas the GPIO Port interrupt had 8 interrupts that shared one
vector.)
Import and Explore the WDT_A Interval Timer Example
1. Import the wdt_a_ex2_intervalACLK project from the MSP430 DriverLib examples.
We’re going to “cheat” and use the example provided with MSP430ware to get the WDT_A
timer up and running.
There are two different ways we can import the example project:
Use the ProjectImport Existing CCS Eclipse Project (as we’ve done before)
Utilize the TI Resource Explorer (as we did to import our ‘Empty Project’ in Lab3)
a) Open the TI Resource Explorer window, if it’s not already open
Help Welcome to CCS
Hint: If you don’t see a listing of resource in the window, click the Home button.
b) Locate the wdt_a_ex2_intervalACLK
example.
Look for it as shown here under:
Example Projects WDT_A
If you’re using the FR5969, follow
the same path starting from the
MSP430FR5xx6xx heading.
MSP430 Workshop - Interrupts 5 - 51

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals