i2c Addresses

Hi,
I am having trouble talking to a device on a selected address.

I have 2 of the same devices on the same bus, by default (Allways Valid) the address for these devices is 0x60(Read) 0x61(Write), These addresses work fine, BUT! 1 of the devices addresses has been set to a address of 0xC6 according to my calculations, but my sketch or the i2cScanner sketch will only talk to and find the device on 0x60 & 0x61.

Any ideas why Arduino will not talk to the device at that address (0xc6). Will double check the c6 address and make sure, in any case the i2cScanner will not find it at that address.

Thanks.

It would help if you gave more information.

I have 2 of the same devices

What device?

1 of the devices addresses has been set to a address of 0xC6 according to my calculations

Show us your calculations.

the i2cScanner will not find it

What does the scanner print out when both devices are attached?

Pete

Hi Pete

Device is a SP5055 ( Datasheet : http://f5ad.free.fr/Docs_ATV/SP5055.pdf )

Address calculation: 11000110 = c6

With 1 device attached, don't matter which! it finds 0x60 and 0x61, if i connect both then i2cScanner finds 0x60 and 0x61

I have 12v on p3 which should set the address to 11000110 but all it will do is ACK the Allways Valid address 11000010

Hope that helps.

When you specify an I2C address to the Arduino you only use the top 7 bits. Your value of 11000110 is the full eight bits of a read command. The address bits are 1100011 which is 0x63.

Pete

That chip has an unusual method of setting the address. It has one pin but depending upon the voltage on it this affects two address bits, the least significant two.
So why do you have the most significant bits changing when you calculate the address?
How have you fixed the voltage on pin P3?

Been poking around with the circuit, originally this chip was driven by a PIC , the circuit is all built up and comes from the factory ready to go, as i cannot program PIC's i am changing the control over to a Arduino. I think that the original code in the pic sets the voltage on this pin but im unable to check it as the pic is damaged.

I'm pretty sure its a voltage problem on p3, investigating this a little more as i dont want to just drop 2-3v on that pin, these modules are £35 a shot.

Will post back if i get a solution.

Thanks for the help on the address calculation.

Anthony.

Update,

It turned out to be voltage on p3 that was the problem. Direct input of 5v on that pin changed the address to 0x63 (write) and 0x61 (read)