EasyManua.ls Logo

Texas Instruments MSP430

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 6c Timer using Up Mode
Change the Timer Setup Code
6. Modify the timer configuration function, we are still using ‘Up’ mode, but not using one
of the interrupts anymore.
Please refer to the Lab Worksheet for assistance. (Step 4, Page 6-52).
7. Add a call to the TIMER_A function that configures CCR2.
Please refer to the Lab Worksheet for assistance. (Step 6, Page 6-53).
8. Delete or comment out the call to clear the CCR0IFG flag.
We won’t need this because the timer will drive the LED directly that is, not interrupt is
required where we need to toggle the GPIO with a function call.
TIMER_A_clearCaptureCompareInterruptFlag( TIMER_A0_BASE,
TIMER_A_CAPTURECOMPARE_REGISTER_0 //Clear CCR0IFG
);
Then again, it doesn’t hurt anything if you leave it in the code… so an unused bit gets
cleared.
9. Make the minor modification to the timer0_isr() as shown in the worksheet.
Please refer to the Lab Worksheet for assistance. (Step 7, Page 6-53).
10. Build the code verifying there are no syntax errors; fix any as needed.
MSP430 Workshop - Timers 6 - 55

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals