starting with I2C read/write devices addressing


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default starting with I2C read/write devices addressing

    I'm just starting a project involving the use of an external EEPROM. I think about to use a 24LC64 (that's is what I could find in my drawer...).

    After ten years playing with PICs, I've still never used external mem chips before neither experimented I2C

    As a first step, on my breadboard, I put up a 16F690, a DS1307 (RTC) and the 24LC64.

    Just for the exercise, my program will read the RTC and store (kind of time stamp) it in the external memory.

    Before doing that, I found TimC's I2C device scanner just to make sure my devices "respond" correctly.

    The I2C scanner "sees" both devices (DS1207 + 24LC64) but here starts my interrogation: for each device, I get two "addresses". For the 24LC64 I get $A0 and $A1 and for the DS1307 I get $D0 and $D1.

    What does this mean?
    Roger

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: starting with I2C read/write devices addressing

    Bit 0 is RW bit, and PBP set it automatically.
    Your device address is $A0 and $D0.
    For RTC address variable MUST be byte, for your EEPROM address MUST be word. This is because PBP will send 8 or 16 address bits depending on what type variable is used, as far as I know. And RTC expect 8bit address, EEPROM 16bit.
    64K eeprom is not 64KB it is 64Kbit, which is 8192 bytes.
    Last edited by pedja089; - 18th July 2016 at 12:31.

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default starting with I2C read/write devices addressing

    This answer is loud and clear

    I'll give it a try now.

    Thanks a lot, pedja089.
    Roger

  4. #4
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: starting with I2C read/write devices addressing

    You are welcome.

Similar Threads

  1. I2C Write & Read
    By dallowgill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th June 2011, 23:06
  2. I2c write&read
    By MINHLE in forum General
    Replies: 15
    Last Post: - 5th January 2010, 23:13
  3. I2C Read and Write
    By DerekMacom in forum mel PIC BASIC
    Replies: 14
    Last Post: - 21st April 2008, 15:44
  4. A help with Write/Read a I2C memory
    By Eugeniu in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 28th March 2008, 13:53
  5. Internal EEPROM Read/write Addressing Errors with 18F PIC's
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 18
    Last Post: - 12th July 2005, 19:42

Members who have read this thread : 1

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