15 16-BIT PWM TIMER (T16A5)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
15-7
6.1 TOUT Generation Mode
Table 15.
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 output 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 causes the timer to generate an active low TOUT signal.
Resetting the counter sets the TOUT signal to the inactive level.
Figure 15.6.2 shows the TOUT output waveform.
Count clock
PRESET
PRUN
Counter value
Compare A signal
Compare B signal
TOUT(T16A_ATMA_
x
) 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 15.
T16A5 Interrupts and DMA
15.7
This section describes the T16A5 interrupts and invoking DMA.
For more information on interrupt processing and DMA transfer, see the “Interrupt Controller (ITC)” chapter and
the “DMA Controller (DMAC)” chapter, respectively.
Interrupts
15.7.1
Each T16A5 channel can generate the following six kinds of interrupts:
• Compare A interrupt (in comparator mode)
• Compare B interrupt (in comparator mode)
• Capture A interrupt (in capture mode)
• Capture B interrupt (in capture mode)
• Capture A overwrite interrupt (in capture mode)
• Capture B overwrite interrupt (in capture mode)