<?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: S12ZVC, I2C , removing stop bit in the sequence in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVC-I2C-removing-stop-bit-in-the-sequence/m-p/362001#M10633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;STOP signal generation is under software control: You can generate a STOP condition by writing the MS/SL bit to zero in the IBCR register. Similarly you could do a byte transfer without writing this bit to zero, and avoid generating the stop condition you want to remove. For this we need to look inside your libraries, probably inside the CI2C1_RecvChar() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 21:29:07 GMT</pubDate>
    <dc:creator>ldom</dc:creator>
    <dc:date>2014-11-11T21:29:07Z</dc:date>
    <item>
      <title>S12ZVC, I2C , removing stop bit in the sequence</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVC-I2C-removing-stop-bit-in-the-sequence/m-p/362000#M10632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to generate proper Send and Receive Message between S12ZVC (MCU) and Slave IC.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the slave IC that I used requires some special I2C protocols.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Herer are the sequences.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Write Sequence: Start -&amp;gt; Slave Address -&amp;gt; Ack(slave) -&amp;gt; Sub Address -&amp;gt; Ack(slave) -&amp;gt; Data -&amp;gt; Ack(slave) ........ -&amp;gt; Data -&amp;gt; Ack (slave) -&amp;gt; Stop.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read Sequence: Start -&amp;gt; Slave Address (LSB=0)&amp;nbsp; -&amp;gt; Ack(slave) -&amp;gt; Sub Address -&amp;gt; Ack (slave) -&amp;gt; &lt;STRONG style=": ; color: #ff0000;"&gt;Start &lt;/STRONG&gt; -&amp;gt; Slave Address (LSB=1) -&amp;gt; Ack(slave) -&amp;gt; Data -&amp;gt; Ack(master) -&amp;gt; ......Data -&amp;gt; NAck(Master) -&amp;gt; Stop&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I am using InternalI2C library. (CI2C1.c and CI2C1.h)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used &lt;/P&gt;&lt;P&gt;byte CI2C1_SendBlock(void* Ptr,word Siz,word *Snt)&lt;/P&gt;&lt;P&gt;for Write Sequence.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Herer are the codes.&lt;/P&gt;&lt;P&gt;word send;&lt;/P&gt;&lt;P&gt;word send_len;&lt;/P&gt;&lt;P&gt;send= 0x0927;&lt;/P&gt;&lt;P&gt;send_len=2U;&lt;/P&gt;&lt;P&gt;CI2C1_SelectSlave(0x48);&lt;/P&gt;&lt;P&gt;CI2C1_SendBlock(&amp;amp;send, 2U, &amp;amp;send_len);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This SendBlock makes the write sequence well.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the problem is that the read sequence requires &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: #ff0000;"&gt;No Stop bit, One single Start bit&lt;/STRONG&gt;&lt;/SPAN&gt; in the middle of the sequence.&lt;/P&gt;&lt;P&gt;Using SendBlock, and RecvChar,they generate Stop bit and Start bit, Slave Address.&lt;/P&gt;&lt;P&gt;ex)&lt;/P&gt;&lt;P&gt;Case : Master reads Slave's 0x07 data. (Slave address is 0x91 including read bit. 7-bit address is 0x48)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned char a;&lt;/P&gt;&lt;P&gt;CI2C1_SelectSlave(0x48);&lt;/P&gt;&lt;P&gt; CI2C1_SendChar(0x07);&lt;/P&gt;&lt;P&gt; CI2C1_RecvChar(&amp;amp;a);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then, the results are shown below.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start-&amp;gt; 0x90 (0x48 + Write bit:0 ) -&amp;gt; Ack(slave) -&amp;gt; 0x07 -&amp;gt; Ack(slave) -&amp;gt; &lt;STRONG style=": ; color: #ff0000;"&gt;Stop&lt;/STRONG&gt; --&amp;gt; Start -&amp;gt;0x91 (0x48 + Read bit:1) -&amp;gt; Ack(slave) -&amp;gt; DATA -&amp;gt; NAck(Master)=1 -&amp;gt; Stop&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;because of the Stop bit, the received data (DATA) are incorrect. ( the read data after the stop bit always represents initial data (0x00 address's data).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;How to remove the Stop bit?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 11:45:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVC-I2C-removing-stop-bit-in-the-sequence/m-p/362000#M10632</guid>
      <dc:creator>sungyulchu</dc:creator>
      <dc:date>2014-10-29T11:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVC, I2C , removing stop bit in the sequence</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVC-I2C-removing-stop-bit-in-the-sequence/m-p/362001#M10633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;STOP signal generation is under software control: You can generate a STOP condition by writing the MS/SL bit to zero in the IBCR register. Similarly you could do a byte transfer without writing this bit to zero, and avoid generating the stop condition you want to remove. For this we need to look inside your libraries, probably inside the CI2C1_RecvChar() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 21:29:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVC-I2C-removing-stop-bit-in-the-sequence/m-p/362001#M10633</guid>
      <dc:creator>ldom</dc:creator>
      <dc:date>2014-11-11T21:29:07Z</dc:date>
    </item>
  </channel>
</rss>

