EasyManua.ls Logo

Texas Instruments MSP430 - Page 291

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
Loading...
(Extra Credit) Lab 6b Timer using Up Mode
2. Complete the TIMER_A_configureUpMode() function?
This function will replace the TIMER_A_configureContinuousMode() call we made in our
previous lab exercise.
Hint: Where to get help for writing this function? Once again, we recommend the
MSP430ware DriverLib users guide (“docs” folder inside MPS430ware’s DriverLib).
Another suggestion would be to examine the timer_a.h header file.
TIMER_A_configureUpMode(
TIMER_A0_BASE, // Setup Timer A0
TIMER_A_CLOCKSOURCE_ACLK,
// Timer clock source
TIMER_A_CLOCKSOURCE_DIVIDER_1, // Timer clock divider
_______________________________________, // Period (calculated in previous question)
TIMER_A_TAIE_INTERRUPT_ENABLE, // Enable interrupt on TAR counter rollover
_______________________________________,
// Enable CCR0 compare interrupt
TIMER_A_DO_CLEAR // Clear TAR & previous divider state
);
MSP430 Workshop - Timers 6 - 45

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals