Epson S1C17624 Technical Manual page 137

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

12 16-BiT PWM TiMeR (T16e)
This control does not affect the counter data. The counter data is retained even when the count is halted, allowing
resumption of the count from that data.
If T16ERUN and T16ERST are written as 1 simultaneously, the timer starts counting after reset.
If the counter matches the compare data A register value during counting, the compare A match signal is output and
the cause of compare A interrupt occurs.
Likewise, if the counter matches the compare data B register value, the compare B match signal is output and the
cause of compare B interrupt occurs. The counter is reset to 0 at the same time if CBUFEN is set to 0. If CBUFEN
is set to 1, the values set in the compare data buffers are loaded into the compare data registers.
If interrupts are enabled, an interrupt request is sent to the interrupt controller (ITC).
In either case, counting continues unaffected.
T16ERUN
T16ERST
T16E_CAx register
T16E_CBx register
Count clock
T16E_TCx register
Reset
12.7
Clock Output Control
The T16E module can generate TOUTx and TOUTNx signals using the compare match signals.
Figure 12.7.1 shows the T16E clock output circuit.
INITOL
Compare A
Compare B
initial output level setting
The default output level is 0 (low level) while the TOUTx clock output is Off (TOUTNx output level is high).
This can be changed to 1 (TOUTx = high level, TOUTNx = low level) using INITOL/T16E_CTLx register.
When INITOL is 0 (default), TOUTx initial output level is low (TOUTNx output level is high). When INITOL
is set to 1, the initial output level is set to high (TOUTNx output level is low).
Output signal polarity selection
By default, an active high (normal low) TOUTx output signal is generated (active low TOUTNx output signal
is generated). This logic can be inverted by INVOUT/T16E_CTLx register. Writing 1 to INVOUT causes the
timer to generate an active low (normal high) TOUTx signal (active high TOUTNx signal).
Setting INVOUT to 1 also inverts the initial output level set using INITOL.
See Figure 12.7.2 for output waveforms.
Output pin initial status
The TOUTx and TOUTNx pins used for output are configured as general-purpose I/O ports after an initial reset
and the ports enter input mode. The pins then become high-impedance.
Switching the pin function to TOUTx/TOUTNx output causes the pin to output the level set by INITOL and IN-
VOUT. After the timer output starts, the output is maintained at this level until changed by the counter value.
12-4
0
1
2
3
4
Compare A
interrupt
Figure 12.
6.1 Basic Counter Operation Timing
Logic
D Q
Q
Clock
OUTEN
Figure 12.
7.1 T16E Clock Output Circuit
Seiko epson Corporation
0x2
0x5
5
0
1
2
3
Reset and
Compare A
compare B
interrupt
interrupt
INVOUT
S1C17624/604/622/602/621 TeChniCal Manual
4
5
0
1
Reset and
compare B
interrupt
TOUTx
TOUTNx

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents