ADC interfacing problem

7 posts / 0 new
Last post
hrg
Offline
Last seen:2 years 3 months ago
Guru
加入:2014-08-05 13:37
ADC interfacing problem

Hi Dialog team

Currently am trying to interface a thermistor to the ADC input of DA14580-01.The supply for the thermistor is 1.5 volts which is connected to a standard 10k resistor and the voltage divider output is given to adc. Since it is a 10 bit ADC ,now at standard temperature 25C the adc value should be half of 1023 (i.e 511 or nearby that range), So here are the following problems faced

while using Port 0.0 the adc value is always zero !
So i tried with Port 0.1 ,it return some values which seems to be very low than expected ( some adc range of 175 ),then with port 0.2 it is giving again low value of 350 range ,then with port0.3 the ble is not at all advertising !!

here is the code snippet i used

int adc_read_P01_channel( )
{
int adc_sample;

// ADC INIT

adc_init(GP_ADC_SE,0);// Single ended mode

adc_enable_channel(ADC_CHANNEL_P03);

adc_sample = adc_get_sample();

adc_disable();
return (adc_sample);
}

After checking the ADC port pins ,found that Port 0.0 measures 0.0 , port 0.1 - 0.016v , port 0.2 - 2.8 volts ! & port 3.0 - 2.00volts !! Why these ADC input pins are in different voltages ??
Is there anything to be initialised before adc is to be used ??
The board is operating in Boost mode ! If this is the condition, then how to get the accurate adc value ?

Please reply asap !

hrg
Offline
Last seen:2 years 3 months ago
Guru
加入:2014-08-05 13:37
Dialog Team awaiting for

Dialog Team awaiting for your response .

JE_Dialog
Offline
Last seen:2 days 10 hours ago
工作人员
加入:2013-12-05 14:02
Hello hrg, there is an

Hello hrg, there is an example below and a thread containing a working example of ADC reading. There is also an example in the periperhals project (battery measurement). I will have the team look into this, please be patient as it will take a day or two.

http://support.dialog-semiconductor.com/using-adc-read-port-0-pin-0-voltage

BR JE_Dialog

hrg
Offline
Last seen:2 years 3 months ago
Guru
加入:2014-08-05 13:37
Hi JE_Dialog

Hi JE_Dialog
am using the same snippet of code that you were mentioning ,but still the problem exists ! awaiting for your response.

PY_Dialog
Offline
Last seen:2 years 8 months ago
工作人员
加入:2014-08-25 09:59
Hi Hrg,

Hi Hrg,

The code you posted is very simple and I can't found issue here. From SW point of view, you need to check whether you have configured the ADC IO to other functions. As for HW(more possible), you may need to check your hardware connection, have you safely connected the desired IO pin to your thermostat input? If the pin is floating, it will show different ADC value just like you mentioned. If still not work, we may need to see your hardware schematic.

Regards!
PY

hrg
Offline
Last seen:2 years 3 months ago
Guru
加入:2014-08-05 13:37
Thankyou you PY .the

Thankyou you PY .the connections seems to be fine! i will chk wether the adc gpio pins are used for any other purpose !!

Elvis1991
Offline
Last seen:4 months 1 week ago
加入:2014-12-09 08:18
Hi I am trying to use heart

Hi I am trying to use heart rate sensor to transmit the sensor data through ADC analogy input to DK board without BLE functions. But the value always showed the same and no change at all between putting the finger on the sensor and off it. I used the code you provided. P01 is used for input and the voltage is 3.3v, I used sensor in another board and it function well. So could you please give me some suggestions? Thanks.
By the way, there is no heart rate profile. Could you please give me some hint for transmitting the data read from sensor to BLE?Sorry I am fresh man. Hope your warm-heart reply.Thank you very much.