Question: a) Using the continuous mode... Write a C code that runs on the LaunchPad and uses Timer_A in the continuous mode. Run the timer from

a) Using the continuous mode... Write a C code that runs on the LaunchPad and uses Timer_A in the continuous mode. Run the timer

from ACLK and set it to the 12 KHz VLO (see highlighted code below). Within the timer, adjust the

clock signal so that is becomes 6,000 Hz. Each time TAR rolls back to zero, toggle the red LED, which is mapped to Port 1.0 and is active high. What is the duration generated by the timer?

Before writing the code, fill the configuration below by looking at the help sheet.

Configuration TASSEL = ID = Mode = TACLR =

b) Using the up mode...

Write a C code that runs on the LaunchPad and uses Timer_A in the up mode. Run the timer from ACLK and set it to the 12 KHz VLO (see highlighted code below). Within the timer, adjust the clock signal so that is becomes 3,000 Hz. Our goal is to generate a delay of 0.5 seconds. How many cycles does this correspond to? When the duration of the timer elapses, toggle the red LED, which is mapped to Port 1.0 and is active high.

Before writing the code, fill the configuration below by looking at the help sheet.

Configuration TASSEL = ID = Mode = TACLR = TACCR0 =

At startup, ACLK is loaded by default from the crystal. Since the crystal is not soldered on the LaunchPad board out-of-the-box, ACLK is idle. The code below diverts ACLK to the internal VLO signal at 12 KHz.

a) Using the continuous mode... Write a C code that runs on

/7 Code that sets ACLK to VLO @ 12 KHz // Write this at the top of the main // Set XTS=0 // Clear LEXT1S // Set LFXTIS-2 (VLO) BCSCTL3 &= ~LFXT 1S 3; /7 Code that sets ACLK to VLO @ 12 KHz // Write this at the top of the main // Set XTS=0 // Clear LEXT1S // Set LFXTIS-2 (VLO) BCSCTL3 &= ~LFXT 1S 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!