beautypg.com

Texas Instruments MSP430x1xx User Manual

Page 273

background image

Comparator_A Control Registers

14-7

Comparator_A

CARSEL, bit6:

The internal reference V

CAREF

, selected by CAREF bits,

is applied to the +terminal or –terminal.

0:

Reference is selected to the +terminal (CAEX = 0) or
–terminal (CAEX = 1)

1:

Reference is selected to the –terminal (CAEX = 0) or
+terminal (CAEX = 1)

CAEX, bit7:

The inputs of the comparator are exchanged. This is
used to measure or compensate for the offset of the
comparator.

14.3.2 Comparator_A, Control Register CACTL2

The control register CACTL2 is shown and described below.

P2CA1

P2CA0

CACTL

2.7

7

rw-(0)

CACTL

2.6

rw-(0)

CACTL

2.5

rw-(0)

rw-(0)

rw-(0)

rw-(0)

CAF

rw-(0)

CAOUT

0

r-(0)

CACTL2

05Ah

CACTL

2.4

CAOUT, bit0:

The comparator output. Writing to this bit, for example
when writing a new register value, has no affect or
negative impact.

CAF, bit1:

The comparator output filter is bypassed (CAF=0) or
switched into the output path (CAF=1).

P2CA0, bit2:

Pin to CA0

0:

The external, pin signal is not connected to the
Comparator_A

1:

The external, pin signal is connected to the
Comparator_A

P2CA1, bit3:

Pin to CA1

0:

The external, pin signal is not connected to the
Comparator_A

1:

The external, pin signal is connected to the
Comparator_A

Bits 4–7:

See device data sheet for implementation.

14.3.3 Comparator_A, Port Disable Register CAPD

Typically, the comparator input and output functions are multiplexed with
digital I/O port pins to save pin count on a device. Also, slope A/D applications
often utilize multiple digital I/O ports (for charging and discharging) to provide
multiple channels of slope A/D conversion. In these multichannel applications,
a useful feature of the digital I/O pins is the ability to disable the input buffer.
Typically, all channels except the one being converted are disabled, providing
a high-impedance input and avoiding current consumption caused by through-
put current. (See section 14.4.1)

The typical digital I/O ports on MSP430 do not have the ability to disable the
input buffer. However, on devices with the Comparator_A, the capability has
been added and is controlled with the CAPD.x bits.