I2C Read/Write problems


Results 1 to 24 of 24

Threaded View

  1. #6
    Join Date
    Mar 2008
    Location
    Texas, USA
    Posts
    114


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dispersion123 View Post
    Any suggestions on how to get the correct device address sent ($10), and read the address $22?
    If the device address is $10 then doesn't the address have to be left shifted one place?

    $10 = %00010000

    PBP handles the R/W bit (bit.0), so your sending out address %0001000R (Read or Write bit) and the address "seen" by the receiving device is %00001000

    Remember that I2C device addresses are shifted left one place to allow for the read/write bit. You'll never (edit: never say never - there are 10 bit addressing in some devices, though this is not part of the original I2C design data) see an I2C device address over $7F, or %01111111 or DEC127.

    So, I think you should be using the DEVICE ADDRESS of $20
    Last edited by JD123; - 2nd April 2008 at 23:10.
    No, I'm not Superman, but I did stay at a Holiday Inn Express last night!

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. I2C slave
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2008, 03:46
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55

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