<?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>Interfacing of DS18B20 with nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69100/interfacing-of-ds18b20-with-nrf52840</link><description>Hello All, 
 I&amp;#39;m interfacing a temperature sensor ds18b20 with nFR52840, which uses one wire protocol. 
 I&amp;#39;m using this repo https://github.com/DSysoletin/nrf52_ds18b20_example to read the sensor. 
 To read the sensor correctly - I have to connect an</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Dec 2020 14:33:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69100/interfacing-of-ds18b20-with-nrf52840" /><item><title>RE: Interfacing of DS18B20 with nRF52840</title><link>https://devzone.nordicsemi.com/thread/283347?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 14:33:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cd84218-418c-478f-a7aa-04770b47bb9f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;p&gt;To read the sensor correctly - I have to connect an external pul up resistor - 4.7k, 10k, 15k - all works fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Connecting an external resistor is making assembly difficult and will add to BOM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, I&amp;#39;m trying to enable internal pull ups available in nFRF52840 chip which is approax 11k. But I&amp;#39;m not able to read sensor by enabling internal pull up.&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Do you have access to a logic analyzer?&lt;br /&gt;It would be very helpful to have a look at a trace of the communication, to see what might be the difference between the two configurations.&lt;/p&gt;
[quote user=""]&lt;p&gt;In the above mentioned repo, I&amp;#39;m replacing&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf_gpio_cfg_input&lt;/span&gt;&lt;span&gt;(DS18B20PIN, NRF_GPIO_PIN_NOPULL);&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;with&amp;nbsp;&lt;/p&gt;
&lt;div style="overflow:auto;"&gt;&lt;pre&gt;nrf_gpio_cfg_input(DS18B20PIN,NRF_GPIO_PIN_PULLUP);&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can anyone point out the reason why is it not working ?&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Does the sensor&amp;#39;s datasheet mention anything about the required waveform on the received signal?&lt;br /&gt;Could it be that it is expecting / sensing for a steep transition from high to low, which is not necessarily the case, since when the code moves to do a write it reconfigures the pin to output ( thus disabling the pullup ), before being set to 0. So, the transition will go from floating to GND, not from VDD to GND.&lt;br /&gt;This should be very easy to verify with a logic trace of the communication.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>