<?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>topic Re: Some help with C code!!! in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143373#M6596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi peg, first of all i would like to thank you for your help about the&lt;/DIV&gt;&lt;DIV&gt;communication problem that i had. Second thanks again for your link in&lt;/DIV&gt;&lt;DIV&gt;this forum. Now I will work on it and we will see.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Jim&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2007 05:19:40 GMT</pubDate>
    <dc:creator>damitsi</dc:creator>
    <dc:date>2007-01-24T05:19:40Z</dc:date>
    <item>
      <title>Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143367#M6590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anybody knows a C code to do the communication between MC908GP32 and the sensor SHT11?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At Sensirion's site it has a sample code for 80c51 family microcontroller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 20:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143367#M6590</guid>
      <dc:creator>damitsi</dc:creator>
      <dc:date>2007-01-22T20:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143368#M6591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;What kind of interface is it?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Since the GP32 was one of the first 908 devices released, I would take a look at the 908AP32.&amp;nbsp; It's a similar device at a lower cost.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Better yet, take a look at the 9S08GT32A.&amp;nbsp; Faster, lower power and has the built in BDM (much better for debugging).&amp;nbsp; Best of all, it even cost less.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just my two cents.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;uCTechnoGeek&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2007 00:15:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143368#M6591</guid>
      <dc:creator>UcTechnoGeek</dc:creator>
      <dc:date>2007-01-23T00:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143369#M6592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;If the sample code is in C, you should not have big trouble using it with the HCs08 compiler. Could you post that sample code?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Alex R.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2007 01:38:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143369#M6592</guid>
      <dc:creator>alex_spotw</dc:creator>
      <dc:date>2007-01-23T01:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143370#M6593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi damitsi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am sure we have been here before but I can't find it. Maybe it was a slightly different part?&lt;/DIV&gt;&lt;DIV&gt;Maybe someone else remembers?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;Peg&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Found the one I was thinking of, not sure if its relevant:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=317" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=317&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Message Edited by peg on &lt;SPAN class="date_text"&gt;2007-01-23&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;07:22 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2007 05:18:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143370#M6593</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-01-23T05:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143371#M6594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The previous thread quoted by Peg is relevant to all devices in the family, including the SHT11.&amp;nbsp; The sample C code on the Sensiron website should readily adapt to the MC9(S)08 series, since it appears to simply bit-bang the I/O pins.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;You would need to define the DATA and SCK signals against the I/O you are using.&amp;nbsp; Note that, for the DATA signal, you would actually be controlling the associated DDR bit, as discussed in the earlier thread.&amp;nbsp; With this arrangement, the send data would be inverted, but the receive data would not - probably&amp;nbsp;not applicable to 80C51 devices with open drain I/O configuration.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;For example, if you were to use PTA0 for data, and PTA1 for clock -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;#define&amp;nbsp; DATA&amp;nbsp; DDRA_DDRA0&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;#define&amp;nbsp; SCK&amp;nbsp;&amp;nbsp; PTA_PTA1&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Also note the previous comments&amp;nbsp;with respect to floating point calculations done by the sample code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-01-23&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;05:05 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2007 14:59:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143371#M6594</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-01-23T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143372#M6595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi&amp;nbsp; alex_spotw, for the sample code go to&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://www.sensirion.com/en/02_sensors/03_humidity/00_humidity_temperature_sensor/02_humidity_sensor_sht11.htm" rel="nofollow" target="_blank"&gt;http://www.sensirion.com/en/02_sensors/03_humidity/00_humidity_temperature_sensor/02_humidity_sensor_sht11.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;and download the (Sample Code humidity sensor SHTxx .pdf )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for your interest&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Jim&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 05:17:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143372#M6595</guid>
      <dc:creator>damitsi</dc:creator>
      <dc:date>2007-01-24T05:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143373#M6596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi peg, first of all i would like to thank you for your help about the&lt;/DIV&gt;&lt;DIV&gt;communication problem that i had. Second thanks again for your link in&lt;/DIV&gt;&lt;DIV&gt;this forum. Now I will work on it and we will see.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Jim&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 05:19:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143373#M6596</guid>
      <dc:creator>damitsi</dc:creator>
      <dc:date>2007-01-24T05:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Some help with C code!!!</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143374#M6597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;As previously noted, the sample code from the Sensiron website uses floating point calculations for determining temperature, RH and dew point from the raw sensor data.&amp;nbsp; The use of floating point may exceed the resources of many low end MCU devices, and should be avoided, if possible.&amp;nbsp; It does seem to be feasible to use integer calculations for temperature and humidity, but not for dew point (at least not for simple coding).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The attached code would replace the calc_sth11() function of the sample code, and would provide&amp;nbsp;temperature&amp;nbsp;resolution of 0.1C, and humidity resolution of 0.1%RH, using short variables instead of float.&amp;nbsp; This code should be much less expensive of MCU resources, assuming dew point calculation is not required.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2007 09:09:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Some-help-with-C-code/m-p/143374#M6597</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-01-24T09:09:41Z</dc:date>
    </item>
  </channel>
</rss>

