Toshiba TMP92CM22FG TLCS-900/H1 Series Manual page 114

Toshiba original cmos 32-bit microcontroller
Table of Contents

Advertisement

2.
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 f
MSB
← −
TA01RUN
← 0
TA01MOD
← 0
TA1REG
← X
TA1FFCR
← X
PCCR
← X
PCFC
← −
TA01RUN
X : Don't care, − : No change
φT1
TA01RUN
<TA1RUN>
Bit7 to 2
Bit1
Up counter
Bit0
Comparator
timing
Comparator output
(Match detect)
INTTA1
Up counter clear
TA1FF
TA1OUT
Figure 3.7.10 Square Wave Output Timing Chart (50% duty)
use the following procedure to make the appropriate register settings. This
example uses TMRA1; however, either TMRA0 or TMRA1 may be used.
7
6
5
4
3
2
1
X
X
X
0
0
X
X
0
1
0
0
0
0
0
1
X
X
X
1
0
1
X
X
1
X
X
1
X
X
X
1
1
0
1
2
3
92CM22-112
LSB
0
Stop TMRA1 and clear it to 0.
Select 8-bit timer mode and select φT1 (=(16/fc)s at f
40MHz) 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 TMRA1.
Set PC1 to function as the TA1OUT pin.
Start TMRA1 counting.
0
1
2
3
0
1.2 μs at f
= 40 MHz
C
TMP92CM22
= 40 MHz,
C
1
2
3
0
2007-02-16
=
C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900/h1 series

Table of Contents