beautypg.com

Texas Instruments MSP430x1xx User Manual

Page 309

background image

Conversion Modes

15-19

ADC12

An illustration of repeat-sequence-of-channels mode is shown in
Figure 15–12.

Figure 15–12. Repeat-Sequence-of-Channels Mode

ADC12

off

x = CStartAdd

Wait for Enable

ENC =

Wait for Trigger

Sample, Input

Channel Defined in

ADC12MCTLx

ENC =

ENC =

SHS = 0

and

ENC =

and

ADC12SC =

SAMPCON =

SAMPCON = 1

Convert, Use

12 x ADC12CLK

SAMPCON =

< 12 x ADC12CLK

Conversion
Completed,

Result Stored Into

ADC12MEMx,

ADC12IFG.x is Set

1 x ADC12CLK

ADC12ON = 1

CONSEQ = 3

MSC = 1

and

SHP = 1

and

(ENC = 1

or

EOS.x = 0)

ENC = 0

and

EOS.x = 1

(MSC = 0

or

SHP = 0)

and

(ENC = 1

or

EOS.x = 0)

If EOS.x = 1 then x = CStartAdd

else {if x < 15 then x = x + 1

else x = 0}

If EOS.x = 1 then x = CStartAdd

else {if x < 15 then x = x + 1

else x = 0}

15.5.5 Switching Between Conversion Modes

Changing the mode of operation of the ADC12 while the converter is not ac-
tively running is done simply by selecting the new mode of operation with the
CONSEQ bits. However, if the conversion mode is changed while the convert-
er is actively running, intermediate and undesirable modes can be accidentally
selected if both CONSEQ bits are changed in a single instruction. Therefore,
the following mode changes should be avoided while the converter is running:
0

3, 1

2, 2

1, and 3

0.