mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 68

no-image

mpc82g516a

Manufacturer Part Number
mpc82g516a
Description
8-bit Microcontroller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc82g516aE
Manufacturer:
MEGAWIN
Quantity:
1 200
Part Number:
mpc82g516aF
Manufacturer:
MEGAWIN
Quantity:
20 000
Figure 14-2. PCA Timer/Counter
Where, Fosc is the system clock.
CMOD (Address=D9H, PCA Counter Mode Register)
CIDL:
CPS1-CPS0: PCA counter clock source select bits.
ECF:
The CCON register shown below contains the run control bit for the PCA and the flags for the PCA timer and
each module. To run the PCA the CR bit (CCON.6) must be set by software. The PCA is shut off by clearing this
bit. The CF bit (CCON.7) is set when the PCA counter overflows and an interrupt will be generated if the ECF bit
in the CMOD register is set. The CF bit can only be cleared by software. CCF0 to CCF5 are the interrupt flags for
module 0 to module 5, respectively, and they are set by hardware when either a match or a capture occurs.
These flags also can only be cleared by software. The PCA interrupt system is shown Figure 14-3.
CCON (Address=D8H, PCA Counter Control Register)
CF:
CR:
CCF0~CCF5:
MEGAWIN
CIDL
CF
7
7
IDLE
PCA counter Idle control.
CIDL=0 lets the PCA counter continue functioning during Idle mode.
CIDL=1 lets the PCA counter be gated off during Idle mode.
0
0
1
1
Enable PCA counter overflow interrupt.
ECF=1 enables an interrupt when CF bit (in CCON register) is set.
PCA Counter Overflow flag. Set by hardware when the counter rolls over. CF flag can generate an
interrupt if bit ECF in CMOD is set. CF may be set by either hardware or software but can only be
cleared by software.
PCA Counter Run control bit.
Set by software to turn the PCA counter on. Must be cleared by software to turn the PCA counter off.
Set by hardware when a match or capture occurs. Must be cleared by software.
External Input ECI (P1.1)
0
1
0
1
CR
6
6
-
PCA Module 0 to Module 5 interrupt flags.
Timer0 Overflow
Internal clock, Fosc/12 (
Internal clock, Fosc/2
Timer 0 overflow
External clock at the ECI pin.
CCF5
5
5
Fosc/12
-
Fosc/2
CCF4
4
4
-
CIDL
MPC82G516A Data Sheet
CCF3
Fosc is the system clock.)
-
3
3
CF
-
-
CR
CPS1
CCF2
CCF5 CCF4 CCF3
-
2
2
-
CPS1 CPS0
CPS0
CCF1
1
1
16-bit Up Counter
CCF2 CCF1
CH
ECF
CCF0
ECF
CMOD
CL
0
0
CCF0
CCON
To PCA Modules
PCA Interrupt
68

Related parts for mpc82g516a