mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 69

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-3. PCA Interrupt System
14.3 Compare/Capture Modules
Each of the six compare/capture modules has a mode register called CCAPMn (n e 0,1,2,3,or 4) to select which
function it will perform. Note the ECCFn bit which enables an interrupt to occur when a module's interrupt flag is
set.
CCAPMn, n=0~5 (Address=DAH~DFH, PCA Module Compare/Capture Registers)
ECOMn: Enable Comparator. ECOMn=1 enables the comparator function.
CAPPn: Capture Positive. CAPPn=1 enables positive edge capture.
CAPNn: Capture Negative. CAPNn=1 enables negative edge capture.
MATn:
TOGn:
PWMn:
ECCFn: Enable CCFn interrupt. Enables compare/capture flag CCFn in the CCON register to generate an
Note: The bits CAPNn (CCAPMn.4) and CAPPn (CCAPMn.5) determine the edge on which a capture input will
be active. If both bits are set, both edges will be enabled and a capture will occur for either transition.
Each module also has a pair of 8-bit compare/capture registers (CCAPnH, CCAPnL) associated with it. These
registers are used to store the time when a capture event occurred or when a compare event should occur.
When a module is used in the PWM mode, in addition to the above two registers, an extended register
PCAPWMn is used to improve the range of the duty cycle of the output. The improved range of the duty cycle
69
7
PCA Timer/Counter
-
Match control. When MATn=1, a match of the PCA counter with this module’s compare/capture
Register causes the CCFn bit in CCON to be set.
Toggle control. When TOGn=1, a match of the PCA counter with this module’s compare/capture
register causes the CEXn pin to toggle.
PWM control. PWMn=1 enables the CEXn pin to be used as a pulse width modulated
output.
interrupt.
ECOMn
Module 0
Module 1
Module 2
Module 3
Module 4
Module 5
6
CAPPn
5
CAPNn
CCAPMn.0 (n= 0 to 5)
ECCF0~ECCF5
CMOD.0
ECF
4
MPC82G516A Data Sheet
MATn
3
TOGn
CF
2
CR
CCF5 CCF4
PWMn
1
AUXIE.2
EPCA
ECCFn
CCF3 CCF2 CCF1 CCF0
0
IE.7
EA
To Interrupt
Priority Processing
CCON
MEGAWIN

Related parts for mpc82g516a