gc80c590ae CORERIVER Semiconductor, gc80c590ae Datasheet - Page 60

no-image

gc80c590ae

Manufacturer Part Number
gc80c590ae
Description
Flash / Isp / Iap 8-bit Turbo Microcontrollers
Manufacturer
CORERIVER Semiconductor
Datasheet
6.10. PCA : PCAn Counter Control Registers
To use a PCA Counter as an 8-bit Auto-reset Counter
Turn off the PCAn by clearing CR bit (CnCON.6)
Load target values into CnL and CnH.
Set PWMDYN bit (CnMOD.6) and set CF bit (CnCON.7)
Run PCAn by setting CR bit (CnCON.6)
An interrupt will occur when CnL reaches to CnH.
Insert the procedure for the PCAn counter overflow into the
PCA interrupt service routine.
[ Counter in Dynamic Mode (PWMDYN=1) ]
overflow
PWMDYN
CnMOD.6
Semiconductor Co., Ltd.
8-BIT COMPARATOR
CnH
CnL
0
[ Count Rate (F
CPS3
C0MOD (ADh) : PCA0 Counter Mode Register
C1MOD (CFh) : PCA1 Counter Mode Register
R/W(0)
0
0
0
0
0
0
0
0
1
1
1
1
CIDL
CIDL
PWMDYN : Dynamic PWM bit.
CPS[3:0] : PCA prescaler rate (F
ECF
CPS2
0
0
0
0
1
1
1
1
0
0
0
0
PWMDYN
R/W(0)
CPS1
: Counter idle control.
: Enable PCA counter overflow interrupt.
0
0
1
1
0
0
1
1
0
0
1
1
If this bit is set, the dynamic PWM is generated.
CIDL = 0 programs the PCA counter to continue
functioning during idle mode.
CIDL = 1 programs it to be stop during idle mode.
C0L is cleared when a match occurs between C0L and C0H.
The match signal replaces the overflow signal for PWM.
ECF = 1 enables CF bit in C0CON to generate an interrupt.
ECF = 0 disables that function.
PCA
) Selection ]
CPS0
-
0
1
0
1
0
1
0
1
0
1
0
1
R/W(0) R/W(0) R/W(0) R/W(0) R/W(0)
0 Internal clock, F
1 Internal clock, F
2 Internal clock, F
3 Internal clock, F
4 Internal clock, F
5 Internal clock, F
6 Internal clock, F
7 Internal clock, F
8 Internal clock, F
9 Internal clock, F
10 External clock at ECIn pin (max rate = F
11 Timer 0 overflow
CPS3
MiDAS2.0 Family
CPS2
PCA
) selection. (Refer to below Table)
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
CPS1
Description
/ 2
/ 4
/ 8
/ 12
/ 16
/ 32
/ 64
/ 128
/ 256
CPS0
ECF
OSC
[60]
/ 2)

Related parts for gc80c590ae