Texas Instruments MSP430x1xx User Manual

Page 321

Advertising
background image

ADC12 Control Registers

15-31

ADC12

15.8.1 Control Registers ADC12CTL0 and ADC12CTL1

All control bits of ADC12CTLx are reset during POR. Most of the control bits
in registers ADC12CTL0, ADC12CTL1, and ADC12MCTLx can only be modi-

fied if ENC is reset. These bits are marked

. All other bits can be

modified at any time.

The control bits of control register ADC12CTL0 and ADC12CTL1 are:

01A0h

ADC12CTL0

7

0

15

8

ENC

ADC12

TOVIE

ADC12

OVIE

ADC12

SC

rw–(0)

rw–(0)

rw–(0)

rw–(0)

rw–(0)

rw–(0)

rw–(0) rw–(0)

rw–(0)

rw–(0)

rw–(0) rw–(0)

rw–(0)

rw–(0)

rw–(0) rw–(0)

SHT1

SHT0

2_5V

REF

ON

MSC

ON

ADC12

ADC12SC

bit0

Sample and convert. The ADC12SC bit can be used to control the
conversion with software if ENC is set. It is recommended to have ISSH=0.
If the sampling signal SAMPCON is generated by the sampling timer
(SHP=1), changing the ADC12SC bit from 0 to 1 starts the sample-and-
conversion operation. When the A/D conversion is complete (BUSY=0) the
ADC12SC bit is automatically reset.

If the sample signal is directly controlled by ADC12SC (SHP=0), then the
high level of the ADC12SC bit defines the sample time. The conversion
starts once it is reset.

All automatic-sequence functions (CONSEQ={1,2,3}) and multiple sample-
and-conversion functions (MSC=1) are executed normally. Therefore, when
using ADC12SC the software must ensure that the frequency of the timing
of the ADC12SC bit meets the applicable timing requirements.

NOTE: The start of a conversion by software (SHS=0, in ADC12CTL1) is
possible by setting both ENC and ADC12SC control bits within one
instruction.

ENC

bit1

Enable conversion. The software (via ADC12SC) or external signals can
start a conversion only if the enable-conversion bit ENC is high. Most of the
control bits in ADC12CTL0 and ADC12CTL 1, and all bits in ADCMCTL.x
may be changed only if ENC is low.

0 : No conversion can be started. This is the initial state.
1 : The first sample and conversion starts with the first rising edge of the
SAMPCON signal. The selected operation proceeds as long as ENC is set.

CONSEQ=0, ADC12BUSY=1, ENC= 1

0:

In this mode, if ENC is reset, the current conversion is immediately stopped.
The conversion results are unpredictable.

CONSEQ

0, ADC12BUSY=x, ENC= 1

0:

In these modes, if ENC is reset, the current conversion or sequence is
completed and the conversion results are valid. The conversion activities
are stopped after the current conversion or sequence is completed.

Advertising