<?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>NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63709/nrf52840-dk-saadc-pin-a0-reading</link><description>Hi All, 
 I am trying to use the saadc example given in nRF5_SDK_17.0.0_9d13099\examples\peripheral\saadc. 
 I have built the project and now I want to read some values from some voltages from one of the output pins in nRF52840 DK. 
 As suggested https</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2020 08:22:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63709/nrf52840-dk-saadc-pin-a0-reading" /><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/260058?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 08:22:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57156768-5070-4e7b-9145-62cd1a918f7a</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;Thank you very much for all the support!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/260052?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 08:11:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:213b1119-169f-4785-aee3-b1a66fb0eefd</guid><dc:creator>haakonsh</dc:creator><description>&lt;ol&gt;
&lt;li&gt;See&amp;nbsp;&lt;a title="aQFN73 ball assignments" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pin.html?cp=4_0_0_6_0_0#aqfn73"&gt;aQFN73 ball assignments&lt;/a&gt;&amp;nbsp;for the MCU.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&amp;quot;&lt;span&gt;Maybe since it wasn&amp;#39;t sampling from P0.03, it did not cause any damage.&amp;quot;&amp;nbsp;&lt;br /&gt;It&amp;#39;s the ESD protection diodes on the pins that are likely to be damaged, they are always present no matter the state the MCU is in.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;quot;With AIN1 defined I still get a valid reading from P0.03 now.&amp;quot;&amp;nbsp;&lt;br /&gt;Then you&amp;#39;re lucky. The ESD diodes can handle a tiny current for a very short time before they blow, they are likely degraded, but still functional.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;If it&amp;#39;s a floating pin with long traces then it&amp;#39;s likely that you&amp;#39;re capacitively coupled to other current sources. It depends on the routing of the trace.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259975?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 16:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b676729a-512a-4345-8e16-0d113c20e8d4</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_9867.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_9868.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_9869.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I have few more questions to clarify.&lt;/p&gt;
&lt;p&gt;1. The confusion happened because in my board it is printed as P0.03 (A0). Please see the attached images. So I thought&amp;nbsp;&lt;span&gt;NRF_SAADC_INPUT_AIN0 is for P0.03. In the other side of the board I see P0.02 (AREF). Is this the Pin for the channel&amp;nbsp;NRF_SAADC_INPUT_AIN0? However AIN0 is not mentioned in the pin mapping table.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. If I define&amp;nbsp;NRF_SAADC_INPUT_AIN0 as the channel, does it mean the ADC samples only from P0.02? Because initially I used P0.03 with the 5V, the reading was a low value than ~850. Maybe since it wasn&amp;#39;t sampling from P0.03, it did not cause any damage. With AIN1 defined I still get a valid reading from P0.03 now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. I observed that when I used&amp;nbsp;NRF_SAADC_INPUT_AIN2 with P0.04, I get a larger fluctuation in the reading when nothing is connected to the pin P0.04.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;info&amp;gt; app: ADC event number: 141&lt;br /&gt;&amp;lt;info&amp;gt; app: -14&lt;br /&gt;&amp;lt;info&amp;gt; app: -6&lt;br /&gt;&amp;lt;info&amp;gt; app: -2&lt;br /&gt;&amp;lt;info&amp;gt; app: -18&lt;br /&gt;&amp;lt;info&amp;gt; app: -19&lt;br /&gt;&amp;lt;info&amp;gt; app: ADC event number: 142&lt;br /&gt;&amp;lt;info&amp;gt; app: 51&lt;br /&gt;&amp;lt;info&amp;gt; app: 289&lt;br /&gt;&amp;lt;info&amp;gt; app: 517&lt;br /&gt;&amp;lt;info&amp;gt; app: 736&lt;br /&gt;&amp;lt;info&amp;gt; app: 859&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, if I connect to VDD or GND it measures the correct values. Is this normal?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot!!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259890?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 11:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d83a518c-2461-4714-accc-4a57754694ba</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;See&amp;nbsp;&lt;a title="Mapping of analog pins" href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/nrf52840_DK/hw_analog_pins.html?cp=4_0_4_7_5_0"&gt;Mapping of analog pins&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;AIN0 is&amp;nbsp;the p0.02 pin&amp;nbsp;on the opposite side of&amp;nbsp;the DK.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259853?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 09:24:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:374e674e-6489-4185-bd9d-3d7f13d127e8</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I now can see ~850 when I define&amp;nbsp;NRF_SAADC_INPUT_AIN1 in the code and use pin &amp;quot;P0.03&amp;quot; to measure VDD (3.0V).&lt;/p&gt;
&lt;p&gt;However, when I define&amp;nbsp;&lt;span&gt;NRF_SAADC_INPUT_AIN0 I am unable to measure from pin &amp;quot;P0.03&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Isn&amp;#39;t &amp;quot;A0&amp;quot; = P0.03 =&amp;nbsp;NRF_SAADC_INPUT_AIN0 ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I define&amp;nbsp;NRF_SAADC_INPUT_AIN2 in the code, I can use pin&amp;nbsp;&amp;quot;P0.04&amp;quot; to measure VDD.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259843?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 09:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9c7555d-e896-4312-b0bd-dc921dc55d2c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I measure ~850 when connected to VDD (~3.0V):&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-21c59a72af374f648b1c2a598a339223/adc.png" /&gt;&lt;/p&gt;
&lt;p&gt;With a gain of 1/6 and an internal voltage reference of 0.6V the&amp;nbsp;input voltage range is 0-3.6V, and the expected output from an 3.0V input with 10-bit resolution is 3.0/3.6 * 1024 = 853.34.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you do not see ~850 as the output when connecting the analog input to a 3V source then the pin is most likely fried.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259814?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 07:55:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a34b7dd9-2ace-43f5-85ff-c96be42d81fe</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;Hi Haakonsh,&lt;/p&gt;
&lt;p&gt;Herewith attaching my source code and the hex file. It&amp;#39;s the exact example from Nordic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/saadc_5F00_nrf.rar"&gt;devzone.nordicsemi.com/.../saadc_5F00_nrf.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank a lot!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259809?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 07:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30357f82-f30a-4008-961d-c091e19c419d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Do you mind sharing your code and the hex file you&amp;#39;ve compiled?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259753?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 16:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bdeec64-12e5-43ee-95ff-0756c8ac905a</guid><dc:creator>Radio</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Frontview.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Hi Haakonsh/ Jorg,&lt;/p&gt;
&lt;p&gt;Thanks for the reply. Hope A0 pin is not burnt even though I connected to the 5V for few seconds. I first connected A0 pin to the 3.0 V. It still did not show a valid output.&lt;/p&gt;
&lt;p&gt;I was referring to the VDD pins in nRF52840 DK highlighted in Red in the above diagram. When I measured using the Multimeter it reads 3.0V.&amp;nbsp;But ADC reading values don&amp;#39;t seems to be correct.&amp;nbsp;I simply connected a wire as shown above in Green.&lt;/p&gt;
&lt;p&gt;I am now using A1 pin. Still the same observation. Any idea what could be the reason?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259720?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 14:25:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f35bf09c-fa39-42fb-a502-db6b7aab1f66</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;There is only one VDD pin, on&amp;nbsp;&lt;a title="aQFN73 ball assignments" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pin.html?cp=4_0_0_6_0_0#aqfn73"&gt;aQFN73 ball assignments&lt;/a&gt;&amp;nbsp;it&amp;#39;s A22, on&amp;nbsp;&lt;a title="WLCSP ball assignments" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pin.html?cp=4_0_0_6_0_1#reference_mh4_tkv_1cb"&gt;WLCSP ball assignments&lt;/a&gt;&amp;nbsp;it&amp;#39;s B3. You&amp;#39;re confusing regulator decoupling pins with a supply pin.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also, Jörg is correct, you&amp;#39;ve likely fried the analog input when you supplied 5V to it, I suggest you consider it broken (for now) and use one of the other analog input pins when testing the SAADC.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 DK SAADC PIN A0 Reading</title><link>https://devzone.nordicsemi.com/thread/259713?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 13:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa2160e-d03a-4a7a-bcb2-06ba5f9053ae</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="81875" url="~/f/nordic-q-a/63709/nrf52840-dk-saadc-pin-a0-reading"]Also is it ok to connect the 5V pin to the A0 pin?[/quote]
&lt;p&gt;Nope. That will damage the chip - you must not go above VCC. See electrical and absolute maximum specs in the PS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>