Tuesday, 21 July 2015

adc - MSP-EXP432 "Analog In" pin taking voltage from circuit



enter image description hereI am building a circuit consisting of a voltage divider (with a fixed resistor and a LDR or photoresistor) outputting voltage to an ADC.


I want to measure the voltage going to the ADC using an MSP-EXP432 ; however, the MSP-EXP432 "Analog In" pin is taking voltage from the circuit (i.e. the voltage going into the ADC drops when the "Analog In" pin is connected).


I set the pin as an input in the code shown below in Energia.


const int bitsOfADC = 14; // 14-bit ADC Launchpad

//int maxVal = 2^N -1;
// 2^14-1
int maxVal = 16383;
float FSV = 5.0; // Supply to 0804ADC
float LaunchPadResolution = FSV/maxVal;
int D7 = A13;
int D6 = A14;
int ADCInput = A6;
boolean D7_State = LOW;
boolean D6_State = LOW;

void setup()
{
delay(1000);
Serial.begin(9600);
pinMode(D7, INPUT);
pinMode(D6, INPUT);
analogReadResolution(bitsOfADC);
pinMode(ADCInput, INPUT);
}


Is there any way to fix this?




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...