<?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>NRF52840 how to change GPIO pin for SAADIC example project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55177/nrf52840-how-to-change-gpio-pin-for-saadic-example-project</link><description>The example initializes the SAADC driver and configures one channel to sample analog input 0 (GPIO pin 2). 
 I would like to know how to change analog input pin to other GPIOs like P0.00~P1.03 
 Like where in the code you change your GPIO pins? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Dec 2019 13:02:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55177/nrf52840-how-to-change-gpio-pin-for-saadic-example-project" /><item><title>RE: NRF52840 how to change GPIO pin for SAADIC example project?</title><link>https://devzone.nordicsemi.com/thread/223602?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2019 13:02:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c56def87-88f1-4f46-8e84-d4eb1f846284</guid><dc:creator>abdelali</dc:creator><description>&lt;p&gt;Hi @cpeng,&lt;/p&gt;
&lt;p&gt;To change the analog input pin been set in the example code , you need to update it in this function :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the possible values for (PIN_N) to this function :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_saadc_channel_config_t channel_config =&lt;br /&gt; NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(PIN_N);&lt;/p&gt;
&lt;p&gt;Check here :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrf__saadc__hal.html?cp=6_1_6_9_0_30_2_8#ga4adceebeae2b334a695d4aecb640fe35"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrf__saadc__hal.html?cp=6_1_6_9_0_30_2_8#ga4adceebeae2b334a695d4aecb640fe35&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And for the mapping to the nrf52840 dk , check here :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/nrf52840_DK/hw_analog_pins.html"&gt;infocenter.nordicsemi.com/.../hw_analog_pins.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Abdelali&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>