<?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 sensor ADC read example questions.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26606/nrf52832-sensor-adc-read-example-questions</link><description>Hi, 
 I&amp;#39;m quite a beginner to this whole nrf52832 world and I&amp;#39;m trying to read some data from a flex sensor wired in series with another resistor connected to VCC now I understand the whole ADC init thing with the sampling res and rate but can&amp;#39;t get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Nov 2017 10:18:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26606/nrf52832-sensor-adc-read-example-questions" /><item><title>RE: nrf52832 sensor ADC read example questions.</title><link>https://devzone.nordicsemi.com/thread/104648?ContentTypeID=1</link><pubDate>Mon, 06 Nov 2017 10:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3232775f-db51-4a15-8777-bba33415de81</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The input is selected by setting the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=2_1_0_36_10_5#register.CH-0.PSELP"&gt;PSELP&lt;/a&gt;/&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=2_1_0_36_10_6#register.CH-0.PSELN"&gt;PSELN&lt;/a&gt; registers, as described in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=2_1_0_36_3#saadc_inputs"&gt;SAADC peripheral documentation&lt;/a&gt;. In the GitHub example, this happens on &lt;a href="https://github.com/andenore/NordicSnippets/blob/master/examples/saadc/main.c#L22"&gt;line 22&lt;/a&gt;. The example is using single-ended channel, and use VDD as input. You can connect any of the analog input pins by setting PSELP using the line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SAADC-&amp;gt;CH[0].PSELP = SAADC_CH_PSELP_PSELP_AnalogInputx &amp;lt;&amp;lt; SAADC_CH_PSELP_PSELP_Pos; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where &lt;code&gt;x&lt;/code&gt; is replaced by the AIN number (from 0-7). The analog input numbers correlate to GPIO pin numbers as described in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pin.html?cp=2_1_0_3#pin_assign"&gt;pin assignment documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 sensor ADC read example questions.</title><link>https://devzone.nordicsemi.com/thread/104647?ContentTypeID=1</link><pubDate>Sat, 04 Nov 2017 11:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:540f8fe0-a663-4e19-82d0-539fef6affba</guid><dc:creator>MikeLemon</dc:creator><description>&lt;p&gt;Now I&amp;#39;ve found this simpler example:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/andenore/NordicSnippets/blob/master/examples/saadc/main.c"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I can&amp;#39;t see the line of code that assigned the ADC channel to the physical pin on the board...
So I assume it now read 1/6 of ic&amp;#39;s VDD is so:&lt;/p&gt;
&lt;p&gt;How do you assign this channel 0 to a physical pin?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>