English
Language : 

TMP91CW28 Datasheet, PDF (114/286 Pages) Toshiba Semiconductor – Original CMOS 16-Bit Microcontroller
TMP91CW28
Example: Generating a 50 kHz square wave with a 25% duty cycle (fc = 10 MHz)
20 μs
* Clocking conditions:
High-speed clock gear: × 1 (fc)
Prescaler clock:
fFPH
The time constant values to be loaded into the TA0REG and TA1REG are
determined as follows:
A 50 kHz waveform has a period of 20 μs.
When φT1 = ((23/fc)s) at 10 MHz) is used as the timer clock source, the TA1REG
should be loaded with:
20 μs ÷ (23/fc)s = 25
With a 25% duty cycle, the high pulse width is calculated as 20 µs × 1/4 = 5 µs. Thus,
the TA0REG should be loaded with:
5 μs ÷ (23/fc)s ≈ 6 = 06H
TA01RUN
TA01MOD
TA0REG
TA1REG
TA1FFCR
76543210
←0 X X X − 0 0 0
←1 0 X XX X 0 1
←0 0 0 0 0 1 1 0
←0 0 0 1 1 0 0 1
←X X X X 0 1 1 X
P7CR
P7FC
TA01RUN
←X X − − − − 1 −
←X X − − X − 1 X
←1 X X X − 1 1 1
X: Don’t care, −: No change
Stops and clears the TMRA0 and the TMRA1.
Selects 8-bit PPG mode and φT1 as the clock source.
Writes 06H.
Writes 19H.
Sets the TA1FF to 1 and enables toggling.
If these bits are set to 10, a low-going pulse is generated.
Configures P71 as the TA1OUT output pin.
Starts the TMRA0 and the TMRA1.
91CW28-112
2006-03-24