15 16-BIT PWM TIMER (T16A5)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
15-1
16-bit PWM Timer (T16A5)
15
T16A5 Module Overview
15.1
The S1C33L26 includes a 16-bit PWM timer (T16A5) module with two timer channels.
The features of T16A5 are listed below.
• 16-bit up counter with a comparator and capture unit
• The count clock is selectable from 15 clocks output from the prescaler.
• Supports event counter function using an external clock.
• Includes a comparator that compares the counter value with two specified comparison values to generate inter-
rupts and various output waveform including a PWM waveform.
• Includes a capture unit that captures counter values using two external trigger signals and generates interrupts.
Figure 15.1.1 shows the T16A5 configuration.
A data register
T16A_CCA
x
T16A_ATMA_
x
T16A_ATMB_
x
Interrupt/
DMA request
Counter select
B data register
T16A_CCB
x
Comparator/
Capture controller
A data buffer
(T16A_CCABUF
x
)
B data buffer
(T16A_CCBBUF
x
)
Counter block
Comparator/capture block
Counter
T16A_TC0
Count clock
control
Prescaler
T16A_EXCL_0
16-bit PWM timer (T16A5) Ch.
x
Counter
T16A_TC1
Count clock
control
Prescaler
T16A_EXCL_1
1.1 T16A5 Configuration (one channel)
Figure 15.
The T16A5 module consists of a counter block and a comparator/capture block.
Counter block
The counter block includes a 16-bit up-counter that operates with a prescaler output clock, or the external count
clock input from outside the IC. The 16-bit PWM timer (T16A5) allows software to run and stop the counter,
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.
Comparator/capture block
The comparator/capture block includes two systems (units A and B) of comparators that compare between the
counter value and the specified comparison value and capture circuits that capture the counter value by an ex-
ternal trigger signal. Note, however, that the comparator and capture functions cannot be used at the same time
in each system. One of the two functions must be selected by the software switch.
When using the comparator function, set the value(s) to be compared with the counter value to the compare A
and/or compare B registers. When the counter reaches the value set in the compare A or compare B register, the
comparator asserts the compare A or compare B signal. These signals can generate interrupts. Also the signals
control the cycle time and duty ratio of the timer output signal allowing the timer to output a PWM or other
waveform. In addition to these functions, the compare B signal is used to reset the counter.