Download Print this page

Toshiba TLCS-900/H1 Series Manual page 144

Original cmos 32-bit microcontroller
Hide thumbs Also See for TLCS-900/H1 Series:

Advertisement

Example: To generate 1/4 duty 62.5 kHz pulses (at f
16 μs
Calculate the value which should be set in the timer register.
To obtain a frequency of 62.5 kHz, the pulse cycle t should be: t = 1/62.5 kHz = 16 μs
φT1 (=(16/fc)s (at f
C
16 μs ÷ (16/fc)s = 40
Therefore set TA1REG to 40 (28H)
The duty is to be set to 1/4: t × 1/4 = 16 μs × 1/4 = 4 μs
4 μs ÷ (16/fc)s = 10
Therefore, set TA0REG = 10 = 0AH.
7
6
5
← 0
TA01RUN
X
X
← 1
TA01MOD
0
X
← 0
TA0REG
0
0
← 0
TA1REG
0
1
← X
TA1FFCR
X
X
← −
PCCR
← −
PCFC
← 1
TA01RUN
X
X
X: Don't care, −: No change
= 40 MHz);
4
3
2
1
0
X
0
0
0
X
X
X
0
1
0
1
0
1
0
0
1
0
0
0
X
0
1
1
X
1
1
X
1
1
1
92CH21-142
= 40 MHz)
C
Stop TMRA0 and TMRA1 and clear it to "0".
Set the 8-bit PPG mode, and select φT1 as input clock.
Write 0AH.
Write 28H.
Set TA1FF, enabling both inversion and the double buffer.
10 generates a negative logic pulse.
Set PC0 as the TA1OUT pin.
Start TMRA0 and TMRA1 counting.
TMP92CH21
2009-06-19

Advertisement

loading

This manual is also suitable for:

Tmp92ch21fgJtmp92ch21