Reading ADC value as 65535 instead of 0

Hi 

I was trying to read the adc value from a basic voltage divider circuit, I'm using the example program given in the nrf sdk. I'm able to read it correctly in all possible situations for except if I provide 0V as input voltage, I get the max value of 65535 since I assigned it to a 16-bit variable. I can't understand why this issue occurs, have I  missed anything, can someone help me with this.

Thanks in advance,

Best Regards

Nithya

Parents Reply
  • Hi Kenneth,

    Yes, I just wanted to use eight flex sensors which would possibly consume high current, so just planned to set only one GPIO high and configure all other GPIOs as open drain and make it a cycle, so when I make it open drain I read 65535, when I changed it to signed the values where in negative I think that is the issue. Is there any possibility to reduce this variation.

    Regards

    Nithya

Children
Related