<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF52832, NRF_SAADC negative values</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72434/nrf52832-nrf_saadc-negative-values</link><description>I played around with the SAADC sampling A4 pin. When I connect to GND, I see negative values sometimes. If I connect to 3.3V I see value 235/236 which is, what I expect. 
 Further I see a high negative value at first sample. 
 Since I set the ADC to 8</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Mar 2021 14:16:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72434/nrf52832-nrf_saadc-negative-values" /><item><title>RE: NRF52832, NRF_SAADC negative values</title><link>https://devzone.nordicsemi.com/thread/298421?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 14:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6448ec7-e208-4a1b-9c4a-ad87e8c9d72f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]Is there an error in my declaration?[/quote][quote user=""]What can I do to avoid the strange value of sample 0?[/quote]
&lt;p&gt;It is recommended that you always perform a calibration upon initialization of the SAADC, and when the ambient temperature has changed more then 10 C in either direction. Other than that, you configuration looks alright. Please keep &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_86.html"&gt;Errata 86 for the nRF52832 in mind&lt;/a&gt;&amp;nbsp;when doing this, as it may produce an invalid initial sample.&lt;/p&gt;
[quote user=""]Since I set the ADC to 8 Bit, I expect a 8 Bit value, -128....127 or 0...255.[/quote][quote user=""]If I connect to 3.3V I see value 235/236 which is, what I expect.[/quote]
&lt;p&gt;This sounds correct to me as well - as expected. &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fsaadc.html&amp;amp;anchor=concept_kxz_4pp_qr"&gt;Your current input range is 0 - 3.6 V&lt;/a&gt;. When you connect it to 3.3 V, that should yield something close to 235 as its output.&lt;/p&gt;
&lt;p&gt;Regarding the occasional -1 value you see when sampling GND, &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12287/nrf52-saadc-noise#post-id-70166"&gt;you should always account for some LSB of noise&lt;/a&gt;, which in this case could cause you to see slightly negative values when measuring ground.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>