<?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のトピックRe: I2C example problem</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548876#M10728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Tue Oct 08 00:18:20 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you read the data sheet of your EEPROM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can write up to 8 bytes at once (page write operation). Then you must wait 32ms until you can write/read again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:56:51 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:56:51Z</dc:date>
    <item>
      <title>I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548875#M10727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Genesy on Mon Oct 07 10:01:43 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Good morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the I2C project example for write an I2C EEprom like PCF8594. If I write only 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;byte all it's ok, but if i write 100 byte it doesn't work. In the example there is a delay after&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;write with this note:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"/* Be careful with below fixed delay. From device to device, or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; even same device with different write length, or various I2C clock,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; below delay length may need to be changed accordingly. Having&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; a break point before Write/Read start will be helpful to isolate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; the problem. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; for ( i = 0; i &amp;lt; 0x2000; i++ );/* Delay after write */"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I tried to increase this delay very much (2000000) but it doesn't work yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What can be the problem? How is possible to calculate the required delay?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code where I only wrapped the I2C function from the original example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
uint8_t data_to_write[MAX_DATA_READ];
&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; MAX_DATA_READ; i++ ){
&amp;nbsp;&amp;nbsp; data_to_write&lt;I&gt; = 0x00;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; state = I2CWrite(PCF8594_ADDR, 0, 2, MAX_DATA_READ, data_to_write);


&amp;nbsp; /* Be careful with below fixed delay. From device to device, or
&amp;nbsp; even same device with different write length, or various I2C clock,
&amp;nbsp; below delay length may need to be changed accordingly. Having
&amp;nbsp; a break point before Write/Read start will be helpful to isolate
&amp;nbsp; the problem. */
&amp;nbsp; for ( i = 0; i &amp;lt; 0x2000; i++ );/* Delay after write */

&amp;nbsp; /* Write SLA(W), address, SLA(R), and read one byte back. */
&amp;nbsp; uint8_t data_read[MAX_DATA_READ];
&amp;nbsp; for (i = 0; i &amp;lt; MAX_DATA_READ; i++ ){
&amp;nbsp; data_read&lt;I&gt; = 0;
&amp;nbsp; }
&amp;nbsp; state = I2CRead(PCF8594_ADDR, 0, 2, MAX_DATA_READ, data_read);
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548875#M10727</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548876#M10728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Tue Oct 08 00:18:20 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you read the data sheet of your EEPROM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can write up to 8 bytes at once (page write operation). Then you must wait 32ms until you can write/read again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548876#M10728</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548877#M10729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Tue Oct 08 00:31:42 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Or if you have problems with the waitstates you could consider fram-memory (is a little more expensive) but it has no waitstates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://http://be.farnell.com/ramtron/fm24c04b-g/fram-4k-i2c-8soic/dp/2077745"&gt;FM24C04&lt;/A&gt;&lt;SPAN&gt; is a perfect substitute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548877#M10729</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548878#M10730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Tue Oct 08 00:34:51 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you could consider to use FRAM memory. It is a little more expensive but it has no waitstates when writing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://http://be.farnell.com/ramtron/fm24c04b-g/fram-4k-i2c-8soic/dp/2077745"&gt;FM24C04B-G&lt;/A&gt;&lt;SPAN&gt; is a perfect replacement for your PCF8594 (check pinout)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548878#M10730</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548879#M10731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Genesy on Tue Oct 08 06:45:29 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&amp;nbsp; I had missed this thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Another problem that I have is when I do two consecutive write. I use a delay between two write whit a for cycle to 20000 like in the example but it doesn't work always.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I do an ack polling after write using the I2CEngine?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548879#M10731</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: I2C example problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548880#M10732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tha on Tue Oct 08 17:35:20 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You can poll the STAT register and read out the status code.&amp;nbsp; The status code will tell you if an ACK was received or not.&amp;nbsp; Refer to the I2C chapter in the User Manual.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:56:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/I2C-example-problem/m-p/548880#M10732</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:56:53Z</dc:date>
    </item>
  </channel>
</rss>

