This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SAADC sample observations decoding

Hi Team

I have used SAADC sample. When I connect pin 2 with VDD on header P1, output is range of 830-840.

What is the range and how can I decode it?

Parents Reply Children
  • I have gone through formula. I am using default config in sample example. 10 bit resolution, gain 1/6, internal reference, single ended. 

    In the formula if I keep resolution as 10 then I can see some related values. 10 is value id and 1 is value. So we have to use value ID. Is that right?

  • Sridhar Jonnavittula said:
    I have gone through formula. I am using default config in sample example. 10 bit resolution, gain 1/6, internal reference, single ended. 

     Thank you for clarifying.

    Sridhar Jonnavittula said:
    In the formula if I keep resolution as 10 then I can see some related values. 10 is value id and 1 is value. So we have to use value ID. Is that right?

     You can configure the resolution (and all other configs) using the provided type for this, in this case nrf_saadc_resolution_t. If you want to change the resolution to 12 bit, for example, you would set it to NRF_SAADC_RESOLUTION_12BIT.

    You should not manipulate the registers simultaneously as you are using the driver, since this may place the driver in an invalid state and break it.

    Best regards,
    Karl

Related