Example: How to Use Page Write Feature of I2C EEPROMs


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Hi Sayzer.

    As the PBP manual states, the control byte must have bit 0 cleared. Is there any special reason that you have made it 1 in this command?

    I2CREAD I2C_SDA, I2C_SCL,$A1,AdrR, [STR Mem\PageSize]

    But here you still have it cleared:

    I2CWRITE I2C_SDA, I2C_SCL,$A0,AdrW,[STR Mem\PageSize]

    Regards,
    Ioannis


    Hi Ioannis,

    The way I read the data sheet of 24C512 eeprom, the write bit is 0 and the read bit is 1.
    Same as 24LC64, 24LC512 also.

    I agree that it is confusing, but it is a fact that for read operation either 0 or 1 works anyway.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,175


    Did you find this post helpful? Yes | No

    Default

    Yes, the data sheet clearly states that bit 0 defines read or write. But PBP manual on I2C commands, says that this bit must be kept at 0. May be the compiler takes care of it. Anyway, I am sure it works just fine.

    Ioannis

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PBP handle the R/W bit for you.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. EEPROM & I2C Page Write
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th May 2009, 10:18
  4. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 07:34
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 15:31

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