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.

adc conversion pins

Other Parts Discussed in Thread: MSP430FG4618

I'm trying to read in an analog value (actually four of them), I believe that analog to digital conversion is the only way.  I am reworking the code of the guy that worked on it before me, but i'm having trouble.

I believe i understand how to set up the conversion with the number of bits to use, clock speed, etc.  but i'm having trouble decided which port to use.  A snip of his code is:

    read0[j] = ADC12MEM0;
    read1[j] = ADC12MEM1;
    read2[j] = ADC12MEM5;
    read3[j] = ADC12MEM3;

when I read0[j] what pin in ADC12MEM0 connected to?   I'm guessing one of p6.

i'm using msp430fg4618 development board

any help anyone can give would be very helpful

Thanks

  • Andrew Noble said:
    what pin in ADC12MEM0 connected to

    The one you configured in ADC12CTL0. The datasheet tells you which analog input is on which pin (A0..A15). However, there is no fixed assignemnt between ADC12MEMx and INCHx. You can sample the same analog input on all 16 ADC12MEM registers, or any other pattern you like.

    Keep in mind that teh ADC won't sample all ADC12MEMx registers yb itself. In single ocnversion mode, only the one configured as 'start register' will be done, and in sequence mode, only form this 'start register' until the one where EOS is set in ADC12MCTLx will be sampled. Teh ADC12MCTLx rather form sort of a 'script' that the ADC12 will follow according to its configuration.

**Attention** This is a public forum