EasyManuals Logo

Texas Instruments MSP430 User Manual

Texas Instruments MSP430
413 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 #97 background imageLoading...
Page #97 background image
97
/*
* TA0CTL, Timer_A3 Control Register
*
* TASSEL_2 -- SMCLK
* ID_3 -- Divider - /8
* MC_2 -- Continuous Mode
*/
TA0CTL = TASSEL_2 | ID_3 | MC_2;
We want to blink the Launchpad board’s LEDs at the rate of 250 milliseconds. Thus, we need to check
or compare if the counter register TA0R has gone past 50% of the full scale 16-bit value. This is an
event marker because with reference to this mark, we toggle the states of the LEDs. The idea shown
here is actually the concept with which PWMs are generated by compare-match principle inside timer
hardware and so it is worth understanding this idea.
if(TA0R >= 32768)
{
P1OUT |= BIT6;
P1OUT &= ~BIT0;
}
else
{
P1OUT |= BIT0;
P1OUT &= ~BIT6;
}

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