Toshiba TLCS-900/H1 Series Data Book page 128

32bit micro controller
Hide thumbs Also See for TLCS-900/H1 Series:
Table of Contents

Advertisement

"
Generating a 50% duty ratio square wave pulse
The state of the timer flip-flop (TA1FF1) is inverted at constant intervals and its
status output via the timer output pin (TA1OUT).
Example: To output a 2.4-µs square wave pulse from the TA1OUT pin at fsys = 20 MHz, use the
following procedure to make the appropriate register settings. This example uses timer 1;
however, either timer 0 or timer 1 may be used.
TA01RUN
TA01MOD
TA1REG
TA1FFCR
PCCR
PCFC
TA01RUN
Note: X = Don't care; "−" = No change
φ
T1
TA01RUN
<TA01RUN>
Bit7 ∼ 2
Up-
Bit 1
counter
0
Bit 0
Comparator
timing
Comparator output
(match detect)
INTTA1
UC1 Clear
TA1FF
TA1OUT
Figure 3.7.11 Square wave output timing chart (50% Duty)
7
6
5
4
3
2
1
X
X
X
0
0
0
X
X
0
1
0
0
0
0
0
0
1
X
X
X
X
1
0
1
X
X
X
1
1
1
2
3
0
1.2 µ s at @fsys = 20 MHz
92CH21 - 124
0
Stop TMRA1 and clear it to 0.
Select 8-Bit Timer Mode and select φ T1 (0.4 µs at fsys =
20 MHz) as the input clock.
Set the timer register to 2.4 µs ÷ φT1 ÷ 2 = 3
1
1
Clear TA1FF to 0 and set it to invert on the match detect
signal from timer 1.
1
Set PC0 to function as the TA1OUT pin.
1
Start TMRA1 counting.
1
0
2
3
TMP92CH21
1
2
3
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tmp92ch21fg

Table of Contents