11 16-BiT PWM TiMeR (T16a2)
11-8
Seiko epson Corporation
S1C17153 TeChniCal Manual
(Rev. 1.0)
TOuT output pins
Table 11.6.1 lists correspondence between the TOUT pins and the timer channels. The pin function of the cor-
responding ports must be switched for TOUT output in advance. See the “I/O Ports (P)” chapter for switching
the pin function.
6.1 List of TOUT Output Pins
Table 11.
Channel
TOuT output pin
System a
System B
T16A2 Ch.0
TOUTA0
TOUTB0
TOuT generation mode
TOUTAMD[1:0]/T16A_CCCTL
x
register (for system A) or TOUTBMD[1:0]/T16A_CCCTL
x
register (for sys-
tem B) is used to set how the TOUT signal is changed by the compare A and compare B signals.
6.2 TOUT Generation Mode
Table 11.
TOuTaMD[1:0]/
TOuTBMD[1:0]
When compare a occurs When compare B occurs
0x3
No change
Toggle
0x2
Toggle
No change
0x1
Rise
Fall
0x0
Disable output
(Default: 0x0)
TOUTAMD[1:0] and TOUTBMD[1:0] are also used to turn the TOUT outputs On and Off.
TOuT signal polarity selection
By default, an active High output signal is generated. This logic can be inverted using TOUTAINV/T16A_
CCCTL
x
register (for system A) or TOUTBINV/T16A_CCCTL
x
register (for system B). Writing 1 to
TOUTAINV/TOUTBINV sets the timer to generate an active Low TOUT signal.
Resetting the counter sets the TOUT signal to the inactive level.
Figure 11.6.2 illustrates the TOUT output waveform.
Count clock
PRESET
PRUN
Counter value
Compare A signal
Compare B signal
TOUT(A) output
(TOUTAMD[1:0] = 0x0, TOUTAINV = 0)
(TOUTAMD[1:0] = 0x0, TOUTAINV = 1)
(TOUTAMD[1:0] = 0x1, TOUTAINV = 0)
(TOUTAMD[1:0] = 0x1, TOUTAINV = 1)
(TOUTAMD[1:0] = 0x2, TOUTAINV = 0)
(TOUTAMD[1:0] = 0x2, TOUTAINV = 1)
(TOUTAMD[1:0] = 0x3, TOUTAINV = 0)
(TOUTAMD[1:0] = 0x3, TOUTAINV = 1)
1 2 3 4 5 0
0
1 2 3 4 5 0 1 2 3 4 5 0 1
(When T16A_CCA
x
= 3, T16A_CCB
x
= 5)
6.2 TOUT Output Waveform
Figure 11.