<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPCXpresso IDE中的主题 OneWire bus master implementation</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553300#M12692</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Wed Jan 19 19:30:53 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;An application that I have in mind for the LPC1343 involves a few DS18S20 temperature sensors. A quick search for a OneWire bus master solution on LPC didn't return anything much, so I set about making one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone is interested, the attached zip file contains a couple of source files that can be added to a project that needs OneWire bus master functionality. Feedback of any kind would be most welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: A new improved version is now attached to post # 7 below.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:41:53 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:41:53Z</dc:date>
    <item>
      <title>OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553300#M12692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Wed Jan 19 19:30:53 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;An application that I have in mind for the LPC1343 involves a few DS18S20 temperature sensors. A quick search for a OneWire bus master solution on LPC didn't return anything much, so I set about making one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone is interested, the attached zip file contains a couple of source files that can be added to a project that needs OneWire bus master functionality. Feedback of any kind would be most welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: A new improved version is now attached to post # 7 below.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553300#M12692</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553301#M12693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Wed Jan 19 22:04:04 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are looking for faster and more accurate temperature sensors for battery powered applications, try TSiC306 from ZMD.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.datasheetarchive.com/TSIC-306*-datasheet.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Accuracy: +- 0.3°C&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Signal read-out every 0.1s &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Communication range &amp;gt; 10 meters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used it for a battery (coin cell) long-time temperature logger and was very impressed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553301#M12693</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553302#M12694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Thu Jan 20 18:55:09 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As it happens, the DS18S20s have been part of the infrastructure for a number of years (buried in epoxy). I just want to upgrade the micro controller to LPC. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also some 1-wire I/O expanders currently in operation, but I may ditch those and use GPIO.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553302#M12694</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553303#M12695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri Jan 21 12:03:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;...infrastructure...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...sounds interesting, perhaps you could help me to understand some hardware issues about DS18S20:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - is this “parasite power” mode a reliable solution with a longer cable length (&amp;gt;10m)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - are cable lengths &amp;gt;20m possible with &amp;gt;10 DS18S20 (with reversed Schottky diode at the end)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Perhaps you are familiar with this problems and could share your experience.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Thanks, Zero&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553303#M12695</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553304#M12696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Fri Jan 21 13:16:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Zero,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the answers to both your questions are 'yes'. But you should check out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://pdfserv.maxim-ic.com/en/an/AN148.pdf&lt;/A&gt;&lt;SPAN&gt; Guidelines for Reliable Long Line 1-WireÂ® Networks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the DS18B20 can also be parasitically powered and has configurable resolution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My experience is only with a simple home project. It has about 25m of cat-5 cable ending up with a sensor on the roof. There are several short stubs for other devices along the way. The bus master driver is actually a DS2480B which is included on the original mcu board. My plan is to ditch the old mcu board and use a custom board with an LPC (most likely a 1768).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553304#M12696</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553305#M12697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri Jan 21 15:01:08 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read several PDF's from Dallas/Maxim before, but I'm always a little bit suspicious. :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I'm grateful to hear about projects with long cable length.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sooner or later I've to replace an old system (AT90CAN64 &amp;amp; DS1621) with LPC11C14 &amp;amp; LPC1768. Just ordered a few DS18S20's and so I can give your sample a try next week.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Zero&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553305#M12697</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553306#M12698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Sat Jan 29 21:44:49 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In my earlier version, I was bothered by having so many long-term blocking calls just to read one sensor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So here is an improved version that uses a Protothread to allow the main app to keep on running freely with any number of sensors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please see the example-main.c in the attached zip file to get an idea of how to use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am grateful to Adam Dunkels for providing the wonderfully elegant Protothread solution :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH]287[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553306#M12698</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553307#M12699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Jan 30 19:30:39 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Just trying to get my brand-new DS18S20 running with your first onewire example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Worked without problems (non-parasitic) after reading it's serial code and changing port pin. :):)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After changing to parasitic temp reading showed always 85 = default value. So reducing pull-up from 4.7k (at 3.3V) to 1k obviously solved the power problem of DS18S20. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you recommend a pull-up value (2-3 DS18S20, 5m wire) or do you recommend non-parasitic mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Zero&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit #1: 2x DS18S20 in parasitic mode (one of them at 50m LIYCY cable) are working also without problems with 1k pull-up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit #2: 3x DS18S20 in parasitic mode (2 of them at 50m LIYCY cable) are working with improved version. Nice piece of work and easy to use, congratulation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553307#M12699</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553308#M12700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Mon Jan 31 10:05:23 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Zero,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's great! I'm glad you got it working, and thanks for the compliments :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would definitely recommend a 1k pull up for most cases using parasitic power. Given the high quality of the cable you are using, you shouldn't have any problems. If you do see any problems, then adding an active strong pull up driven by an extra port pin would be the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The choice of parasitic vs external power I think comes down to complexity. If you have the power available, and the extra conductor in the cable, then you can avoid any problems caused by parasitic power. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I bought 10 of the DS18S20-PAR sensors several years ago, so I'm kind of stuck with parasitic power for now :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553308#M12700</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553309#M12701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Wed Feb 02 16:43:05 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could your code be used for the DS18B20 as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran it with a DS18B20 (external power mode),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; but it never returns from inside ow_srch_first()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;---------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Addon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did some more diggin'. It actually never comes back from the&amp;nbsp; first call of &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ow-&amp;gt;find_devices() -&amp;gt; ow_srch_first() -&amp;gt; ow_srch_next() -&amp;gt; ow_write(SEARCHROM)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It hangs in the while loop (ow_write) waiting for 'WR_COMPLETE'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see the TIMER16_0_IRQHandler continously called but it never does anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_TMR-&amp;gt;IR&amp;nbsp; is allways zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a&amp;nbsp; LPC1114. Is the timer interrupt handling compatible to the LPC1343?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:41:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553309#M12701</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553310#M12702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Thu Feb 03 15:21:57 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Mat,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid that don't actually have any DS18B20s, nor an LPC1114 to test with :o&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But looking at the data sheets, it [I]_should_[/I] work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try hooking up just one device to your selected port pin. Add a strongish pull up resistor to the pin, a 1k or 2k2 would be good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then try calling ow_reset() and check the presence flag. If that works, try calling the ow_read_rom() function and check that you get a sensible value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which version of the code are you using? I didn't actually test the search_rom functionality of the 'new improved' version :o .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for trying the code, I am interested to hear the results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553310#M12702</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553311#M12703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Fri Feb 04 02:24:33 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I only have one DS18B20 connected. Everything is setup on a breadboard. I am using your first version published.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ow_reset() detects a sensor (presence=1).&amp;nbsp; The next call made is ow_write( CMD_ROM, 1)&amp;nbsp; which never returns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It turns out that Timer16_0_IRQHandler is called over and over again. LPC_TMR-&amp;gt;IR=0x07 (typically or 0x01).&amp;nbsp; I added this case 0x07 to the&amp;nbsp; case WRITE: for a quick test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; case 0x07:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TMR-&amp;gt;IR = 0x07;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TMR-&amp;gt;TCR = 0x02;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ow_state = WR_COMPLETE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now at least it returns ow_write() returns.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;looks like the WRITE cases 0x02 and 0x04 are never reached!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could be a timing thing?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the LPC1114 too slow?, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;no able to handle 2us interrupts ;-((&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Timer set up properly.&amp;nbsp; TIM-&amp;gt;PR = 0x18&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553311#M12703</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553312#M12704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Fri Feb 04 12:42:55 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Mat,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmm, that's odd. For the write bit case to end up with all three interrupt flags set at the same time, something must have held up the timer ISR for more than 60uS. I will certainly have to look into modifying the code so that it handles it more gracefully and reports an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What other things do you have going on in your application? Any longish periods with interrupts disabled? Or other ISRs that take a lengthy time to complete?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you sending messages to the debugging console via semi-hosting? This is something I have never done. It may be causing the system to run too slow, just a wild guess.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553312#M12704</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553313#M12705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Fri Feb 04 13:04:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: jharwood&lt;/STRONG&gt;&lt;BR /&gt;Are you sending messages to the debugging console via semi-hosting? This is something I have never done. It may be causing the system to run too slow, just a wild guess.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right, semi-hosting wasn't working for me with your example. Changing to real UART is working without problems (DS18S20).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553313#M12705</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553314#M12706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Fri Feb 04 13:17:42 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;Right, semi-hosting wasn't working for me with your example. Changing to real UART is working without problems (DS18S20).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for confirming that Zero :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was using the USB CDC example and a virtual com port for my tests.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553314#M12706</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553315#M12707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Fri Feb 04 15:40:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;Right, semi-hosting wasn't working for me with your example. Changing to real UART is working without problems (DS18S20).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, semi-hosting is enable on my system too! I will try later and switch semi-hosting off. thanx for the hint.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553315#M12707</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553316#M12708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Sat Feb 05 13:59:36 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;disabled semihosting, but no change in behaviour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I then switched to a different port (p2.6). Beware lpc1114 owners, port 2.4 and P2.5 has a R33 resistor inline. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Though that does not affect the timing of ow_write().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I finally removed the DS18B20 completely and still the same problem!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just bit banging the port via the timer with MR0,1,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;already presents the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Receiving the first interruptLPC_TMR-&amp;gt;IR=0x01 (initiated by MR0) and then followed by next interupt where LPC_TMR-&amp;gt;IR=0x07 (where 0x02 is expected)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly ow_reset() never presented that problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then started playing with the timing parameter of ow_write().&amp;nbsp; Changing the last timing value made the difference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_TMR-&amp;gt;MR2 = 64;&amp;nbsp; (instead of 62)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is seems the difference between MR1 and MR2 needs to be greater than 2 (=2 microsec). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now all 3 interrupts are triggered as programmed, when&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;writing a single bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can only guess at this point, maybe the Cortex M0 is not as quick as the M3 (1743)?&amp;nbsp; Or this there still something else going?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But for now I can at least exercise ow_read_rom() and get some readings from the DS18B20.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553316#M12708</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553317#M12709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Sat Feb 05 18:02:56 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm glad that you were able to get it working. I guess the timing is just a little too tight while running on a 48Mhz machine, your findings certainly seem to indicate that. And I'm sure that turning on some compiler optimization would help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another idea just materialized: the ISR is repeatedly grabbing the current value of LPC_TMR-&amp;gt;IR, so as it works its way through the switch statement the value could change on the fly. It would be better to make a local copy of the IR register at the top of the ISR and use that for the switch statements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for your feedback.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553317#M12709</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553318#M12710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Sat Feb 05 22:44:30 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For test I reduced the amount of code in the IRQ func. But it did not make any difference in the behaviour. No matter how little code it was. It is not much going to begin with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except maybe case 0x04.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Changing the timing difference of between MR1 and MR2 finally made a difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly case 0x01 allways occurs on the first interrupt from ow_write(). And than something breaks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the data sheet of the DS18x20, Treq&amp;nbsp; (= MR2-MR1) is only specs by a min. of 1microsec. So it should not hurt at all to make it 10microsec or so (instead of just 2)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553318#M12710</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: OneWire bus master implementation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553319#M12711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mattes on Tue Feb 08 22:13:12 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I made a couple of changes to address the issues I was having with the LPC1114:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - extended all LPC_TMP-&amp;gt;MR2 timing&amp;nbsp; to avoid hang in Timer_IRQHandler()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - changed timing for ow_reset() to 550 ms. once in a while ow_reset() did not find the sensor signal. The previous timing was too short (too close to the spec'ed minimum in the data sheet 480ms)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - the improved timing seems to be more robust. Now the code runs even in debug mode with semi hosting enabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached 'onewire.c' is modded by me (based on your first version)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:42:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/OneWire-bus-master-implementation/m-p/553319#M12711</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:42:06Z</dc:date>
    </item>
  </channel>
</rss>

