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.

MSP430G2955: Using multiple ADC channels

Part Number: MSP430G2955

Hello,

I am trying to use 3 ADC channels to read in analog values into the variable ADC10MEM. I understand that sampling is done sequentially, however I am stuck on how to properly obtain and store the individual ADC readings into the proper variable. More so, if I use an interrupt to trigger during ADC10MEM conversion, how do I know which channel is being stored into the ADC variable?

Thanks

  • Use the DTC. (See also SLAU144J sec 22.2.7.) It's effectively a special-purpose DMA unit for the ADC10. I'm pretty sure one of the TI example programs uses it.

    Store an array address in ADC10SA and your channel count in ADC10DTC1; when you get the ADC10IFG the array has been filled. Re-assign ADC10SA to re-enable the DTC. Because of the way the ADC10 counts (down) the samples are in reverse order -- highest channel to lowest.

**Attention** This is a public forum