<?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>nrf9160 adc</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64162/nrf9160-adc</link><description>Dear Sir 
 
 I am trying to work with the ADC . 
 
 Attached a code 
 
 I get the lines 
 
 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample 13772 00&amp;gt; Adc sample</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jul 2020 08:57:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64162/nrf9160-adc" /><item><title>RE: nrf9160 adc</title><link>https://devzone.nordicsemi.com/thread/261907?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 08:57:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:093a9b05-4b4e-46b3-abd3-6592fbd40836</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No worries. Glad to hear its working!&lt;/p&gt;
&lt;p&gt;It looks like you have a variation of 30 LSB (0x762 - 0x73f).&lt;/p&gt;
&lt;p&gt;This could be due to tolerance in resistors and the NTC itself. This can be checked using an oscilloscope on the signal itself to see how much it varies.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried connecting a constant voltage directly to the ADC pin to see if that also varies?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 adc</title><link>https://devzone.nordicsemi.com/thread/261884?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 06:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ed4ae53-1906-48aa-b69a-c6c5c086def4</guid><dc:creator>ephraim</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You are correct , I am embarrassed .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now it is working&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I change the resolution to 12 bits&amp;nbsp; . #define ADC_RESOLUTION 12&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The reading is fluctuates&amp;nbsp;&lt;/p&gt;
&lt;p&gt;00&amp;gt; Adc sample 74f &lt;br /&gt;00&amp;gt; Adc sample 74a &lt;br /&gt;00&amp;gt; Adc sample 74b &lt;br /&gt;00&amp;gt; Adc sample 74f &lt;br /&gt;00&amp;gt; Adc sample 749 &lt;br /&gt;00&amp;gt; Adc sample 74b &lt;br /&gt;00&amp;gt; Adc sample 74f &lt;br /&gt;00&amp;gt; Adc sample 755 &lt;br /&gt;00&amp;gt; Adc sample 73f &lt;br /&gt;00&amp;gt; Adc sample 748 &lt;br /&gt;00&amp;gt; Adc sample 74b &lt;br /&gt;00&amp;gt; Adc sample 74d &lt;br /&gt;00&amp;gt; Adc sample 760 &lt;br /&gt;00&amp;gt; Adc sample 754 &lt;br /&gt;00&amp;gt; Adc sample 75c &lt;br /&gt;00&amp;gt; Adc sample 762 &lt;br /&gt;00&amp;gt; Adc sample 760 &lt;br /&gt;00&amp;gt; Adc sample 758 &lt;br /&gt;00&amp;gt; Adc sample 752 &lt;br /&gt;00&amp;gt; Adc sample 747&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please Advise&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 adc</title><link>https://devzone.nordicsemi.com/thread/261786?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2020 12:42:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03559233-993f-484a-9214-367e125e8340</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This line looks a bit suspicious:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;adc_result = &amp;amp;m_sample_buffer[0];&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What type is adc_result? If its not a pointer, you will assign it the address of m_sample_buffer[0]. Based on the printout, it might look like that is the case? Which value does m_sample_buffer hold?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>