<?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>DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49242/doubt-in-adc-configuration</link><description>HI , 
 
 I want to configure P0.02 as an adc channel . 
 I also want to read the adc value from P0.02 at regular intervals. 
 For regular intervals i will put a timer and inside the timer handler function i will call the function for reading adc value</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Jul 2019 16:45:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49242/doubt-in-adc-configuration" /><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/196332?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 16:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c9f336e-2429-4977-9f3e-6558685744c7</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;In the adc init function&amp;nbsp;&lt;em&gt;nrf_drv_saadc_buffer_convert()&lt;/em&gt;&lt;span&gt;&amp;nbsp; is calling twice . Can explain why these function is calling in the init part.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt; Is it for assigning the buffer for storing&amp;nbsp;adc value?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;When the code execution is entering to&amp;nbsp;&lt;em&gt;saadc_callback().Is it entering to&amp;nbsp;saadc_callback() after calling &amp;quot;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__drv__saadc.html#ga9e1764d8d7d10747fcf68a864618d07a"&gt;nrf_drv_saadc_sample&lt;/a&gt;&amp;nbsp;&amp;quot;&lt;/em&gt;&amp;nbsp;function or &amp;quot;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__drv__saadc.html#ga87429c85f0ae72ca731a0cc7eced5a88"&gt;nrf_drv_saadc_sample_task_get&lt;/a&gt;&amp;quot; function&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/196054?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 15:39:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb2b14e8-4799-4763-b435-500788fd7a81</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Take a look at the&amp;nbsp;&lt;em&gt;saadc_callback(), &lt;/em&gt;the SAADC input data can be found in&amp;nbsp;&lt;em&gt;p_event-&amp;gt;data.done.p_buffer[]&lt;/em&gt;&amp;nbsp;(after &lt;em&gt;nrf_drv_saadc_buffer_convert()&lt;/em&gt; is called)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/195945?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 10:49:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3613df5-7771-46f4-8993-189ebb014082</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Hi awneil&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; I just want to known from where or using which function&amp;nbsp; &amp;nbsp;we get the adc value.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The converted analog to digital value is storing to where and from where we can read it ?just tell me that&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/195939?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 10:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e164e75-ce15-49a2-b0c8-28f949bbe445</guid><dc:creator>awneil</dc:creator><description>[quote userid="76730" url="~/f/nordic-q-a/49242/doubt-in-adc-configuration/195934"]i looked it[/quote]
&lt;p&gt;Don&amp;#39;t just look it - build it, run it, and see what it does!&lt;/p&gt;
&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8105._5F00_Verify_2D00_answer_2D00_nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/195934?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 10:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f2d5e15-a16c-47bd-ad89-1a73d82f39f7</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Actually our product is 2d-3d combinational mouse .&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;so we are using &amp;quot;ble_app_hids_mouse&amp;quot; application from&amp;nbsp;&amp;nbsp;&lt;span&gt;nRF5_SDK_14.2.0_17b948a&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;so i want to configure the adc to it.&lt;/li&gt;
&lt;li&gt;[quote userid="6462" url="~/f/nordic-q-a/49242/doubt-in-adc-configuration/195930"]Have you looked at the SAADC example in the SDK ?[/quote]&lt;/li&gt;
&lt;li&gt;yes i looked it&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/p&gt;
&lt;p&gt;void saadc_init(void)&lt;br /&gt;{&lt;br /&gt; ret_code_t err_code;&lt;br /&gt; nrf_saadc_channel_config_t channel_config =&lt;br /&gt; NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);&lt;/p&gt;
&lt;p&gt;err_code = nrf_drv_saadc_init(NULL, saadc_callback);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_config);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAMPLES_IN_BUFFER);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is the above function if&amp;nbsp; enough for intilization?&lt;/li&gt;
&lt;li&gt;How we can read the adc value which function is using for it . I didn&amp;#39;t saw any function which returns converted adc value . please help me.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOUBT IN ADC CONFIGURATION</title><link>https://devzone.nordicsemi.com/thread/195930?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 10:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af0087dd-a96e-4059-a0da-0f5924d370d4</guid><dc:creator>awneil</dc:creator><description>[quote userid="76730" url="~/f/nordic-q-a/49242/doubt-in-adc-configuration"]SDK i am using &amp;quot;nRF5_SDK_14.2.0_17b948a[/quote]
&lt;p&gt;Why are you using an old SDK ?&lt;/p&gt;
&lt;p&gt;Have you looked at the SAADC example in the SDK ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>