<?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>Examples for nRF52840 Dongle ADC Reading</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading</link><description>Hello, 
 I am using nRF52840 Dongle and I want to use AIN0 pin for reading a sensor data. I was using PIC for this kind of project(C Programming) before nRF52840. Here my questions; 
 
 1) I am new at programming nRF52840 and i need some examples for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 May 2019 12:00:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading" /><item><title>RE: Examples for nRF52840 Dongle ADC Reading</title><link>https://devzone.nordicsemi.com/thread/185952?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2902f6c9-d32f-4ed0-ad77-d064da9fda36</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;No, I have no J-Link&amp;nbsp; but i have&amp;nbsp;embedded ST-Link on my STM32F429 Development Kit. I connected ST-Link&amp;#39;s GND,VDD,SWDIO,SWDCLCK pins to nRF52840 dongle for programming it via uKeil. It didn&amp;#39;t work. I didn&amp;#39;t get any error when i was flashing blinky example but it didn&amp;#39;t work &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Examples for nRF52840 Dongle ADC Reading</title><link>https://devzone.nordicsemi.com/thread/185880?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 09:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d3ae2bd-aa24-4678-a4e1-91808c627dc5</guid><dc:creator>awneil</dc:creator><description>[quote userid="79370" url="~/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading/185875"] I must make do with dongle for a while.[/quote]
&lt;p&gt;So do you have a J-Link?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As noted, this is a complex part - trying to develop without a debugger is not advised!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(other debuggers are available)&lt;/em&gt;&lt;/p&gt;
[quote userid="79370" url="~/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading/185875"]Is this work for Dongle? [/quote]
&lt;p&gt;See:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43760/adapting-the-blinky-example-from-the-nrf52840-dk-to-the-nrf52840-dongle/171340#171340"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/43760/adapting-the-blinky-example-from-the-nrf52840-dk-to-the-nrf52840-dongle/171340#171340&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So it&amp;#39;s just the same as porting code for a PIC on one board to the same PIC on a different board - it&amp;#39;s just the external hardware dependencies which need attention.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Examples for nRF52840 Dongle ADC Reading</title><link>https://devzone.nordicsemi.com/thread/185875?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 09:07:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6dbee66-c4f8-4693-a9d1-203ea38c460e</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;Well, i tried to get DK but, because of customs duty it costs me about 250$-300$. Unfortunately, I must make do with dongle for a while. By the way i found some codes in Nordic Devzone. Is this work for Dongle? I think this is the basic one. Thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;nrf.h&amp;quot;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;nrf_drv_adc.h&amp;quot;
#include &amp;quot;nordic_common.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;app_util_platform.h&amp;quot;


static nrf_adc_value_t       adc_value; /**&amp;lt; ADC buffer. */
static nrf_drv_adc_channel_t m_channel_config = NRF_DRV_ADC_DEFAULT_CHANNEL(NRF_ADC_CONFIG_INPUT_2); 

/**
 * @brief Function for main application entry.
 */
int main(void)
{
    UNUSED_RETURN_VALUE(NRF_LOG_INIT());
    NRF_LOG_PRINTF(&amp;quot;ADC example\r\n&amp;quot;);

    while (true)
    {
        nrf_drv_adc_sample_convert(&amp;amp;m_channel_config,&amp;amp;adc_value);
        NRF_LOG_PRINTF(&amp;quot;ADC buffer: %d\r\n&amp;quot;,adc_value);
        nrf_delay_ms(100);
    }
}
/** @} */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Examples for nRF52840 Dongle ADC Reading</title><link>https://devzone.nordicsemi.com/thread/185867?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 08:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652f4650-fe88-4901-aa77-6f05ff70384d</guid><dc:creator>awneil</dc:creator><description>[quote userid="79370" url="~/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading"]I am new at programming nRF52840 [/quote]
&lt;p&gt;In that case, you should certainly be starting with the nRF52840&lt;strong&gt;-DK&lt;/strong&gt; rather than the dongle.&lt;/p&gt;
&lt;p&gt;As the name suggests, the DK is specifically designed for &lt;em&gt;&lt;strong&gt;Development&lt;/strong&gt;&lt;/em&gt; use - not least because it comes with an on-board debugger.&lt;/p&gt;
&lt;p&gt;Nearly all of the SDK examples focus on the DKs.&lt;/p&gt;
&lt;p&gt;The dongle is great as a cheap platform &lt;em&gt;once you have a working application&lt;/em&gt; - but the &lt;strong&gt;DK&lt;/strong&gt; is the place to do learning &amp;amp; development.&lt;/p&gt;
[quote userid="79370" url="~/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading"]If we compare nRF52840&amp;nbsp; with PIC, nRF52840 is very complicate[/quote]
&lt;p&gt;Which particular &amp;quot;PIC&amp;quot; are you talking about?&lt;/p&gt;
&lt;p&gt;The nRF52840 is a complete System on a Chip - &amp;quot;SoC&amp;quot; - with a high-performance, 32-bit, ARM Cortex-M4F CPU &lt;em&gt;&lt;strong&gt;plus&lt;/strong&gt; &lt;/em&gt;a complete radio susbsystem &lt;em&gt;&lt;strong&gt;plus&lt;/strong&gt;&lt;/em&gt; some pretty advanced peripherals.&lt;/p&gt;
&lt;p&gt;That is obviously going to be a lot more complicated that a simple little 8-bit microcontroller!&lt;/p&gt;
&lt;p&gt;But the basic principles remain the same.&lt;/p&gt;
[quote userid="79370" url="~/f/nordic-q-a/47047/examples-for-nrf52840-dongle-adc-reading"]it&amp;#39;s libraries are not using basic C language[/quote]
&lt;p&gt;The libraries use standard &amp;#39;C&amp;#39;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>