English
Language : 

TMP91C824_05 Datasheet, PDF (110/260 Pages) Toshiba Semiconductor – Original CMOS 16-Bit Microcontroller
Example: To generate 1/4-duty 50-kHz pulses (at fc = 33 MHz)
TMP91C824
20 μs
* Clock state
System clock: High frequency (fc)
Clock gear: 1 (fc)
Prescaler clock: fFPH
Calculate the value which should be set in the timer register.
To obtain a frequency of 50 kHz, the pulse cycle t should be: t = 1/50 kHz = 20 μs
φT1 = (23/fc)s (at 33 MHz);
20 μs ÷ (23/fc)s ≈ 83
Therefore set TA1REG = 83 = 53H
The duty is to be set to 1/4: t × 1/4 = 20 μs × 1/4 = 5 μs
5 μs ÷ (23/fc)s ≈ 10
Therefore, set TA0REG = 21 =15H.
TA01RUN
TA01MOD
TA0REG
TA1REG
TA1FFCR
76543210
←– X X X – 0 0 0
←1 0 X X X X 0 1
←0 0 0 1 0 1 0 1
←0 1 0 1 0 0 1 1
←X X X X 0 1 1 X
PBCR
PBFC
←X – – – – – 1 –
←X – – – – – 1 X
TA01RUN ← 1 X X X – 1 1 1
X: Don’t care, −: No change
Stop TMRA0 and TMRA01 and clear it to 0.
Set the 8-bit PPG mode, and select φT1 as input clock.
Write 15H
Write 53H
Set TA1FF, enabling both inversion and the double buffer.
Writing 10 provides negative logic pulse.
Set PB1 as the TA1OUT pin.
Start TMRA0 and TMRA01 counting.
91C824-108
2005-12-16