English
Language : 

UPSD33XX Datasheet, PDF (123/231 Pages) STMicroelectronics – Fast 8032 MCU with Programmable Logic
uPSD33xx
PROGRAMMABLE COUNTER ARRAY (PCA) WITH PWM
There are two Programmable Counter Array
blocks (PCA0 and PCA1) in the uPSD33xx. A PCA
block consists of a 16-bit up-counter, which is
shared by three TCM (Timer Counter Module). A
TCM can be programmed to perform one of the
following four functions:
1. Capture Mode: capture counter values by
external input signals
2. Timer Mode
3. Toggle Output Mode
4. PWM Mode: fixed frequency (8-bit or 16-bit),
programmable frequency (8-bit only)
PCA Block
The 16-bit Up-Counter in the PCA block is a free-
running counter (except in PWM Mode with pro-
grammable frequency). The Counter has a choice
of clock input: from an external pin, Timer 0 Over-
flow, or PCA Clock.
A PCA block has 3 Timer Counter Modules (TCM)
which share the 16-bit Counter output. The TCM
can be configured to capture or compare counter
value, generate a toggling output, or PWM func-
tions. Except for the PWM function, the other TCM
functions can generate an interrupt when an event
occurs.
Every TCM is connected to a port pin in Port 4; the
TCM pin can be configured as an event input, a
PWMs, a Toggle Output, or as External Clock In-
put. The pins are general I/O pins when not as-
signed to the TCM.
The TCM operation is configured by Control regis-
ters and Capture/Compare registers. Table
67., page 124 lists the SFR registers in the PCA
blocks.
Figure 47. PCA0 Block Diagram
PCA0CLK
TIMER0
OVERFLOW
P4.3/ECI
CLKSEL1 CLKSEL0
16-bit up Timer/Counter
PCACH0 PCACL0
8-bit
8-bit
OVF0
EOVFI
TCM0
INT
P4.0/CEX0
EN_ALL
EN_PCA
PCAIDLE
IDLE MODE
(From CPU)
CLEAR COUNTER
TCM1
TCM2
PWM FREQ
COMPARE
P4.1/CEX1
P4.2/CEX2
AI07857
123/231