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 #292 background imageLoading...
Page #292 background image
(Extra Credit) Lab 6b Timer using Up Mode
3. Modify your previous code. We need to clear both interrupts and start the timer.
We copied the code from the previous lab into this question. It needs to be modified to meet
our new objectives for this lab.
Here are some hints:
Add an extra line of code to clear the CCR0 flag (we left a blank space below for this)
Don’t make the mistake we made … look very carefully at the ‘start’ function. Is there
anything that needs to change in that function call?
// Clear the timer flag and start the timer
TIMER_A_clearTimerInterruptFlag( TIMER_A0_BASE ); // Clear TA0IFG
________________________________________________________________________
TIMER_A_startCounter( TIMER_A0_BASE, // Start timer
TIMER_A_CONTINUOUS_MODE ); // in ____________ mode
4. Add a new ISR to toggle the Red LED when the CCR0 interrupt fires.
On your Launchpad, what Port/Pin number does the Red LED use? ______________
Here we’ve given you a bit of code to get you started:
#pragma vector= _________________________________
__interrupt void ccr0_ISR (void)
{
// Toggle the Red LED on/off
_______________________________________________________________
}
Please verify your answers before moving onto the lab exercise.
6 - 46 MSP430 Workshop - Timers

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