Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started