Figure 15–10. sequence-of-channels mode example, 3 repeat-single-channel mode – Texas Instruments MSP430x1xx User Manual
Page 306
Conversion Modes
15-16
Figure 15–10. Sequence-of-Channels Mode Example
0140h
0142h
015Ch
015Eh
12–bit S A R
ADC12MEM0
ADC12MEM14
ADC12MEM15
16 x 12–bit
ADC Memory
ADC12MCTL0
ADC12MCTL14
ADC12MCTL15
140h + 2 x CStartAdd
80h + CStartAdd
ADC12MCTL2
0
ADC12MEM1
0
0
0
0
0144h
0146h
0148h
014Ah
0158h
015Ah
ADC12MEM12
ADC12MEM13
0
0
Conversion result 1
0154h
0156h
0150h
0152h
ADC12MEM2
ADC12MEM3
ADC12MEM4
ADC12MEM5
ADC12MCTL12
ADC12MCTL13
0 0 0 1 1
0
1
1
0 0 0 0 0
0
0
0
0 0 0 0 0
0
0
0
1 0 1 1 1
0
1
0
1 0 1 0 1
0
0
0
0 0 0 0 0
0
0
0
ADC12MCTL1
ADC12MCTL5
ADC12MCTL4
ADC12MCTL3
014Ch
014Eh
Sequence
080h
081h
08Eh
08Fh
082h
083h
084h
085h
08Ch
08Dh
08Ah
08Bh
088h
089h
086h
087h
select
Multiplexer
E
O
S
Conversion result 1
Conversion result 1
Conversion result 1
Conversion result 1
Conversion result 1
VR+/VR–
15.5.3 Repeat-Single-Channel Mode
The repeat-single-channel mode is identical to the single-channel mode, ex-
cept that conversions are repeated on the chosen channel until stopped by
software. Each time a conversion is completed, the results are loaded into the
appropriate ADC12MEMx register and the corresponding interrupt flag
ADC12IFG.x is set to indicate completion of the conversion. Additionally, If the
appropriate interrupt-enable flags are set, an interrupt request is generated
(see the
ADC12 Interrupt Vector Register ADC12IV section).
The conversion mode may be changed without first stopping the conversions.
When this is done, the new mode takes effect after the current conversion
completes (see also the
Switching Between Conversion Modes section).
There are three ways to stop repeated conversions on a single channel:
1) Select single-channel mode instead of repeat-single-channel mode with
the CONSEQ bits. When this is done, the current conversion is completed
normally, the result is loaded into ADC12MEMx, and the associated
interrupt flag ADC12IFG.x is set.
2) Reset the ENC bit (ADC12CTL0.1) to stop conversions after the current
conversion is completed. Again, the result is loaded into ADC12MEMx
and the associated interrupt flag ADC12IFG.x is set.
3) Select single-channel mode instead of repeat-single-channel mode and
then reset the enable-conversion bit (ENC). When this is done, the current
conversion stops immediately. However, the data in memory register
ADC12MEMx is unpredictable and the associated interrupt flag
ADC12IFG.x may or may not be set. This method is generally not
recommended.