Hi Dave,

I really appreciate your patent explaination. I now understand it.
I will try another i2c chip with different address tomorrow.

On 21 December 2011 17:31, Dave Hylands [via Gumstix] <[hidden email]> wrote:

On Tue, Dec 20, 2011 at 7:49 PM, imato <[hidden email]> wrote:
> Hi Dave,
> Thanks for your reply.
> The address of 24LC01B is 1010xxxx, but 0x50 is 01010xxx. I think they are
> not the same.

You're confusing the first byte with the address. The address is only
7-bits long and happens to be in the upper 7-bits of the first byte.

So the full byte would be:

1010xxxD where D is the direction bit. The address portion is 1010xxx,
or if I replace the x's with 0's then you get 0101000 or 0x50 (another
hint is addresses need to be in the range of 0 thru 127 or 0x00 thru
0x7f. You'll notice that i2c-detect only outputs addresses that go
upto 0x7f for exactly this reason (yeah it actually stops at 0x77,
because 0x78 inidcates 10-bit addressing and the remaining values are
reserved for future use - See Section 5.2 of the SMBus 2.0
specification http://smbus.org/specs/smbus20.pdf)

10100000 is 0xA0 which is too big to be an address.

This messes up many people who start out with i2c (and is probably the
most common problem).

> I disconnected the 24LC01B chip from my circuit, and ran $ i2cdetect -y -r
> 3, I still can get 0x50 address.

That's the internal EEPROM. If you have 2 devices on the bus with the
same address everything still works until you try to read from the
devices and they return different values. Since the bus is open
collector, whoever delivers a zero bit wins.

Dave Hylands
Shuswap, BC, Canada

Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
gumstix-users mailing list
[hidden email]

If you reply to this email, your message will be added to the discussion below:
To unsubscribe from Voltage-level translator (PCA9306) in I2C communication application, click here.

View this message in context: Re: Voltage-level translator (PCA9306) in I2C communication application
Sent from the Gumstix mailing list archive at Nabble.com.