I want to read around 6 analog pins, not necessarily simultaneously. I could afford some delay in between them. i am using nrf52832 dev kit with sdk 15. How do i modify the SAADC example to achieve the same because the example only reads 1 channel. i did found this thread https://devzone.nordicsemi.com/f/nordic-q-a/5561/adc-from-various-pins/19481#19481 which looks similar but i was unable to open the GitHub link provided in the thread. Can you please direct me to the relevant examples.
V(p) : voltage at input p
V(n): voltage at input n, I do not exactly understand this. What are N and P? reference voltage and input voltage?
Thanks and Regards,
This is the positive and negative inputs. I don't know exactly where you found this, but it is possible to use a different reference voltage than GND. The default setup is to use pin_n as ground (NRF_SAADC_INPUT_DISABLE).
If you want to measure the voltage between two pins, where none of them are GND, you can use pin_n = another pin, and the result will be the difference between the pins.
I was referring this post in the datasheet. In my case I only want to measure the voltage from the interfaced sensor on the analog pins. So using this formulae: my Vp would be the voltage on the pin from the sensors and Vn would be 0 if I use reference voltage as 0? does it sound right?
Yes. That is correct. If you set Vn = NRF_SAADC_INPUT_DISABLE (the default setting) it will measure the voltage difference between GND (0) and Vp.
How can i convert my adc values into float?
I do not see any result when i try to cast these values into float.