16-bit software timer / compare mode – Rainbow Electronics T89C51RD2 User Manual

Page 28

Advertising
background image

Rev. F - 15 February, 2001

28

T89C51RD2

Figure 9. PCA Capture Mode

6.5.2. 16-bit Software Timer / Compare Mode

The PCA modules can be used as software timers by setting both the ECOM and MAT bits in the modules
CCAPMn register. The PCA timer will be compared to the module's capture registers and when a match occurs
an interrupt will occur if the CCFn (CCON SFR) and the ECCFn (CCAPMn SFR) bits for the module are both
set (See Figure 10).

CF

CR

CCON
0xD8

CH

CL

CCAPnH

CCAPnL

CCF4

CCF3

CCF2

CCF1

CCF0

PCA IT

PCA Counter/Timer

ECOMn

CCAPMn, n= 0 to 4
0xDA to 0xDE

CAPNn MATn

TOGn PWMn ECCFn

CAPPn

Cex.n

Capture

Advertising