Download Print this page

Toshiba TLCS-900/H1 Series Manual page 140

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

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
use the following procedure to make the appropriate register settings. This
example uses TMRA1; however, either TMRA0 or TMRA1 may be used.
7
← −
TA01RUN
← 0
TA01MOD
← 0
TA1REG
← X
TA1FFCR
← −
PCCR
← −
PCFC
← −
TA01RUN
X: Don't care, −: No change
φT1
TA01RUN
<TA01RUN>
Bit7 to Bit2
Up
Bit1
counter
0
Bit0
Comparator
timing
Comparator output
(Match detect)
INTTA1
UC1 clear
TA1FF
TA1OUT
Figure 3.7.10 Square Wave Output Timing Chart (50 % Duty)
6
5
4
3
2
1
0
X
X
X
0
0
X
X
0
1
0
0
0
0
0
1
1
X
X
X
1
0
1
1
1
1
X
X
X
1
1
1
2
3
0
1.2 μs at f
92CH21-138
Stop TMRA1 and clear it to "0".
Select 8-bit timer mode and select φT1 (=(16/fc)s at f
MHz) as the input clock.
Set the timer register to 2.4 μs ÷ φT1 ÷ 2 = 3
Clear TA1FF to "0" and set it to invert on the match detect
signal from TMRA1.
Set PC0 to function as the TA1OUT pin.
Start TMRA1 counting.
1
2
3
0
1
= 40 MHz
C
TMP92CH21
= 40 MHz,
C
= 40
C
2
3
0
2009-06-19

Advertisement

loading

This manual is also suitable for:

Tmp92ch21fgJtmp92ch21