<?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>Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6627/can-vdd-be-measured-without-routing-it-to-an-gpio</link><description>No text. It&amp;#39;s a really short question. 
 So this is a simple example: 
 NRF_ADC-&amp;gt;CONFIG = (ADC_CONFIG_RES_8bit &amp;lt;&amp;lt; ADC_CONFIG_RES_Pos) |
 (ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling &amp;lt;&amp;lt; ADC_CONFIG_INPSEL_Pos) |
 (ADC_CONFIG_REFSEL_VBG &amp;lt;&amp;lt; ADC_CONFIG_REFSEL_Pos</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2015 21:37:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6627/can-vdd-be-measured-without-routing-it-to-an-gpio" /><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23198?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 21:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:299e58d3-cbca-4101-be47-f8eaf5fd9e37</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;Yep, that&amp;#39;s exactly what I was imagining it to look from Nikolaj&amp;#39;s answer and my addition :) Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23197?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 21:31:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca4b918f-b8a2-4e9f-9346-8f6522dee461</guid><dc:creator>Erik Sanchez</dc:creator><description>&lt;p&gt;I use the following configuration to measure VDD and compare to internal reference.  No external resistor network or reference necessary:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; NRF_ADC-&amp;gt;CONFIG     = (ADC_CONFIG_RES_8bit                        &amp;lt;&amp;lt; ADC_CONFIG_RES_Pos)     |
                          (ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling &amp;lt;&amp;lt; ADC_CONFIG_INPSEL_Pos)  |
                          (ADC_CONFIG_REFSEL_VBG                      &amp;lt;&amp;lt; ADC_CONFIG_REFSEL_Pos)  |
                          (ADC_CONFIG_PSEL_Disabled                   &amp;lt;&amp;lt; ADC_CONFIG_PSEL_Pos)    |
                          (ADC_CONFIG_EXTREFSEL_None                  &amp;lt;&amp;lt; ADC_CONFIG_EXTREFSEL_Pos);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23194?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 20:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:235dd42b-f9a2-496c-bb14-66e2f404bb31</guid><dc:creator>Nikolaj</dc:creator><description>&lt;p&gt;Sorry, my bad! Of course you can do that&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23193?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 20:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be0f6818-8634-4f17-8348-2d28ba4d29ab</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;Oops. Converted it to answer by missclicking.. I am confused by &amp;quot;(you can only choose 1/3 or 2/3 of the VDD however&amp;quot; So I thought I could measure 1/3 of my supply voltage to the internal reference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23192?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 20:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9cd9117-2849-4d26-8861-20642b1210a6</guid><dc:creator>Nikolaj</dc:creator><description>&lt;p&gt;Since Internal Band Gap ref is 1.2 V and minimum VDD for most chips are 1.8 V you&amp;#39;ll always get a reading of 0xFF (if you use 8 bit). Remember when sampling, the reference is the maximum readable voltage level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23196?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 20:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0117814a-7826-4c8e-ac9f-038626e51895</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;Thanks! But can&amp;#39;t I use the Internal Band Gap reference? (As I wanted to use a 3rd Party Module which has no external reference)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can VDD be measured? (without routing it to an GPIO)</title><link>https://devzone.nordicsemi.com/thread/23195?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 20:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:826fc1c6-f387-4b59-8d7d-b20c6062b9fd</guid><dc:creator>Nikolaj</dc:creator><description>&lt;p&gt;Yes it is possible.&lt;/p&gt;
&lt;p&gt;When you setup your ADC you have the option to choose VDD on the INPSEL (you can only choose 1/3 or 2/3 of the VDD however..&lt;/p&gt;
&lt;p&gt;check out the nrf51_bitfields.h&lt;/p&gt;
&lt;p&gt;I would config it something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	//Configure ADC
	NRF_ADC-&amp;gt;CONFIG = (ADC_CONFIG_EXTREFSEL_AnalogReference0&amp;lt;&amp;lt; ADC_CONFIG_EXTREFSEL_Pos)	// AnalogRef 0 as external reference
													| (ADC_CONFIG_PSEL_Disabled&amp;lt;&amp;lt; ADC_CONFIG_PSEL_Pos)	// Disable input pin 
													| (ADC_CONFIG_REFSEL_SupplyOneThirdPrescaling &amp;lt;&amp;lt; ADC_CONFIG_REFSEL_Pos)	// Use VDD/3 as reference
													| (ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling&amp;lt;&amp;lt; ADC_CONFIG_INPSEL_Pos)	// Supply voltage with 1/3 prescaling used as input for the conversion
													| (ADC_CONFIG_RES_8bit &amp;lt;&amp;lt; ADC_CONFIG_RES_Pos);	// 8 bit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice that I&amp;#39;m using an external reference to measure the VDD, because you have to compare it to something.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>