English
Language : 

UPSD3422_06 Datasheet, PDF (178/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
Programmable counter array (PCA) with PWM
uPSD34xx
27.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.
27.7
Note:
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 CAPCOMLn, 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 59. Timer mode
ENABLE
CAPCOMHn
8
CAPCOMLn
8
16-bit COMPARATOR
8
8
PCACHm
PCACLm
16-bit up Timer/Counter
MATCH
INTFn
PCASTA
MATCH_TIMER
INTR
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
m = 0: n = 0, 1, or 2
m = 1: n = 3, 4, or 5
178/293