English
Language : 

MG82FX532AE Datasheet, PDF (78/151 Pages) Megawin Technology Co., Ltd – Dual data pointer
14. Programmable Counter Array (PCA)
The MG82Fx532 is equipped with a Programmable Counter Array (PCA), which provides more timing capabilities
with less CPU intervention than the standard timer/counters. Its advantages include reduced software overhead
and improved accuracy.
14.1. PCA Overview
The PCA consists of a dedicated timer/counter which serves as the time base for an array of six compare/capture
modules. Figure 14-1 shows a block diagram of the PCA. Notice that the PCA timer and modules are all 16-bits.
If an external event is associated with a module, that function is shared with the corresponding Port 1 pin. If the
module is not using the port pin, the pin can still be used for standard I/O.
Each of the six modules can be programmed in any one of the following modes:
- Rising and/or Falling Edge Capture
- Software Timer
- High Speed Output
- Pulse Width Modulator (PWM) Output
All of these modes will be discussed later in detail. However, let's first look at how to set up the PCA timer and
modules.
Figure 14-1. PCA Block Diagram
16 Bits Each
Module 0
P1.2/CEX0
Module 1
P1.3/CEX1
16 Bits
PCA Timer/Counter
Module 2
Module 3
P1.4/CEX2
P1.5/CEX3
Module 4
P1.6/CEX4
Module 5
P1.7/CEX5
78
MG82FE/L532 Data Sheet
MEGAWIN