TMP91C824
91C824-100
"
Generating a 50% duty ratio square wave pulse
The state of the timer flip-flop (TA1FF) is inverted at constant intervals and its status output via
the timer output pin (TA1OUT).
Example: To output a 3.0-
µ
s square wave pulse from the TA1OUT pin at fc = 16 MHz, use the following
procedure to make the appropriate register settings. This example uses TMRA1; however, either TMRA0 or
TMRA1 may be used.
∗
Clock state
System clock: High frequency (fc)
Clock gear: 1 (fc)
Prescaler clock: f
FPH
7 6
5
4 3 2
1
0
TA01RUN
←
–
X X
X
–
–
0
–
Stop TMRA1 and clear it to 0.
TA01MOD
←
0 0
X X 0 1
–
–
Select 8-Bit Timer Mode and select
φ
T1 (0.5
µ
s at fc = 16
MHz) as the input clock.
TA1REG
←
0
0
0
0
0
0
1
1
Set the timer register to 3.0
µ
s
÷
φ
T1
÷
2
=
3
TA1FFCR
←
X X X X 1
0
1
1
Clear TA1FF to “0” and set it to invert on the match detects
signal from TMRA1.
PBCR
←
X –
–
– – –
1
–
PBFC
←
X –
–
– – –
1
X
Set PB1 to function as the TA1OUT pin.
TA01RUN
←
– X X X – 1
1
–
Start
TMRA1
counting.
(note): X = Don’t care; “
−
” = No change
1.5
µ
sat @fc
=
16 MHz
Bit7
∼
2
φ
T1
INTTA1
UC1 Clear
TA1FF
Bit 0
Bit 1
TA01RUN
<TA1RUN>
Up-
counter
Comparator
timing
Comparator output
(match detect)
TA1OUT
0
1
1
1
2
2
2
3
3
3
0
0
0
Figure 3.7.9 Square wave output timing chart (50% Duty)