13 16-BiT PWM TiMeRS (T16a2)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
13-1
16-bit PWM Timers (T16A2)
13
note: T16A2 is available only in the S1C17624/604.
T16a2 Module Overview
13.1
The S1C17624/604 includes a 16-bit PWM timer (T16A2) module that consists of counter blocks and comparator/
capture blocks. This timer can be used as an interval timer, PWM waveform generator, external event counter and a
count capture unit to measure external event periods.
The features of T16A2 are listed below.
• Two channels of 16-bit up counter blocks
• Two channels of comparator/capture blocks to which a counter block to be connected is selectable
• Allows selection of a count clock asynchronously with the CPU clock.
• Supports event counter function using an external clock.
• The comparator compares the counter value with two specified comparison values to generate interrupts and a
PWM waveform.
• The capture unit captures counter values using two external trigger signals and generates interrupts.
Figure 13.1.1 shows the T16A2 configuration.
Capture
circuit
Comparator
circuit
Compare B
buffer
Compare A
buffer
Comparator
circuit
TOUT
control circuit
Interrupt
control circuit
TOUTA5
TOUTB5
CAPA5
CAPB5
Interrupt request
Compare B/Capture B register
T16A_CCB0
Compare A/Capture A register
T16A_CCA0
Counter block Ch.0
Comparator/capture block Ch.0
Counter
T16A_TC0
IOSC
0
1
2
3
1
0
OSC3
EXCL5
Divider
(1/1–1/16384)
CLKDIV
/T16A_CLK0
CLKEN
/T16A_CLK0
CLKSRC
/T16A_CLK0
OSC1
Divider
(1/1–1/256)
HCM, TRMD,
PRESET, PRUN
/T16A_CTL0
MULTIMD
/T16A_CLK0
Compare A
signal
Compare B
signal
TOUTA6
TOUTB6
CAPA6
CAPB6
Interrupt request
EXCL6
Divider
(1/1–1/16384)
Gate
Clock controller Ch.0
16-bit PWM timer (T16A2)
Counter block Ch.1
Comparator/capture block Ch.1
Clock controller Ch.1
0
1
CCABCNT
/T16A_CTL1
CBUFEN
/T16A_CTL0
CBUFEN
/T16A_CTL0
T16A_IFLG0
T16A_CCCTL0
T16A_IEN0
CCABCNT
/T16A_CTL0
0
1
1
0
1
0
1.1 T16A2 Configuration
Figure 13.
Clock controller
T16A2 includes two channels of clock controllers that generate the count clock for the counters. The clock
source and division ratio can be selected with software.
Counter block
The counter block includes a 16-bit up-counter that operates with an IOSC, OSC3, or OSC1 division clock,
or the external count clock input from outside the IC. The T16A2 module allows software to run and stop the
counter of each channel, and to reset the counter value (cleared to 0) as well as selection of the count clock. The
counter can also be reset by the compare B signal output from the comparator/capture block.