
239
8.7 Operation of the Square Wave Output Initial Setting Function
8.7
Operation of the Square Wave Output Initial Setting
Function
The Square wave output can be set to the desired initial value using the timer 1 control
register (T1CR).
s Operation of Square Wave Output Initial Setting Function
The square wave output can be set to the desired initial value by the program, but this can be
done only when the timer operation is stopped (T1CR: T1STR = 0).
Figure 8.7-1 "Square Wave Output Initial Setting Equivalent Circuit" shows an equivalent circuit
for the square wave output control circuit initial setting. To perform the initial setting, follow the
procedure in Table 8.7-1 "Square Wave Output Initial Setting Procedure (T1CR Register)". The
operation of the square wave output when this is done is as shown in Figure 8.7-2 "Square
Wave Output Initial Setting Operation".
Figure 8.7-1 Square Wave Output Initial Setting Equivalent Circuit
DQ
Q
>
DQ
Q
>
DQ
Q
>
DQ
Q
>
T1STR
T1OS1
T1OS0
Output enable signal
Sets output pin "H"
(to SET pin of T.FF)
Sets output pin "L"
(to RST pin of T.FF)
Level latch
Write strobe signal
Table 8.7-1 Square Wave Output Initial Setting Procedure (T1CR Register)
Step
Settings and Operation
(1)
To set the square wave output pin (TO) "L", set the square wave output control
bits (T1CR: T1OS1, T1OS0) first to "01B", then to "11B". To set the TO pin "H",
set the bits to "10B" then "11B".
Note:
Until the bits are written to "11B", the circuit simply holds the latched value,
and the TO pin level remains in its current or previous state.
(2)
If the square wave output control bits (T1OS1, T1OS0) are written to "11B" and
the timer operation stopped (T1STR = 0), the TO pin will output the level
corresponding to the level latch value (initial value). This can also be
accomplished by setting T1OS1, T1OS0, and T1STR simultaneously.
If the timer activation bit is set (T1STR= 1), the counter will start.
(3)
The square wave output is inverted each time the counter value matches the data
register settings.