<?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 iic_write in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817546#M5232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using an MMA8451 (on a breakout board) with an MSP430G2553 processor.&amp;nbsp; From the MMA8451&amp;nbsp;Application Notes I see many uses of "IIC_Write()" commands.&amp;nbsp; Are these pseudo-code instructions or is there a preferred library that I can use with those same commands?&lt;/P&gt;&lt;P&gt;BTW, I have already completed the project on an Arduino platform using the 'wire.h' library and that worked perfectly.&amp;nbsp; I would prefer something similar for the MSP.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2018 03:37:07 GMT</pubDate>
    <dc:creator>markross-smith</dc:creator>
    <dc:date>2018-09-12T03:37:07Z</dc:date>
    <item>
      <title>iic_write</title>
      <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817546#M5232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using an MMA8451 (on a breakout board) with an MSP430G2553 processor.&amp;nbsp; From the MMA8451&amp;nbsp;Application Notes I see many uses of "IIC_Write()" commands.&amp;nbsp; Are these pseudo-code instructions or is there a preferred library that I can use with those same commands?&lt;/P&gt;&lt;P&gt;BTW, I have already completed the project on an Arduino platform using the 'wire.h' library and that worked perfectly.&amp;nbsp; I would prefer something similar for the MSP.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 03:37:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/iic-write/m-p/817546#M5232</guid>
      <dc:creator>markross-smith</dc:creator>
      <dc:date>2018-09-12T03:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: iic_write</title>
      <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817547#M5233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid NXP does not provide any MMA8451Q code examples or library for&amp;nbsp;TI's MSP430&amp;nbsp;MCU family.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We do have several examples mainly for NXP's Kinetis, LPC or i.MX families. Either as part of the &lt;A href="https://www.nxp.com/support/developer-resources/software-development-tools/sensor-developer-resources/sensor-toolbox-sensor-development-ecosystem/iot-sensing-software-development-kit-embedded-software-framework:IOT-SENSING-SDK"&gt;ISSDK&lt;/A&gt;&amp;nbsp;or simple&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-329568"&gt;bare-metal code examples&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remember well, the code published in MMA8451Q application notes was written for the 8-bit&amp;nbsp;MC9S08QE8 MCU and the function IIC_Write() simply writes a byte to the MMA8451Q register.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MMA8451Q uses a well known combined format that looks as follows.&lt;BR /&gt; &lt;BR /&gt; Writing to the MMA8451Q with SA0 = 0:&lt;BR /&gt; 1. Send a start sequence&lt;BR /&gt; 2. Send 0x38&amp;nbsp;&amp;nbsp;&amp;nbsp;// MMA8451Q slave address with the R/W bit low or 0x1C&amp;lt;&amp;lt;1&lt;BR /&gt; 3. Send the internal register number you want to write to&lt;BR /&gt; 4. Send the data byte&lt;BR /&gt; 5. [Optionally, send any further data bytes]&lt;BR /&gt; 6. Send the stop sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; color: #222222;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69192i1336CCCC044D40E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;Reading from the MMA8451Q &lt;SPAN&gt;with SA0 = 0&lt;/SPAN&gt;:&lt;BR /&gt; 1. Send a start sequence&lt;BR /&gt; 2. Send 0x38&amp;nbsp;&amp;nbsp;&amp;nbsp;// slave address with the R/W bit low or 0x1C&amp;lt;&amp;lt;1&lt;BR /&gt; 3. Send internal address of the register you want to read from&lt;BR /&gt; 4. Send a start sequence again (repeated start)&lt;BR /&gt; 5. Send 0x39&amp;nbsp;&amp;nbsp;&amp;nbsp;// slave address with the R/W bit high or (0x1C&amp;lt;&amp;lt;1)|0x01&lt;BR /&gt; 6. Read data byte from the addressed register&lt;BR /&gt; 7. [Optionally, read any further data bytes]&lt;BR /&gt; 8. Send NAK and the stop sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/69157iC90DB7AA397E21F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 10:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/iic-write/m-p/817547#M5233</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2018-09-13T10:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: iic_write</title>
      <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817548#M5234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response - I have a better idea now how I2C works. &amp;nbsp;However, I am still confused about the use of the I2C_Read() and I2C_Write() functions that you use in your Bare Metal examples without any apparent libraries from which they are derived. &amp;nbsp;Are they specific to the FRDM-KL25Z platform and therefore not available for the MSP430? &amp;nbsp;When I started my project using an Arduino I was able to use very similar functions contained in Wire.h, but that library does not work with the MSP430.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clue as to the I2C_Write() and _Read() functions will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 11:27:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/iic-write/m-p/817548#M5234</guid>
      <dc:creator>markross-smith</dc:creator>
      <dc:date>2018-09-13T11:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: iic_write</title>
      <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817549#M5235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, these functions are specific to the KL25Z MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume there will be similar functions available for the&amp;nbsp;MSP430&amp;nbsp;MCU family and would suggest you to&amp;nbsp;use the TI E2E community for further information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;H3&gt;&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 10:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/iic-write/m-p/817549#M5235</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2018-09-14T10:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: iic_write</title>
      <link>https://community.nxp.com/t5/Sensors/iic-write/m-p/817550#M5236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp; Ti do not have similar library functions but I have been able to write my own Transmit and Receive functions that seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 03:59:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/iic-write/m-p/817550#M5236</guid>
      <dc:creator>markross-smith</dc:creator>
      <dc:date>2018-09-20T03:59:23Z</dc:date>
    </item>
  </channel>
</rss>

