Texas Instruments MSP430x1xx User Manual page 220

Texas instruments modules and peripherals user's guide
Table of Contents

Advertisement

Timer_A Operation
Changing the Period Register TACCR0
When changing TACCR0 while the timer is running, and counting in the down
direction, the timer continues its descent until it reaches zero. The new period
takes affect after the counter counts down to zero.
When the timer is counting in the up direction, and the new period is greater
than or equal to the old period, or greater than the current count value, the timer
counts up to the new period before counting down. When the timer is counting
in the up direction, and the new period is less than the current count value, the
timer begins counting down. However, one additional count may occur before
the counter begins counting down.
Use of the Up/Down Mode
The up/down mode supports applications that require dead times between
output signals (See section Timer_A Output Unit). For example, to avoid
overload conditions, two outputs driving an H-bridge must never be in a high
state simultaneously. In the example shown in Figure 11−9 the t
With:
The TACCRx registers are not buffered. They update immediately when
written to. Therefore, any required dead time will not be maintained
automatically.
Figure 11−9. Output Unit in Up/Down Mode
0FFFFh
TACCR0
TACCR1
TACCR2
0h
TAIFG
EQU2
11-10
Timer_A
× (TACCR1 − TACCR2)
t
= t
dead
timer
t
Time during which both outputs need to be inactive
dead
t
Cycle time of the timer clock
timer
TACCRx Content of capture/compare register x
EQU1
EQU1
EQU1
TAIFG
EQU0
EQU0
EQU2
EQU2
Dead Time
Output Mode 6: Toggle/Set
Output Mode 2: Toggle/Reset
EQU1
Interrupt Events
EQU2
is:
dead

Advertisement

Table of Contents
loading

Table of Contents