11 PROGRaMMaBle TiMeR
11-6
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
Count clock
RLD register
CD register
Down-counter value
Compare match signal
Underflow signal
Timer output signal
Compare match interrupt
Underflow interrupt
Compare match signal
Underflow signal
Timer output signal
Underflow interrupt
7
6
7
0
6 5 4 3 2 1 0 7 6 5 4
CD register value
3 2 1 0 7 6 5 4 3 2 1
RLD register value + 1
PWM mode
Normal mode
5.1 Generating PWM waveform
Figure 11.
16-bit timer mode (Timer 0 + 1, Timer 2 + 3)
11.6
[S1C63004/008/016]
In the S1C63004/008/016, Ch.A can be used as a 16-bit timer by coupling Timers 0 and 1. In the S1C63016, Ch.B
can also be used as a 16-bit timer by coupling Timers 2 and 3.
To use Ch.A (Timers 0 and 1) as a 16-bit timer, write "1" to the Timer 0 16-bit mode select register MOD16_A.
The 16-bit timer is configured with Timer 0 for low-order byte and Timer 1 for high-order byte as shown in Figure
11.6.1.
Timer 0
Timer 1
Low-order 8 bits
High-order 8 bits
Timer 0 + 1
Timer 0 clock selection
Underflow signal
Compare match signal
Interrupt
Timer 0 reset
Timer 0
clock
PWM output selection
PTSEL1
PTRST0
Data bus
Timer 1 reset
PTRST1
Timer 0
Run/Stop
PTRUN0
PTPS0[3:0]
Timer function setting
f
OSC1
/16 (2,048 Hz)
f
OSC1
FCSEL_A
f
OSC3
Pulse polarity setting
PLPUL_A
Output control
PTOUT_A
Event counter
mode setting
EVCNT_A
Reload data register
RLD0[7:0]
Compare data register
CD0[7:0]
Compare data register
CD1[7:0]
8-bit down counter
Reload data register
RLD1[7:0]
8-bit down counter
Timer
control
circuit
PWM waveform
generator
P10 port
TOUT_A
(P11)
P11 port
Clock
manager
Interrupt
control circuit
Selector
Data buffer
PTD0[7:0]
Data buffer
PTD1[7:0]
Comparator
1/2
EVIN_A
(P10)
6.1 Configuration of 16-bit timer (Timer 0 + 1)
Figure 11.
In 16-bit timer mode, the Timer 0 register settings are effective for timer RUN/STOP control and count clock fre-
quency selection. The event counter function can also be used. Timer 1 uses the Timer 0 underflow signal as the count
clock, therefore, the Timer 1 RUN/STOP control and count clock frequency select registers become invalid. However,
the PWM output function must be controlled using the Timer 1 control register. Timer 1 output signal is automatically
selected for the TOUT_A output (the TOUT_A output select register is ineffective). The reload data must be preset
to Timer 0 and Timer 1 separately using each PTRSTx register.