<?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 ds18b20</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50426/nrf52840-ds18b20</link><description>Hi team, 
 There is connection between nrf52840 and ds18b20. I have made simple lib for ds18b20. When i get temerature without softdevice (s140) all works correct (use 9-bit resolution), as soon as i try to use softdevice i get random value from ds18b20</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Aug 2019 15:40:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50426/nrf52840-ds18b20" /><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201959?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 15:40:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d02cb871-5c35-4ba6-9389-0db7745e3938</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;I see you&amp;#39;ve now started a separate thread on that:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50529/nrf52840-ds18b20"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50529/nrf52840-ds18b20&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201829?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 11:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72bbe011-b9e1-4afe-956e-7264d1392397</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;Hi, is it possible to use one of hardware timer (for instance timer4) to count delays for 1-wire together with BLE? If so, is it possible to setup HW timer to generate 1us period?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201473?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 09:22:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:908b0d23-ae4a-4fe0-886f-de06c76dd84f</guid><dc:creator>awneil</dc:creator><description>[quote userid="80955" url="~/f/nordic-q-a/50426/nrf52840-ds18b20/201437"] i guess the question is done[/quote]
&lt;p&gt;The please verify the answer(s):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/35655._5F00_Verify_2D00_answer_2D00_nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201437?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 08:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:771ea306-b256-42f4-9824-a505fe38c727</guid><dc:creator>Vasa</dc:creator><description>&lt;p&gt;Thanks to all, i guess the question is done,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201343?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 17:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:436ef0df-760b-4368-8a65-a0cf1ebe69f9</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;In addition to &lt;a href="https://devzone.nordicsemi.com/members/bindert"&gt;BinderT&lt;/a&gt;&amp;#39;s suggestions,&amp;nbsp;Maxim make bridge chips&amp;nbsp;to take the 1-wire timing considerations away from the &amp;quot;host&amp;quot; microcontroller:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.maximintegrated.com/en/products/interface/one-wire/bridge-your-app-to-1-wire.html"&gt;https://www.maximintegrated.com/en/products/interface/one-wire/bridge-your-app-to-1-wire.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They also have an app note on how to fake it with a UART:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.maximintegrated.com/en/app-notes/index.mvp/id/214"&gt;https://www.maximintegrated.com/en/app-notes/index.mvp/id/214&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could probably do something similar with SPI ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf52840 ds18b20</title><link>https://devzone.nordicsemi.com/thread/201340?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 17:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f289ed-91e9-476a-a28b-efc7be5f07ac</guid><dc:creator>BinderT</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Just a shot in the dark but try setting in the sdk_config.h NRF_SDH_DISPATCH_MODEL to 2 if you have not tried that.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;i&amp;gt; NRF_SDH_DISPATCH_MODEL_INTERRUPT: SoftDevice events are passed to the application from the interrupt context.
// &amp;lt;i&amp;gt; NRF_SDH_DISPATCH_MODEL_APPSH: SoftDevice events are scheduled using @ref app_scheduler.
// &amp;lt;i&amp;gt; NRF_SDH_DISPATCH_MODEL_POLLING: SoftDevice events are to be fetched manually.
// &amp;lt;0=&amp;gt; NRF_SDH_DISPATCH_MODEL_INTERRUPT 
// &amp;lt;1=&amp;gt; NRF_SDH_DISPATCH_MODEL_APPSH 
// &amp;lt;2=&amp;gt; NRF_SDH_DISPATCH_MODEL_POLLING 

#ifndef NRF_SDH_DISPATCH_MODEL
#define NRF_SDH_DISPATCH_MODEL 2
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The problem is that this BLE needs &lt;span&gt;specific&lt;/span&gt; timings and thus most of the highest priority&amp;nbsp;level interrupts are taken by the softdevice, so this will mess with the bit-bang approach of the one-wire protocol. You will save yourself a lot of headache by adding in another micro (or some &lt;span&gt;protocol converter&lt;/span&gt;); ATtiny series comes to mind; and use that to pass the data to the NRF via uart, spi or twi.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>