<?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>Kinetis Design Studio中的主题 I2C example for InternalI2C component</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/I2C-example-for-InternalI2C-component/m-p/356488#M1548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling with getting an I2C communication to work with use InternalI2C component and KL05 MCU.&lt;/P&gt;&lt;P&gt;My tools are KDS 1.1.1 with Processor Expert Software - Update for KDS v1.1.x.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not using any OS and trying to communicate (in main) with outside BMP180 pressure sensor using interrupt examples from component's help.&lt;/P&gt;&lt;P&gt;It seems that events are not triggered after I do SendBlock().&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; I2C_SelectSlave(SLAVE_ADDR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; while(TRUE) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cErr = I2C_SendBlock(READ_ID, 1U, &amp;amp;i2cRet);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!i2cTxFlag);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cTxFlag = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cErr = I2C_RecvBlock(i2cData, 1U, &amp;amp;i2cRet);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!i2cRxFlag);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cRxFlag = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any working example on how to use I2C when I need to send a register read request and read back one byte of data?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And by the way - for mentioned component slave device address is to be set as 7-bit value, so if my BMP180 sensor is told to have 0xEE address for reading and 0xEF for writing what should I pass to the SelectSlave() routine? 0x77?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for help.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2014 12:10:51 GMT</pubDate>
    <dc:creator>ky3orr</dc:creator>
    <dc:date>2014-11-20T12:10:51Z</dc:date>
    <item>
      <title>I2C example for InternalI2C component</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/I2C-example-for-InternalI2C-component/m-p/356488#M1548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling with getting an I2C communication to work with use InternalI2C component and KL05 MCU.&lt;/P&gt;&lt;P&gt;My tools are KDS 1.1.1 with Processor Expert Software - Update for KDS v1.1.x.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not using any OS and trying to communicate (in main) with outside BMP180 pressure sensor using interrupt examples from component's help.&lt;/P&gt;&lt;P&gt;It seems that events are not triggered after I do SendBlock().&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; I2C_SelectSlave(SLAVE_ADDR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; while(TRUE) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cErr = I2C_SendBlock(READ_ID, 1U, &amp;amp;i2cRet);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!i2cTxFlag);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cTxFlag = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cErr = I2C_RecvBlock(i2cData, 1U, &amp;amp;i2cRet);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!i2cRxFlag);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i2cRxFlag = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any working example on how to use I2C when I need to send a register read request and read back one byte of data?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And by the way - for mentioned component slave device address is to be set as 7-bit value, so if my BMP180 sensor is told to have 0xEE address for reading and 0xEF for writing what should I pass to the SelectSlave() routine? 0x77?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for help.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 12:10:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/I2C-example-for-InternalI2C-component/m-p/356488#M1548</guid>
      <dc:creator>ky3orr</dc:creator>
      <dc:date>2014-11-20T12:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example for InternalI2C component</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/I2C-example-for-InternalI2C-component/m-p/356489#M1549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Grzegorz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as i know Freescale doesn't have I2C pe demo code under KDS.&lt;/P&gt;&lt;P&gt;I suggest you refer according I2C processor expert sample code under CW10.6 . the pe configuration is the same.&lt;/P&gt;&lt;P&gt;C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-KL05Z48M\I2C&lt;/P&gt;&lt;P&gt;I attached it here for your convenience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Zhang Jun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 07:00:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/I2C-example-for-InternalI2C-component/m-p/356489#M1549</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-11-24T07:00:03Z</dc:date>
    </item>
  </channel>
</rss>

