<?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 MicrocontrollersのトピックRe: losing my mind over i2c interfacing to 24lc00 eeprom</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225066#M4361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd make a better test. I would write address in address (e.g.. 1=1 2=2 etc) for all 16 locations, read it back then test it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think you should test for NACK instead of the delay,otherwise it may only work under some conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 19:02:42 GMT</pubDate>
    <dc:creator>JimDon</dc:creator>
    <dc:date>2013-03-15T19:02:42Z</dc:date>
    <item>
      <title>losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225046#M4341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using PE example, got communication between FRDM board and 24LC00 but can't seem to write a read accurately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I do a block write then block read using typical example for I2C component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volatile bool DataReceivedFlg = FALSE;&lt;/P&gt;&lt;P&gt;volatile bool DataTransmittedFlg = FALSE;&lt;/P&gt;&lt;P&gt;uint8_t OutData[4] = {0x00U, 0x01U, 0x02U, 0x03U};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initialization of output data buffer */&lt;/P&gt;&lt;P&gt;uint8_t InpData[16];&lt;/P&gt;&lt;P&gt;LDD_TError Error;&lt;/P&gt;&lt;P&gt;LDD_TDeviceData *MyI2CPtr;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38944i07962C127837A5B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First picture is writing of data to device, only two values the first being address zero, second data value of 1.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Second picture is writing of control word and address zero to device in prep of reading&lt;/P&gt;&lt;P&gt;Third picture is the read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jiveImage" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 05:35:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225046#M4341</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-14T05:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225047#M4342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A href="https://community.nxp.com/people/steve_fae"&gt;steve_fae&lt;/A&gt;&lt;/STRONG&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What problem you are facing?&lt;/P&gt;&lt;P&gt;You have written what you did.&lt;/P&gt;&lt;P&gt;But what error you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Keshava G N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 07:02:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225047#M4342</guid>
      <dc:creator>KeshavaGN</dc:creator>
      <dc:date>2013-03-14T07:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225048#M4343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry. As I was editing the message it locked up. Basically I only read 0xff back. I've changed the timing from 93Khz down to 73Khz or so as well but it didn't help. &lt;/P&gt;&lt;P&gt;Sent from Steve Cohen's blackberry &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(818)261-1033&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 11:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225048#M4343</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-14T11:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225049#M4344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0xFF is the default state (ie: 11111111 in binary) of a byte in EEPROM (or any other storage device).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have not written any data byte to that address (or write is not successful), then 0xFF is the correct data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So first write some data to that address and try reading the same address.&lt;/P&gt;&lt;P&gt;(Or if you have already written something, make sure that it written data correctly.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Keshava G N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 11:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225049#M4344</guid>
      <dc:creator>KeshavaGN</dc:creator>
      <dc:date>2013-03-14T11:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225050#M4345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how you must write to this device:&lt;/P&gt;&lt;P&gt;1. Send the device address (0xA0 on the line) byte with RD/WR = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: IIRC PE left shifts the device address, so instead of 0xA0 you may need to set the address as 0x50 look at the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2, If nacked give up or go back to 1.&lt;/P&gt;&lt;P&gt;3. Send the&amp;nbsp; "word" address only the lower 4 bits are used.&lt;/P&gt;&lt;P&gt;4. Send the data.&lt;/P&gt;&lt;P&gt;5. Send stop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACKNOWLEDGE POLLING&lt;/P&gt;&lt;P&gt;loop on sending 1. and getting a NACK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://ww1.microchip.com/downloads/en/DeviceDoc/21178H.pdf" title="http://ww1.microchip.com/downloads/en/DeviceDoc/21178H.pdf"&gt;http://ww1.microchip.com/downloads/en/DeviceDoc/21178H.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 13:13:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225050#M4345</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-14T13:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225051#M4346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jim, if you look at my attached scope shots its all there.&amp;nbsp; I am getting the ACKs and I believe the s.w. creates the correct START and STOP sequences.&amp;nbsp; But I am definitely missing something.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 18:27:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225051#M4346</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-14T18:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225052#M4347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not seeing an attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 18:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225052#M4347</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-14T18:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225053#M4348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim, you must view my original message under activity vs. inbox.&amp;nbsp; Viewing it in the inbox view, you don't see any attachments.&amp;nbsp; That was driving me crazy when I first started using this community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 18:38:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225053#M4348</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-14T18:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225054#M4349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, I see - well I see you write the control byte and address but I don't see a read on the scope.&lt;/P&gt;&lt;P&gt;The read should send the control byte (as a read) the read a byte, so you should really see 4 bytes transferred.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 19:34:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225054#M4349</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-14T19:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225055#M4350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last picture should show the read. &lt;/P&gt;&lt;P&gt;Sent from Steve Cohen's blackberry &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(818)261-1033&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 19:51:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225055#M4350</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-14T19:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225056#M4351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not see the third trace.&lt;/P&gt;&lt;P&gt;I think that on the final read, you should test for an error. You should get a NACK because the eeprom should be still writing. It looks like you get an ACK, but still you do need to test for NACK after writing and attempting to read.&lt;/P&gt;&lt;P&gt;Just retry the read until error comes back 0 (or get the error code when the done flag is set, not sure how PE handles this). Look on page 9 of the PDF link I posted.&lt;/P&gt;&lt;P&gt;According to that a write can take 4ms.&lt;/P&gt;&lt;P&gt;Also, make Avnet get one of these: &lt;A href="http://www.saleae.com/logic"&gt; Saleae Logic&lt;/A&gt;. .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 20:37:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225056#M4351</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-14T20:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225057#M4352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The third trace was on the second page of the PPT file.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 00:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225057#M4352</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T00:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225058#M4353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I did see it.&lt;/P&gt;&lt;P&gt;As I said, even if this is not your problem, the code is logically &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;incorrect&lt;/STRONG&gt;&lt;/SPAN&gt;. After the write you &lt;STRONG&gt;MUST&lt;/STRONG&gt; check for &lt;STRONG&gt;NACK&lt;/STRONG&gt; as this is what indicates the device is still writing. You then need to resend the address write. EEPROMs are relatively slow. I have "talked" to EEPROM on I2C many times and I assure this must be done. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please read the pdf as I suggested, if you have not done so, it will make this clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you init the I2C again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I see as wrong - after the second write I don't see a stop. I also do not understand why the second write is acked, it should be&amp;nbsp; nacked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the PDF:&lt;/P&gt;&lt;P&gt;"Since the device will not acknowledge during a write&lt;/P&gt;&lt;P&gt;cycle, this can be used to determine when the cycle is&lt;/P&gt;&lt;P&gt;complete (this feature can be used to maximize bus&lt;/P&gt;&lt;P&gt;throughput). Once the Stop condition for a Write&lt;/P&gt;&lt;P&gt;command has been issued from the master, the device&lt;/P&gt;&lt;P&gt;initiates the internally timed write cycle. ACK polling&lt;/P&gt;&lt;P&gt;can be initiated immediately. This involves the master&lt;/P&gt;&lt;P&gt;sending a Start condition followed by the control byte&lt;/P&gt;&lt;P&gt;for a Write command (R/W = 0). If the device is still&lt;/P&gt;&lt;P&gt;busy with the write cycle, then no ACK will be returned.&lt;/P&gt;&lt;P&gt;If no ACK is returned, then the Start bit and control byte&lt;/P&gt;&lt;P&gt;must be re-sent. If the cycle is complete, then the&lt;/P&gt;&lt;P&gt;device will return the ACK and the master can then&lt;/P&gt;&lt;P&gt;proceed with the next Read or Write command. See&lt;/P&gt;&lt;P&gt;Figure 7-1 for flow diagram."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I recommend that you not use power point to upload as some users do not have it. If needs be, paste the images together in paint, or save as a pdf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 02:07:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225058#M4353</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-15T02:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225059#M4354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jim for your help.&amp;nbsp; I am just not used to Kinetis yet.&lt;/P&gt;&lt;P&gt;I am trying the higher level component since it breaks it down more then the LDD.&amp;nbsp; And in the typical example they actually provide typical usage for an eeprom.&amp;nbsp; The only problem is I didn't know where to enable &lt;STRONG&gt;Cpu_Delay100US(100)&lt;/STRONG&gt;; which they use in between the write and then read of the eeprom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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/38935i45E86AEF64E13824/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;here is my write&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TransmitComplete = 0;&lt;/P&gt;&lt;P&gt;err = I2C2_SelectSlave(0x50);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;buffer[0] = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //storage address&lt;/P&gt;&lt;P&gt;buffer[1] = 0x10;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //data&lt;/P&gt;&lt;P&gt;err = I2C2_SendBlock(buffer, 2, &amp;amp;sent); //send storage address and data to the EEPROM&lt;/P&gt;&lt;P&gt;while(!TransmitComplete){}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wait for communication completition, this flag set in interrupt routine&lt;/P&gt;&lt;P&gt;err = I2C2_SendStop();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Send STOP condition&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send command 0x50, address 0, data 0x10 then send stop.&amp;nbsp; Page 7 of Microchip AN974&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/38937i82F8CA0210352A99/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38939i6DE718D0AAEA24C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for read I stopped the processor then trigger scope again since I didn't feel like putzing around with s.w. delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;buffer[0] = 0;&lt;/P&gt;&lt;P&gt;err = I2C2_SendBlock(buffer, 1, &amp;amp;sent);&lt;/P&gt;&lt;P&gt;while(!TransmitComplete){}&lt;/P&gt;&lt;P&gt;err = I2C2_RecvChar(&amp;amp;data); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send command with WRITE, address withWRITE, then read&lt;SPAN style="font-size: 12pt; color: #ff0000;"&gt;&lt;STRONG&gt; but that doesn't follow the data sheet!!!!!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;&lt;STRONG&gt;after control byte sent with WRITE, then address with WRITE, need to generate START with control again and READ, then data is read correctly.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #ff0000;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #800000;"&gt;so I need to figure out how to do this with the component methods available.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38940i1F604001FC98590C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38941i88DEAFE26ADACE85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 03:03:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225059#M4354</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T03:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225060#M4355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So before crashing I tried this code instead to generate a restart during the read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3538_3538.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119166iE81E76F4DE814A65/image-size/large?v=v2&amp;amp;px=999" role="button" title="3538_3538.png" alt="3538_3538.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the restart in the middle of the READ process isn't a real START.&amp;nbsp; The control word with WRITE and address with WRITE goes out fine.&amp;nbsp; But &lt;STRONG&gt;err = I2C2_SelectSlave(0x51);&lt;/STRONG&gt; creates a mess.&amp;nbsp; Its not a valid start.&amp;nbsp; I saw a message saying using the freq divider for the i2c clock can cause problems during a restart.&amp;nbsp; Maybe there is an errata of some sort.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3558_3558.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119167iF31469FF8261CD0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="3558_3558.png" alt="3558_3558.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 03:53:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225060#M4355</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T03:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225061#M4356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Send &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;I2C2_SelectSlave(0x51);&lt;/STRONG&gt;&lt;/SPAN&gt; is way wrong. If you look at the code, it shifts it left then sets the R/W bit (if it is a read).&lt;/P&gt;&lt;P&gt;When you set 0x50, it actually goes out as 0xA0. Not sure where the idea to left shift the set slave address comes from but PE is not the only one to do it.&lt;/P&gt;&lt;P&gt;Here is the article on the silicon error, don't know if it applies to your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/12/05/kl25z-and-i2c-missing-repeated-start-condition/" title="http://mcuoneclipse.com/2012/12/05/kl25z-and-i2c-missing-repeated-start-condition/"&gt;KL25Z and I2C: Missing Repeated Start Condition | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 13:38:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225061#M4356</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-15T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225062#M4357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OMFG, I think the bug is exactly what I have been chasing.&amp;nbsp; I had to remind my old brain about I2C which took a few days, but last night it was obvious that I am experiencing the same disease. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Laughing out loud, here is my current settings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38965i0AE0B5DCC2D6807E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 16:23:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225062#M4357</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T16:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225063#M4358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I see now how 0x51 couldn't work.&amp;nbsp; Got to find which PE command does a start condition + READ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38966iE88CA98CD2FBAFDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;DeviceDataPrv-&amp;gt;SlaveAddr = (uint8_t)((uint8_t)&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Addr &amp;lt;&amp;lt; 0x01U&lt;/STRONG&gt;&lt;/SPAN&gt;); /* Set slave address */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;DeviceDataPrv-&amp;gt;SerFlag &amp;amp;= (uint8_t)~(GENERAL_CALL | ADDR_10); /* Clear the general call flag and 10-bit address mode flag */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;DeviceDataPrv-&amp;gt;SerFlag |= ADDR_7; /* Set 7-bit address mode flag */&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 17:39:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225063#M4358</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T17:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225064#M4359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should look at the PE code, I am pretty sure all that should be done there.&lt;/P&gt;&lt;P&gt;Also, now that you have fixed the repeated start condition, go back to what you had.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 17:44:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225064#M4359</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-15T17:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: losing my mind over i2c interfacing to 24lc00 eeprom</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225065#M4360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless I am cheating, I think it works now.&amp;nbsp; I just informed my two customers who are about to do the same thing what the work around it.&amp;nbsp; Thanks Jim. Now need to see what PE provides for timer delays for Kinetis like 100usec delays.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 18:52:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/losing-my-mind-over-i2c-interfacing-to-24lc00-eeprom/m-p/225065#M4360</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2013-03-15T18:52:45Z</dc:date>
    </item>
  </channel>
</rss>

