12 16-BiT PWM TiMeR (T16e)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
12-5
7.1 Initial Output Level
Table 12.
iniTOl
inVOuT
initial output level
1
1
Low
1
0
High
0
1
High
0
0
Low
Starting clock output
To output the TOUT
x
and TOUTN
x
clocks, write 1 to OUTEN/T16E_CTL
x
register. Writing 0 to OUTEN
switches the output to the initial output level as set by INITOL and INVOUT.
Figure 12.7.2 shows the output waveform.
Count clock
T16ERST
OUTEN
T16ERUN
Counter value
Compare A signal
Compare B signal
TOUT
x
output (INITOL = 0, INVOUT = 0)
TOUT
x
output (INITOL = 0, INVOUT = 1)
TOUT
x
output (INITOL = 1, INVOUT = 0)
TOUT
x
output (INITOL = 1, INVOUT = 1)
1 2 3 4 5 0
0
1
2 3 4 5 0 1 2 3 4 5 0 1
(When T16E_CA
x
= 3, T16E_CB
x
= 5)
7.2 T16E Output Waveform
Figure 12.
TOuT
x
output when inVOuT = 0 (active high)
The TOUT
x
pin outputs low level (initial output level at output start) until the counter matches the compare
data A set in the T16E_CA
x
register. When the counter reaches the next compare data A value, the output
pin goes to high level, and a cause of compare A interrupt occurs. If the counter subsequently counts up to
compare data B set in the T16E_CB
x
register, the counter is reset and the output pin is returned to low level.
A cause of compare B interrupt is also occurred at the same time.
The TOUTN
x
pin outputs the inverted signals described above.
TOuT
x
output when inVOuT = 1 (active low)
The TOUT
x
pin outputs high level (inverted value of the initial output level at output start) until the counter
matches the compare data A set in the T16E_CA
x
register. When the counter reaches the next compare data
A value, the output pin goes to low level, and a cause of compare A interrupt occurs. If the counter subse-
quently counts up to compare data B set in the T16E_CB
x
register, the counter is reset and the output pin is
returned to high level. A cause of compare B interrupt is also occurred at the same time.
The TOUTN
x
pin outputs the inverted signals described above.
Fine mode clock output setting
By default, the clock output changes at the rising edge of the count clock when the counter value matches the
compare data A.
In fine mode, the clock output changes in accordance with the compare data A bit 0 (CA0) value when the counter
data register TC[14:0] matches the compare data A register CA[15:1].
When CA0 is 0: Changes at the rising edge of the count clock.
When CA0 is 1: Changes at the half-cycle delayed falling edge of the count clock.