C8051F80x-83x
240
Rev. 1.0
SFR Address = 0xF7
SFR Definition 29.3. PCA0PWM: PCA0 PWM Configuration
Bit
76543210
Name
ARSEL
ECOV
COVF
EAR16
CLSEL[1:0]
Type
R/W
R
R/W
Reset
00000000
Bit
Name
Function
7ARSEL
Auto-Reload Register Select.
This bit selects whether to read and write the normal PCA capture/compare registers
(PCA0CPn), or the Auto-Reload registers at the same SFR addresses. This function
is used to define the reload value for 9-bit through 15-bit PWM mode and 16-bit PWM
mode. In all other modes, the Auto-Reload registers have no function.
0: Read/Write Capture/Compare Registers at PCA0CPHn and PCA0CPLn.
1: Read/Write Auto-Reload Registers at PCA0CPHn and PCA0CPLn.
6ECOV
Cycle Overflow Interrupt Enable.
This bit sets the masking of the Cycle Overflow Flag (COVF) interrupt.
0: COVF will not generate PCA interrupts.
1: A PCA interrupt will be generated when COVF is set.
5COVF
Cycle Overflow Flag.
This bit indicates an overflow of the nth bit (n= 9 through 15) of the main PCA counter
(PCA0). The specific bit used for this flag depends on the setting of the CLSEL bits.
The bit can be set by hardware or software, but must be cleared by software.
0: No overflow has occurred since the last time this bit was cleared.
1: An overflow has occurred since the last time this bit was cleared.
4
Unused
Read = 0b; Write = Don’t care.
3
EAR16
16-Bit PWM Auto-Reload Enable.
This bit controls the Auto-Reload feature in 16-bit PWM mode, which loads the
PCA0CPn capture/compare registers with the values from the Auto-Reload registers
at the same SFR addresses on an overflow of the PCA counter (PCA0). This setting
affects all PCA channels that are configured to use 16-bit PWM mode.
0: 16-bit PWM mode Auto-Reload is disabled. This default setting is backwards-com-
patible with the 16-bit PWM mode available on other devices.
1: 16-bit PWM mode Auto-Reload is enabled.
2:0
CLSEL[2:0] Cycle Length Select.
When 16-bit PWM mode is not selected, these bits select the length of the PWM
cycle, from 8 to 15 bits. This affects all channels configured for PWM which are not
using 16-bit PWM mode. These bits are ignored for individual channels configured
to16-bit PWM mode.
000: 8 bits.
001: 9 bits.
010: 10 bits.
011: 11 bits.
100: 12 bits.
101: 13 bits.
110: 14 bits.
111: 15 bits.