Question: 3 . 2 The Up Mode In the up mode, we set the upperbound of TAR to any value that we choose. TAR counts from
The Up Mode
In the up mode, we set the upperbound of TAR to any value that we choose. TAR counts
from zero up to the value of register TACCR This is the register of Channel The up mode
is inherently linked to Channel The timeline below shows how the timer runs. When TAR
reaches TACCR it rolls back to zero and continues counting. Also, when TAR rolls back to
zero while counting the TAIFG flag is set by the hardware.
TAR: TACCR TACCR
TAIFG set TAIFG set
The register TACCR is bit. To have a period of cycles, we set TACCR
TAR then counts between and spending one cycle at each count.
Since our microcontroller chip has multiple Timer A modules called Timer A Timer A
etc well use the term TACCR in the code to indicate that were using Timer A Channel
register.
The code for the up mode is very similar to the continuous mode. Below are the differences.
First, we need to set TARs upperbound using TACCR Set it so the timers period is second
flashing period is seconds Well use ACLK configured to the KHz crystal and divide it
by
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
