I tried implementing
https://github.com/andenore/NordicSnippets/blob/master/examples/temp/main.c
But i get 2.6V without connecting any of the Analog pins.
Exactly which pin is it designed for?
and why is it reading 2.6V with no input on pinA0.
I tried implementing
https://github.com/andenore/NordicSnippets/blob/master/examples/temp/main.c
But i get 2.6V without connecting any of the Analog pins.
Exactly which pin is it designed for?
and why is it reading 2.6V with no input on pinA0.
Hello,
It is true as @hmolesworth says, if you look at the lines of code he shared you will see that the SAADC channel measures the VDD using single-ended input.
Let me know if anything still should be unclear!
As a side note, it seems the link you meant to post is the SAADC sample, not the TEMP sensor sample which you linked in your ticket.
Best regards,
Karl
P.S Thank you @hmolesworth for your swift reply!
Yes, sorry for the mistake.
Can you tell me how to read from pin A0, using this code?
Yes, sorry for the mistake.
Can you tell me how to read from pin A0, using this code?
NRF_SAADC->CH[0].PSELP = PSELP_AnalogInput0 << SAADC_CH_PSELP_PSELP_Pos;
Thank you very much. That is helpful