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.

Energia:: MSP430 F5529 LaunchPad: Serial Printing on 9600 Baud Rate just the potentiometer value

Other Parts Discussed in Thread: MSP430F5529, MSP-EXP430F5529LP

  I used Pin number 23

I used pin nnumber a3

as can be seen in user guide, the pin number

  • Potentiometer was working fine with arduino uno

  • In order to serial.println() function on eneria. You need to select COM12(Application UART) port.

    But, I am suprised the values shown are in range of 0-150. However, It is supposed to be in 0-1023 in arduino.

    Can anybody comment on it?

  • It was a problem with my potentiometer, looks like the values were not stable.

    I got 4000 range. Can I know what is the value 4050 means for: is it resitance or adc value?

    Btw, I also noticed

    2^12 bits = 4096 bits

  • Hello Adoni,

    As you noticed the MSP430F5529 has a 12 bit ADC therefore the range of the ADC value is from 0 to 4095. Based on your picture we can tell that the MSP-EXP430F5529LP is operating at 3.3 V and since the potentiometer also seems to be connected to the 3.3 V rail we expect the ADC value to represent the voltage level at the ADC pin, where 3.3 V is represented by a 4095. We can use the following equation to convert between the ADC value and the voltage it represents: voltage (mV) = ADCin*1000*3.3/4096. For example, and input of 1500 is equal to 1208 mV. Just be sure to use long variables instead of an int since the equation process can result in some large numbers.

    Regards,
    Ryan

**Attention** This is a public forum