<?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>ADC reading problem on nrf51</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14294/adc-reading-problem-on-nrf51</link><description>Hi, 
 I would like to read and update value of the characteristic received from AD pin AIN0. I already tested the following code, where I got very weird results (value is approximately 0x01EE all the time). The code was tested on PCA10005 board. I used</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jun 2016 12:14:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14294/adc-reading-problem-on-nrf51" /><item><title>RE: ADC reading problem on nrf51</title><link>https://devzone.nordicsemi.com/thread/54548?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 12:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f5daf67-9d9e-43ae-8658-0542ecd7327a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;AIN0 (P0.26/XL2) is one of the pins used for 32kHz crystal (the other is AIN1/P0.27/XL1). As described in the &lt;a href="https://www.nordicsemi.com/eng/nordic/download_resource/18799/4/95790481"&gt;user guide&lt;/a&gt; part 5.1.7, pin header P4 decides if a crystal is used or AIN0/AIN1. Adding the picture here for easier access:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4670.Capture.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;The jumper should be placed between 3 and 5.&lt;/p&gt;
&lt;p&gt;Also note that you are using VBG as reference which will saturate at 1.2V, so the voltage you are reading have to be lower than that or you have to use scaling (or else you are saturating), See &lt;a href="https://devzone.nordicsemi.com/question/100/what-is-the-maximum-input-voltage-for-the-adc/?answer=101#post-id-101"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>