<?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>nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47547/nrf52832-how-to-set-aref-to-external-p0-02</link><description>Hello, How do I set the analog reference voltage to external pin P0.02? I&amp;#39;m using the arduino environment so I don&amp;#39;t know how to set it via those registers? I&amp;#39;m currently using this library. If it is not too much, can you share to me some code which I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 May 2019 14:00:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47547/nrf52832-how-to-set-aref-to-external-p0-02" /><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188866?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 14:00:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a31ceb9-7440-46cc-bd95-a6100768f2e5</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;If you&amp;#39;re familiar with the LM4040 then you should use that, just for the sake of reproducability.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I do not know the tolerance of the 0.6v reference, but it think it can be sufficient in your use-case.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188513?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 10:49:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b506b5c3-6c7a-45a1-bc18-bab4f9830c88</guid><dc:creator>xproto</dc:creator><description>&lt;p&gt;The LM4040 has 0.1% output tolerance so I have used it before wiith my projects with great accuracy. I need to read resistances with a 1% accuracy. What is the tolerance of 0.6v internal?&lt;br /&gt;&lt;br /&gt;The scenario is I have two prototypes for reading resistances but with the same voltage reading on voltmeter but different readings from the ADC of each board. So I suspect that maybe its from the analog reference so I want to use this external reference to see if it is really necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188484?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 09:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40a81bcc-c026-4879-b1ea-8f9caf69c1c9</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Your analog reference can be either; VDD/4, internal 0.6V reference (highly accurate), or &lt;span style="text-decoration:underline;"&gt;you can connect your&amp;nbsp;&lt;span&gt;LM4040&lt;/span&gt;&lt;span&gt;&amp;nbsp;to any analog input.&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Your &lt;span&gt;LM4040&lt;/span&gt; is&amp;nbsp;probably&amp;nbsp;less accurate than the internal 0.6V reference, and more accurate than the VDD/4 reference.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What exactly are you trying to measure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188427?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 07:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e11a39b-d473-42e2-ab63-06f0ec5ae545</guid><dc:creator>xproto</dc:creator><description>&lt;p&gt;Here is my setup, output voltage from sensing part / lower resistor on the voltage divider varies from 0-1.8v&amp;nbsp; (6x divider like that and correction A0 - A5 only of nrf52DK). AREF voltage from LM4040-2.048V. &lt;br /&gt;&lt;br /&gt;So basically I just read a voltage divider circuit in each analog port.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m still trying to understand your last reply. Sorry I&amp;#39;m still new to this nRF.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/DSC_5F00_0104.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188419?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 07:12:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b84cdc63-2344-4282-8e68-8828b49c2c47</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;AREF: &amp;quot;&lt;span&gt;You can use either positive or negative pin as the reference, depending on what numeric sign you want in your result. &amp;quot;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can use any analog pin as an analog reference. I normal single-ended operation we tie the negative pin to ground, however to use an analog reference I suggest you tie the negative pin of channel 0 to AIN0 (p0.02), and the positive to whatever signal your&amp;#39;re measuring.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188396?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 04:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a30cb2d-0a81-4567-ad72-80115332bb57</guid><dc:creator>xproto</dc:creator><description>&lt;p&gt;Correct me if i&amp;#39;m wrong. I explored the datasheet of 51822 and 52832 with the base address&lt;br /&gt;&lt;br /&gt;0x40007000&lt;br /&gt;&lt;br /&gt;ADC with nRF51822&lt;br /&gt;SSADC with nRF52832&lt;br /&gt;&lt;br /&gt;the&amp;nbsp;&lt;span&gt;nRF51822 has an option of external from the&amp;nbsp;CONFIG&lt;br /&gt;the nRF52832 has&amp;nbsp;NO option for external on each CH[x].CONFIG / see also&amp;nbsp;Figure 97:&amp;nbsp;Simplified ADC block diagram of SSADC&lt;br /&gt;&lt;br /&gt;which I conclude that the&amp;nbsp;EXTERNAL ANALOG REF&amp;nbsp;is only possible with the comparator mode and not via SAADC&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188395?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 04:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf48238d-9c5e-4253-b7de-6db933d3ef95</guid><dc:creator>xproto</dc:creator><description>&lt;p&gt;So I explored the API&amp;#39;s and HAL you link but I&amp;#39;m at lost. I can&amp;#39;t find the external reference on the nrf_saadc.h, only internal and vdd/4.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m confuse because&amp;nbsp;external ref is present with the nrf_adc.h but not with nrfx_saadc.h. So this nrf52832 uses only SAADC and not the plain ADC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188191?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 10:20:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90ac9a4a-396a-4d43-9da8-d86af9d0f017</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;In SDK15.3:&lt;br /&gt;Call&amp;nbsp;&lt;a title="nrfx_saadc_channel_init" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__saadc.html?cp=5_1_6_9_0_28_1_15#gab74892a83a2f842436fac5f1462eca6a"&gt;nrfx_saadc_channel_init&lt;/a&gt;&amp;nbsp;with a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/structnrf__saadc__channel__config__t.html"&gt;nrf_saadc_channel_config_t&lt;/a&gt;&amp;nbsp;containing the proper configuration. p0.02 is AIN0, but you can use any analog input. see&amp;nbsp;&lt;a title="QFN48 pin assignments" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pin.html?cp=3_1_0_3_0#qfn48"&gt;QFN48 pin assignments&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can use either positive or negative pin as the reference, depending on what numeric sign you want in your result.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188169?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 09:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91b19d04-9edd-4acb-adef-8ddaf022113b</guid><dc:creator>xproto</dc:creator><description>&lt;p&gt;Thank you for the reply. I had already submitted an issue last April but maybe they are busy or pre occupied at the moment. &lt;br /&gt;&lt;br /&gt;Even if the code is for Segger Studio it&amp;#39;s ok. I will try to port it to arduino since they are similar, both in C/C++. I have a little bit knowledge on this stuff but not too deep yet to write my own base on the datasheet. Although right now I&amp;#39;m trying to understand their nRF51822 AREF on how it works maybe I can make it as basis.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832: how to set AREF to external (P0.02)</title><link>https://devzone.nordicsemi.com/thread/188160?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 09:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41c7aa7a-f5b1-4e32-a129-be6bc196f66c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I&amp;#39;m afraid Nordic does not support arduino. Maybe some of our users can help you.&amp;nbsp;&lt;br /&gt;I suggest you submit an issue in the github repo asking for help.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>