English
Language : 

TMP93CW46A Datasheet, PDF (103/242 Pages) Toshiba Semiconductor – CMOS 16-Bit Microcontroller
Example: Generating 1/5 duty 50 kHz pulse (at fc = 20 MHz)
TMP93CW46A
20 µs
* Clock condition
System clock:
Clock gear:
Prescaler clock:
High frequency (fc)
1 (fc)
fFPH
Calculate the value to be set for timer register.
To obtain the frequency 50 kHz, the pulse cycle t should be: t = 1/50 kHz = 20 µs.
Given φT1 = 0.4 µs (at 20 MHz),
20 µs ÷ 0.4 µs = 50
Consequently, to set the timer register 1 (TREG1) to TREG1 = 50 = 32H
and then duty to 1/5, t × 1/5 = 20 µs × 1/5 = 4 µs
4 µs ÷ 0.4 µs = 10
Therefore, set timer register 0 to TREG0 = 10 = 0AH.
TRUN
TMOD
TREG0
TREG1
TFFCR
76543210
←− X − − − − 0 0
←1 0 X X X X 0 1
←0 0 0 0 1 0 1 0
←0 0 1 1 0 0 1 0
←− − − 1 0 1 1 X
P7CR
P7FC
TRUN
←X X X X − − 1 −
←X X X X − − 1 X
←1 X − − − − 1 1
X: Don’t care, −: No change
Stop timer 0, and clear it to “0”.
Set the 8-bit PPG mode, and select φT1 as input clock.
Write “0AH”.
Write “32H”.
Sets TFF1 and enable the inversion and double buffer
enable.
Writing “10” provides negative logic pulse.
Set P71 as the TO1 pin.
Start timer 0 and timer 1 counting.
93CW46A-101
2004-02-10