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?
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?
Hello,
When I connect pin 2 with VDD on header P1, output is range of 830-840.
What is your SAADC configuration, and what is the range of the voltage you are trying to measure?
I suppose if you are using 10 bit resolution with an input range of 0 - 3.6V, and you are measuring a voltage of 3 V, like VDD, you should expect to see SAADC output values around ~850.
What is the range and how can I decode it?
You can calculate your input range by using the formula in the SAADC documentation.
Best regards,
Karl
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
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