<?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>how to set pin pull-down</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113013/how-to-set-pin-pull-down</link><description>i&amp;#39;m trying to read voltage signals from a sensor using internal ADC.When the input is not connected,there will be noise. I use differential input pins like this: 
 NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_DIFFERENTIAL(NRF_SAADC_INPUT_AIN1,NRF_SAADC_INPUT_AIN0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 Jul 2024 08:27:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113013/how-to-set-pin-pull-down" /><item><title>RE: how to set pin pull-down</title><link>https://devzone.nordicsemi.com/thread/493743?ContentTypeID=1</link><pubDate>Sat, 13 Jul 2024 08:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d78dcaa-5ad1-4dbc-a691-1a0ecea4b8a9</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi fomm,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note how&amp;nbsp;NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_DIFFERENTIAL is just an alias of &lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/group__nrfx__saadc.html#ga04f9b8be90cd2cffce581fb12a4cc077"&gt;NRFX_SAADC_DEFAULT_CHANNEL_CONFIG_DIFFERENTIAL&lt;/a&gt;&lt;span&gt;. You will see that the macro is just a helper to set your&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/structnrf__saadc__channel__config__t.html"&gt;nrf_saadc_channel_config_t&lt;/a&gt;&amp;nbsp;structure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The pull-down resistor is controlled by the &lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/structnrf__saadc__channel__config__t.html#a59748a13af1d7cacc4123629d4ee9c39"&gt;resistor_n&lt;/a&gt;&amp;nbsp;field of that structure. To set the resistor_n You can either set the nrf_saadc_channel_config_t structure on your own without the helper, or just set it later to your desired configuration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The way you can figure this out is to note from &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/saadc.html#d944e588"&gt;the SAADC peripheral documentation&lt;/a&gt; that this feature is done by a pull-down &lt;em&gt;resistor&lt;/em&gt;, enabled by the RESN bit in CH[n].CONFIG. You can then look up the keywords &amp;quot;resistor&amp;quot; or &amp;quot;pull&amp;quot; in the driver documentation or header files.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>