This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F5308: ADC Multi Channel Read

Part Number: MSP430F5308

Tool/software: Code Composer Studio

Hi~

I am a beginner to the MSP430.  I am testing ADC with IAR.

Each channel of the ADC was confirmed with the help of various materials.

But I can not read more than 2 channel values.

I want to read the analog values of A1, A3, and A4 channels.

(1) Initialization part.
(2) How to call when needed within the "While (1)" function
(3) Interrupt processing part

Can you give a simple example of these three parts?

  • The closest example would appear to be MSP430F530x_adc10_10.c, which does A2-A0 (8-bit, but you can change that) in a burst using DMA. There are two considerations here:
    1) The ADC10 channel number starts at ADC10INCH and counts down to 0. So if you want to get A4 as part of a burst (CONSEQ=1), you have to do all of A4-A0, and throw away the ones you don't want. [See also User Guide (SLAU208o) Figure 27-7.]
    2) There's only one result register (ADC10MEM0), and it's unlikely your program (with CONSEQ=1) will be able to reliably grab one result before the next result overwrites it. That's why example adc10_10.c uses DMA.

    There are tricks and variations possible, but they're application-dependent.

    [Edit: Fixed typo]

**Attention** This is a public forum