English
Language : 

UPSD3354DV-40U6 Datasheet, PDF (156/272 Pages) STMicroelectronics – fast 8032 MCU with programmable logic
Programmable counter array (PCA) with PWM
UPSD33xx
26.6
Toggle mode
In this mode, the user writes a value to the TCM's CAPCOM registers and enables the
comparator. When there is a match with the Counter output, the output of the TCM pin
toggles. This mode is a simple extension of the Timer mode.
26.7
PWM mode - (x8), fixed frequency
In this mode, one or all the TCM's can be configured to have a fixed frequency PWM output
on the port pins. The PWM frequency depends on when the low byte of the Counter
overflows (modulo 256). The duty cycle of each TCM module can be specified in the
CAPCOMHn register. When the PCA_Counter_L value is equal to or greater than the value
in CAPCOMHn, the PWM output is switched to a high state. When the PCA_Counter_L
register overflows, the content in CAPCOMHn is loaded to CAPCOMLn and a new PWM
pulse starts.
Figure 47. Timer mode
roduct(s) ENABLE
CAPCOMHn
8
CAPCOMLn
8
16-bit COMPARATOR
P 8
8
lete PCACHm
PCACLm
so 16-bit up Timer/Counter
MATCH
INTFn
PCASTA
MATCH_TIMER
INTR
te Product(s) - Ob 1. m = 0: n = 0, 1, or 2
Obsole 2. m = 1: n = 3, 4, or 5
TCMMODEn EINTF E_COMP CAP_PE
0
C
D
EN_FLAG
CAP_NE
0
MATCH TOGGLE PWM1
0
0
RESET
WRITE to
CAPCOMHn
1
0
PWM0
0
WRITE to
CAPCOMLn
AI07858
156/272
Doc ID 9685 Rev 7