|
TMP91C824_05 Datasheet, PDF (112/260 Pages) Toshiba Semiconductor – Original CMOS 16-Bit Microcontroller | |||
|
◁ |
TMP91C824
In this mode, the value of the register buffer will be shifted into TA0REG if 2n
overflow is detected when the TA0REG double buffer is enabled.
Use of the double buffer facilitates the handling of low duty ratio waves.
Match with TA0REG
2n overflow
TA0REG
(Value to be compared)
Register buffer
Up counter = Q1
Q1
Q2
Up counter = Q2
Shift into TA0REG
Q2
Q3
TA0REG (Register buffer)
write
Figure 3.7.18 Register Buffer Operation
Example: To output the following PWM waves on the TA1OUT pin at fc = 33MHz:
17.9 μs
31.0 μs
* Clock state
System clock: High frequency (fc)
Clock gear: 1 (fc)
Prescaler clock: fFPH
To achieve a 31.0 μs PWM cycle by setting ÏT1 = (23/fc)s (at fc = 33 MHz):
31.0 μs ÷ (23/fc)s â 128 = 2n
Therefore n should be set to 7.
Since the low-level period is 37.0 μs when ÏT1 = (23/fc)s,
set the following value for TA0REG:
17.9 μs ÷ (23/fc)s â 74 = 4AH
TA01RUN
TA01MOD
MSB
LSB
76543210
ââ X X X â â â 0
â1 1 1 0 â â 0 1
TA0REG
TA1FFCR
â0 1 0 0 1 0 1 0
âX X X X 1 0 1 X
PBCR
âX â â â â â 1 â
PBFC
âX â â â â â 1 X
TA01RUN â 1 X X X â 1 â 1
X: Donât care, â: No change
Stop TMRA0 and clear it to 0.
Select 8-bit PWM mode (Cycle: 27) and select ÏT1 as the
input clock.
Write 4AH.
Clear TA1FF to 0, enable the inversion and double buffer.
Set PB1 and the TA1OUT pin.
Start TMRA0 counting.
91C824-110
2005-12-16
|
▷ |