English
Language : 

UPSD3354DV-40U6 Datasheet, PDF (153/272 Pages) STMicroelectronics – fast 8032 MCU with programmable logic
UPSD33xx
Programmable counter array (PCA) with PWM
26 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)
26.1 PCA block
The 16-bit Up-Counter in the PCA block is a free-running counter (except in PWM mode
with programmable frequency). The Counter has a choice of clock input: from an external
pin, Timer 0 Overflow, or PCA Clock.
) A PCA block has 3 Timer Counter modules (TCM) which share the 16-bit Counter output.
t(s The TCM can be configured to capture or compare counter value, generate a toggling
c output, or PWM functions. Except for the PWM function, the other TCM functions can
u generate an interrupt when an event occurs.
rod 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 Input. The pins are general I/O pins
P when not assigned to the TCM.
lete The TCM operation is configured by Control registers and Capture/Compare registers.
Table 98 on page 154 lists the SFR registers in the PCA blocks.
bso Figure 46. PCA0 block diagram
) - O PCA0CLK
t(s TIMER0
OVERFLOW
duc P4.3/ECI
Pro CLKSEL1 CLKSEL0
16-bit up Timer/Counter
PCACH0 PCACL0
8-bit
8-bit
OVF0
EOVFI
TCM0
INT
P4.0/CEX0
olete EN_ALL
sEN_PCA
ObPCAIDLE
TCM1
TCM2
P4.1/CEX1
P4.2/CEX2
IDLE MODE
(From CPU)
PWM FREQ
COMPARE
CLEAR COUNTER
AI07857
Doc ID 9685 Rev 7
153/272