beautypg.com

pca capture mode, Preliminary – Rainbow Electronics T89C51CC02 User Manual

Page 105

background image

Rev.A - May 17, 2001

105

Preliminary

T89C51CC02

16.3. PCA Capture Mode

To use one of the PCA modules in capture mode either one or both of the CCAPM bits CAPN and CAPP for
that module must be set. The external CEX input for the module (on port 1) is sampled for a transition. When a
valid transition occurs the PCA hardware loads the value of the PCA counter registers (CH and CL) into the
module’s capture registers (CCAPnL and CCAPnH). If the CCFn bit for the module in the CCON SFR and the
ECCFn bit in the CCAPMn SFR are set then an interrupt will be generated.

Figure 106. PCA Capture Mode

CEXn
n = 0, 1

PCA Counter

CH

(8bits)

CL

(8bits)

CCAPnH CCAPnL

CCFn

CCON Reg

PCA
Interrupt
Request

-

0CAPPnCAPNn000 ECCFn

7

CCAPMn Register (n = 0, 1)

0