I2C and 24LC65


Closed Thread
Results 1 to 7 of 7

Thread: I2C and 24LC65

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I wondered if that was the key to making my specific part work.
    Although in this forum, I have read in several posts that I2CRead set the LSB to 1 automatically, I have never been able to read successfully, from external memory, without setting LSB to 1 myself. Now I do it as a standard in all my codes using I2C commands.

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default I2c problem

    I think your problem is with the address for READ and WRITE.

    The 24LC64 EEPROM needs a WORD size address - even if the actual address is 0.

    Change your program to

    DEFINE B0 WORD ; Must not be a BYTE size or CONSTANT

    B0 = 0
    I2CWRITE, DataPin,ClockPin,$A0,B0,[Value]

    and so on....

    Good luck. I stuffed around with EEPROM for ages and eventualy found that all my errors were due to using BYTES when the chips expected a WORD. The spec sheet for the chip will tell you what it expects. The example in the PBP book is for a smaller EEPROM that only needs a BYTE address.

    Regards Bill Legge

  3. #3
    Join Date
    Mar 2005
    Location
    Madison, WI, USA
    Posts
    20


    Did you find this post helpful? Yes | No

    Default The EPROM problem

    Bill,

    You are absolutely correct.

    It came to me last night in a flash (pun intended.) I was re-reading the docs. and I realized I had defined the address variable as a byte type and the address of this part is a word type.

    After I had changed it everything works superbly!

    As a quick reply to Arratti: I am embarassed that I asked the question about the control word difference. At the time I replied I hadn't looked at the EPROM docs. for about two weeks. I forgot the difference in control words was due to the read/write mode.

    Rhetorical question: Isn't it amazing how elementary a problem suddenly becomes once you have figured out the solution?

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts