12 16-BiT PWM TiMeR (T16e)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
12-1
16-bit PWM Timer (T16E)
12
T16e Module Overview
12.1
The S1C17624/604/622/602/621 includes a 16-bit PWM timer module (T16E) with one timer channel (Ch.0).
The features of T16E are listed below.
• 16-bit up counter with a comparator
• The counter value can be compared with two specified comparison values by the comparator.
• The comparison results generate two different types of interrupts.
• Can generate inverted and non-inverted PWM signals from the comparison results and output them outside the
IC.
• Supports event counter function using an external clock.
Figure 12.1.1 shows the T16E module configuration.
Compare data A register
T16E_CA
x
Internal data bus
Count clock select
Compare A interrupt request
Compare B interrupt request
PWM output
To ITC
TOUT3 (Ch.0)
TOUTN3 (Ch.0)
EXCL3 (Ch.0)
Compare data B register
T16E_CB
x
Compare A
signal
Up counter
T16E_TC
x
Count
control circuit
Output
control circuit
Interrupt
control circuit
Comparator
Input clock select
Run/stop control
Clock output enable
Initial output level select
INITOL
Inverted output
Fine mode select
SELFM
Timer reset
Compare buffer enable
Compare A interrupt enable
CAIE
Compare B interrupt enable
CBIE
PCLK
Divider
(1/1–1/16K)
CLG
Compare data A buffer
(T16E_CA
x
)
Compare data B buffer
(T16E_CB
x
)
Compare B
signal
Comparator
16-bit PWM timer (T16E) Ch.
x
T16EDF[3:0]
CLKSEL
T16ERUN
OUTEN
INVOUT
T16ERST
CBUFEN
1.1 T16E Module Configuration
Figure 12.
The T16E module includes a 16-bit up-counter (T16E_TC
x
register), two 16-bit compare data registers (T16E_CA
x
and T16E_CB
x
registers), and the corresponding buffers.
The 16-bit counter value can be configured, reset to 0, and read via software. The counter counts up with a divided
PCLK clock or an external signal input from the EXCL
x
pin.
The compare data A and B registers hold data for comparison against the up-counter contents. Data can be read or
written directly from/to the compare data registers. The compare data buffers enable loading to the compare data
registers of comparison values set when the counter is reset via software or by the compare B match signal.
Software can select either the compare data register or the buffer for writing comparison values.
If the counter value matches the contents of each compare data register, the comparator outputs a signal to control
interrupts and output signals. These registers can be used to program the interrupt occurrence cycle and output
clock frequency and duty ratio.
notes: • The letter ‘
x
’ in register names refers to a channel number (0).
Example: T16E_CTL
x
register
Ch.0: T16E_CTL0 register
• The letter ‘
x
’ in EXCL
x
, TOUT
x
, and TOUTN
x
pins refers to a signal number (Ch.0 = 3).
Ch.0: EXCL3, TOUT3, TOUTN3