<?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>Related to ADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40898/related-to-adc</link><description>Dear nordic, 
 i want to create a low power current consumption ADC. i don&amp;#39;t need adc value in every time. my need is just take adc value and disable it. 
 whenever i want ADC value just enable and take value after it&amp;#39;s disable. 
 here ADC used with softdevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Dec 2018 10:36:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40898/related-to-adc" /><item><title>RE: Related to ADC</title><link>https://devzone.nordicsemi.com/thread/161391?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 10:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8768eadc-ce2e-4ec1-9413-a2fc2bf6fccc</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;If you are using USB as power supply, the 5 V will be regulated down to 3.3 V through an on-board voltage regulator. Then, a voltage drop will be added due to reverse voltage protection diodes, which will result in a VDD of&amp;nbsp;roughly 3 V. (I measured a VDD of 2.9 volt on my nRF52832 DK). A solution can be to disconnect the USB, and use an external power supply.&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: Related to ADC</title><link>https://devzone.nordicsemi.com/thread/160978?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 12:30:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd09bf0d-72f3-490d-aeef-3940cb85c620</guid><dc:creator>Alan Ajit</dc:creator><description>&lt;p&gt;Hii Simon,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s works fine below 3V but above 3V its not get proper ADC reading&lt;/p&gt;
&lt;p&gt;Is it any mistake in my procedure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Related to ADC</title><link>https://devzone.nordicsemi.com/thread/160961?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 12:06:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b76125d-bba9-4f66-b522-7ab7a37a3dad</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry for the long delay. Have you been able to figure it out? If not I will look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Related to ADC</title><link>https://devzone.nordicsemi.com/thread/159150?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 06:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d71eaf17-df76-4803-b093-2130e3b5a75a</guid><dc:creator>Alan Ajit</dc:creator><description>&lt;p&gt;i implemented adc as per example. problem i face here is when i give 3.3 v its showing only 2.7 v why adc behave like this?&lt;/p&gt;
&lt;p&gt;other thing i observed that below 3v&amp;nbsp; works fine .ie when i apply below 3 v ADC voltage get perfect. why i can&amp;#39;t get voltage above 3 volt?&lt;pre class="ui-code" data-mode="c_cpp"&gt;void saadc_init(void)
{

ret_code_t err_code;
    nrf_drv_saadc_config_t saadc_config;
    nrf_saadc_channel_config_t channel_config;


	
    //Configure SAADC
    saadc_config.low_power_mode = true;                                                   //Enable low power mode.
    saadc_config.resolution = NRF_SAADC_RESOLUTION_12BIT;                                 //Set SAADC resolution to 12-bit. This will make the SAADC output values from 0 (when input voltage is 0V) to 2^12=2048 (when input voltage is 3.6V for channel gain setting of 1/6).
    saadc_config.oversample = SAADC_OVERSAMPLE;                                           //Set oversample to 4x. This will make the SAADC output a single averaged value when the SAMPLE task is triggered 4 times.
    saadc_config.interrupt_priority = APP_IRQ_PRIORITY_LOW;                               //Set SAADC interrupt to low priority.
	
    //Initialize SAADC
    err_code = nrf_drv_saadc_init(&amp;amp;saadc_config, saadc_callback);                         //Initialize the SAADC with configuration and callback function. The application must then implement the saadc_callback function, which will be called when SAADC interrupt is triggered
    APP_ERROR_CHECK(err_code);
		
    //Configure SAADC channel
    channel_config.reference = NRF_SAADC_REFERENCE_INTERNAL;                              //Set internal reference of fixed 0.6 volts
    channel_config.gain = NRF_SAADC_GAIN1_6;                                              //Set input gain to 1/6. The maximum SAADC input voltage is then 0.6V/(1/6)=3.6V. The single ended input range is then 0V-3.6V
    channel_config.acq_time = NRF_SAADC_ACQTIME_10US;                                     //Set acquisition time. Set low acquisition time to enable maximum sampling frequency of 200kHz. Set high acquisition time to allow maximum source resistance up to 800 kohm, see the SAADC electrical specification in the PS. 
    channel_config.mode = NRF_SAADC_MODE_SINGLE_ENDED;                                    //Set SAADC as single ended. This means it will only have the positive pin as input, and the negative pin is shorted to ground (0V) internally.
    channel_config.pin_p = NRF_SAADC_INPUT_AIN1;                                          //Select the input pin for the channel. AIN0 pin maps to physical pin P0.02.
    channel_config.pin_n = NRF_SAADC_INPUT_DISABLED;                                      //Since the SAADC is single ended, the negative pin is disabled. The negative pin is shorted to ground internally.
    channel_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;                              //Disable pullup resistor on the input pin
    channel_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;                              //Disable pulldown resistor on the input pin

	
    //Initialize SAADC channel
    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_config);                            //Initialize SAADC channel 0 with the channel configuration
    APP_ERROR_CHECK(err_code);
		
    if(SAADC_BURST_MODE)
    {
        NRF_SAADC-&amp;gt;CH[0].CONFIG |= 0x01000000;                                            //Configure burst mode for channel 0. Burst is useful together with oversampling. When triggering the SAMPLE task in burst mode, the SAADC will sample &amp;quot;Oversample&amp;quot; number of times as fast as it can and then output a single averaged value to the RAM buffer. If burst mode is not enabled, the SAMPLE task needs to be triggered &amp;quot;Oversample&amp;quot; number of times to output a single averaged value to the RAM buffer.		
    }

    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0],SAADC_SAMPLES_IN_BUFFER);    //Set SAADC buffer 1. The SAADC will start to write to this buffer
    APP_ERROR_CHECK(err_code);

    
    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1],SAADC_SAMPLES_IN_BUFFER);    //Set SAADC buffer 2. The SAADC will write to this buffer when buffer 1 is full. This will give the applicaiton time to process data in buffer 1.
    APP_ERROR_CHECK(err_code);


}


void saadc_callback(nrf_drv_saadc_evt_t const * p_event)
{
    if (p_event-&amp;gt;type == NRF_DRV_SAADC_EVT_DONE)
    {
        ret_code_t err_code;

        err_code = nrf_drv_saadc_buffer_convert(p_event-&amp;gt;data.done.p_buffer, SAMPLES_IN_BUFFER);
        APP_ERROR_CHECK(err_code);

        int i;
       // NRF_LOG_INFO(&amp;quot;ADC event number: %d&amp;quot;, (int)m_adc_evt_counter);

        for (i = 0; i &amp;lt; SAMPLES_IN_BUFFER; i++)
        {
           // NRF_LOG_INFO(&amp;quot;%d&amp;quot;, p_event-&amp;gt;data.done.p_buffer[i]);
        }
        m_adc_evt_counter++;
    }
		ADC_VALUE= (((p_event-&amp;gt;data.done.p_buffer[0] * 0.6) / (4096-1)) / 0.1666);
	

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I need a support to rectify it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Related to ADC</title><link>https://devzone.nordicsemi.com/thread/159102?ContentTypeID=1</link><pubDate>Mon, 26 Nov 2018 16:49:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca255b7d-c6ea-4afb-a0b5-4582d974ee07</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27167/adc-conversion-using-4096hz-for-nrf52832-chip"&gt;Here&lt;/a&gt;&amp;nbsp;is a case that demonstrates how to trigger ADC sampling from RTC events. Be aware that RTC0 is blocked when the SoftDevice is enabled (See chapter 7.1 of the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/pdf/S132_SDS_v6.2.pdf"&gt;S132 SoftDevice Specification&lt;/a&gt;). Using RTC1 will work fine.&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></channel></rss>