Epson S1C17624 Technical Manual page 145

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

13 16-BiT PWM TiMeRS (T16a2)
Comparator/capture block
The comparator/capture block provides a counter comparison function (comparator mode) and a count capture
function (capture mode). When comparator mode is selected via software, the comparator/capture block can be
used as a PWM waveform or clock generator. When capture mode is selected, this block can be used as a count
capture unit for measuring external event periods/cycles. The comparator circuit generates the compare A and
B signals that represent matching between compare A/B register values (set via software) and the counter value,
and outputs the signals to the TOUT control circuit and the interrupt control circuit. The TOUT control circuit
generates a PWM or other signal from the compare A and B signals and outputs it to the external TOUTAx and
TOUTBx pins. The capture circuit loads the counter value to the capture A or B register using the CAPAx or
CAPBx input signal that represents external events issued as a trigger. The interrupt control circuit outputs an
interrupt signal to the interrupt controller (ITC) module according to the interrupt condition that has been set.
Comparator mode and capture mode cannot be used simultaneously in the same channel.
Combination of counter block channel and comparator/capture block channel
Generally, a counter block is connected to the comparator/capture block with the same channel number. The
counter block and the comparator/capture block in different channels can also be connected. This allows a
counter to use two or more comparator/capture blocks for expanding the comparison/capturing function from
two systems to maximum four systems (details are described later).
notes: • The letter 'x' in register names refers to a channel number (0 or 1).
Example: T16A_CTLx register
Ch.0: T16A_CTL0 register
Ch.1: T16A_CTL1 register
• The letter 'x' in EXCLx, CAPAx, CAPBx, TOUTAx, and TOUTBx pins refers to a signal number
(Ch.0 = 5, Ch.1 = 6).
Ch.0: EXCL5, CAPA5, CAPB5, TOUTA5, TOUTB5
Ch.1: EXCL6, CAPA6, CAPB6, TOUTA6, TOUTB6
13.2
T16a2 input/Output Pins
Table 13.2.1 lists the input/output pins for the T16A2 module.
Pin name
EXCL5
(for Ch.0)
EXCL6
(for Ch.1)
CAPA5, CAPB5
(for Ch.0)
CAPA6, CAPB6
(for Ch.1)
TOUTA5, TOUTB5 (for Ch.0)
TOUTA6, TOUTB6 (for Ch.1)
The T16A2 input/output pins (CAPAx, CAPBx, TOUTAx, and TOUTBx) are shared with I/O ports and are initially
set as general purpose I/O port pins. The pin functions must be switched using the port function select bits to use the
general purpose I/O port pins as T16A2 input/output pins. Also the external clock input pins (EXCLx) are shared
with I/O ports. Setting the port to input mode enables it to be used as the T16A2 input pin with a general-purpose
input function. For detailed information on pin function switching and port control, see the "I/O Ports (P)" chapter.
13.3
Count Clock
The clock controller includes a clock source selector, dividers, and a gate circuit for controlling the count clock.
The count clock can be controlled in each channel individually.
13-2
Table 13.
2.1 List of T16A2 Pins
i/O
Qty
I
2
External clock input pins
Inputs an external clock for the event counter function.
I
4
Counter-capture trigger signal input pins (effective in capture mode)
The specified edge (falling edge, rising edge, or both) of the signal
input to the CAPAx pin captures the counter data into the capture A
register. The CAPBx pin input signal captures the counter data into the
capture B register.
O
4
Timer generating signal output pins (effective in comparator mode)
Each channel has two output pins and the signals generated in differ-
ent conditions can be output.
Seiko epson Corporation
Function
S1C17624/604/622/602/621 TeChniCal Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents