Rainbow Electronics AT89C5131 User Manual

Page 74

Advertising
background image

74

AT89C5131

4136A–USB–03/03

Table 55. PCA Module Modes (CCAPMn Registers)

There are two additional registers associated with each of the PCA modules. They are
CCAPnH and CCAPnL and these are the registers that store the 16-bit count when a
capture occurs or a compare should occur. When a module is used in the PWM mode
these registers are used to control the duty cycle of the output (see Table 56 and
Table 57)

ECOMn

CAPPn

CAPNn

MATn

TOGn

PWM

m

ECCF

n

Module Function

0

0

0

0

0

0

0

No Operation

X

1

0

0

0

0

X

16-bit capture by a positive-
edge trigger on CEXn

X

0

1

0

0

0

X

16-bit capture by a negative
trigger on CEXn

X

1

1

0

0

0

X

16-bit capture by a transition on
CEXn

1

0

0

1

0

0

X

16-bit Software Timer/Compare
mode.

1

0

0

1

1

0

X

16-bit High Speed Output

1

0

0

0

0

1

0

8-bit PWM

1

0

0

1

X

0

X

Watchdog Timer (module 4
only)

Advertising