<?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>ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1803/adc-issue-strange-things-happen-when-measuring</link><description>Hi, 
 i am using the adc module to read 3 channels in an app_timer handler. I configure the adc each time i get into the handler to read the desired input and read it twice (first a dummy read out). I am using the pca10005 board. My issue is that no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Jun 2014 15:01:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1803/adc-issue-strange-things-happen-when-measuring" /><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7850?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2014 15:01:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46f2c411-6616-433b-b5b8-6717f6c9bf9b</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;I Ole, I cann&amp;#39;t understand why the measure would be more accurate if the 16MHz is enabled. COuld you explain? Or maybe you would say that the time spent to execute a measure is more precise with 16MHz? Thank you in advance for explaining that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7854?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2014 17:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e2b96d8-84d5-4812-a593-1350891ea61d</guid><dc:creator>Marius R.</dc:creator><description>&lt;p&gt;I don&amp;#39;t know what is going on. Either there was an issue in my project or maybe mdk mixed something up. But I got it running with xour world-class help. Thank you very much ole.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7853?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2014 16:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b30e71f4-a523-4fac-9d07-06755e24bfc0</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I just tested your code, and I can&amp;#39;t see any problems with it, so I suspect there is something else going on here. I edited my answer above to include a zip with a code project with your code. Can you test it and see what results you get with it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7852?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 12:26:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f176aaf-5673-4273-a9c6-83d6ec7f8d30</guid><dc:creator>Marius R.</dc:creator><description>&lt;p&gt;I removed (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling &amp;lt;&amp;lt; ADC_CONFIG_INPSEL_Pos) and at first it was not working but after just recompiling and downloading afterwards a couple of times it is working now. This makes me wondering a little bit.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As far as I know with the voltage levels I apply to the AIN pins this setting is necessary, isnt it?&lt;/li&gt;
&lt;li&gt;Is there an issue causing this compiler behavior? I use MDK+S110 v6.0 + SDK5.1.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7851?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 12:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f38807-3257-440a-af04-2f5bb0b666df</guid><dc:creator>Marius R.</dc:creator><description>&lt;p&gt;Sadly I do enable the adc in main()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7849?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 11:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cf9b664-32e0-47c0-8aa9-d5f601fe8911</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;You seem to lack actually enabling the ADC, by setting the ENABLE register. Try setting this before starting the conversion, and then disabling it afterwards.&lt;/p&gt;
&lt;p&gt;Also, the ADC will be more precise if you start the external 16 MHz clock before the reading. If you use the softdevice, this can be done by calling sd_clock_hfclk_request(), and then _release() afterwards. If you don&amp;#39;t use the softdevice, the same can be done with the TASKS_HFCLKSTART and HFCLKSTOP in the CLOCK peripheral.&lt;/p&gt;
&lt;p&gt;Edit: I just added your code to the ble_app_template from the SDK, and it seems to work as expected, as long as I don&amp;#39;t have anything else connected to the pins in question. Remember that AIN2-AIN4 are P0.01 to P0.03, so if you have the default setup, those will be bound high externally, on the nRFgo motherboard.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached the code I used.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/devzone_2D00_marius_2D00_adc.zip"&gt;devzone-marius-adc.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC issue (strange things happen when measuring)</title><link>https://devzone.nordicsemi.com/thread/7848?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 10:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5ceeeae-f027-46f5-8d5d-d26307e4507b</guid><dc:creator>Marius R.</dc:creator><description>&lt;p&gt;I forgot to mention, PIN_CNF is set like:
nrf_gpio_cfg_input(1,NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(2,NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(3,NRF_GPIO_PIN_NOPULL);
for AIN2,3,4. So the input buffers should be connected. I think thats right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>