Pwm & Capture Timer (T16E); Pwm & Capture Timer Overview - Epson S1C17001 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

13 PWM & Capture Timer (T16E)
13.1 PWM & Capture Timer Overview
The S1C17001 incorporates a single-channel PWM & capture timer.
Figure 13.1.1 illustrates the PWM & capture timer configuration.
EXCL3 (P27)
Prescaler clock selection
Prescaler
Fine mode selection
Inverted output
Initial output level selection
Clock output enable
TOUT (P26)
To ITC
The PWM & capture timer includes a 16-bit up-counter (T16E_TC register), two 16-bit compare data registers
(T16E_CA and T16E_CB registers), and the corresponding buffers.
The 16-bit counter can be reset to 0 or set to a counter value by software and counts up for external signals from the
prescaler output clock or P27 port pin. The count value can be read by software.
The compare data A and B registers hold data for comparison against the up-counter contents. Data can be read or
written directly to or from the compare data registers. The compare data buffers enables loading to the compare
data registers of comparison values set when the counter is reset by software or by a compare B match signal.
Software can be used to set which of the compare data register and buffer the comparison values are written to.
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.
S1C17001 TECHNICAL MANUAL
CBUFEN
Compare buffer enable
Timer reset
T16ERST
T16ERUN
RUN/STOP control
Input clock selection
CLKSEL
T16EDF[3:0]
PCLK-1/1 to 1/16K
SELFM
INVOUT
Output
control
INITOL
circuit
OUTEN
PWM output
Interrupt
Compare A interrupt request
control
Compare B interrupt request
circuit
Figure 13.1.1: PWM & capture timer configuration
13 PWM & CAPTURE TIMER (T16E)
Compare A
signal
Count
control
Compare B
circuit
signal
CAIE
Compare A interrupt enable
CBIE
Compare B interrupt enable
EPSON
PWM & capture timer
Compare data A buffer
(T16E_CA)
Compare data A register
T16E_CA
Comparator
Up-counter
T16E_TC
Comparator
Compare data B register
T16E_CB
Compare data B buffer
(T16E_CB)
141

Advertisement

Table of Contents
loading

Table of Contents