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 #293 background imageLoading...
Page #293 background image
(Extra Credit) Lab 6b Timer using Up Mode
File Management
1. Copy/Paste the lab_06a_timer to lab_06b_upTimer.
a) In Project Explorer, right-click on the lab_06a_timer project and select “Copy”.
b) Then, click in an open area of Project Explorer and select paste.
c) Finally, rename the copied project to lab_06b_upTimer.
Note: If you didn’t complete lab_06a_timeror you just want a clean starting solution
you can import the lab_06a_timer archived solution.
2. Close the previous project: lab_06a_timer
3. Delete old, readme file and import the new one.
C:\msp430_workshop\<target>\lab_06b_upTimer
4. Make sure both LED’s are configured.
We only used one in the last lab; make sure that both still are setup in the code, as we’ll be
using both of them in this exercise.
5. Build the project to verify no errors were introduced.
Change the Timer Setup Code
In this part of Lab 6, we will be setting up TimerA0 in Up Mode.
6. Modify the timer configuration function, configuring it for ‘Up’ mode.
You should have a completed copy of this code in the Lab 6b Worksheet.
Please refer to the Lab Worksheet for assistance. (Step 2, Page 6-45).
7. Modify the rest of the timer setup code, where we clear the interrupt flags, enable the
individual interrupts and start the timer.
Please refer to the Lab Worksheet for assistance. (Step 3, Page 6-46).
8. Add the new ISR we wrote in the Lab Worksheet to handle the CCR0 interrupt.
When this step is complete, you should have two ISR’s in your main.c file.
Please refer to the Lab Worksheet for assistance. (Step 4, Page 6-46).
9. Don’t forget to modify the “unused” vectors (unused_interrupts.c).
Failing to do this will generate a build error. (Most of us saw this error back during the lab
exercise for the Interrupts chapter.)
10. Build the code to verify that there are no syntax errors; fix any as needed.
MSP430 Workshop - Timers 6 - 47

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