So you have addressed location 0x10, and not written any data. The internal RAM data pointer is 16 bits long (consisting oif 2 x 8 bit bytes).Kampi wrote:Hello Guys,
i want to connect my Raspberry Pi with an PSoC I²C Slave, an 24C128 EEPROM and a PCF8574 via the I²C Bus. The communication between the PCF8574 works very fine (i use the Console first).
But the Communication with the EEPROM works not so fine. If i write a 0x10 with
i2cset -y 0 0x50 0x00 0x10
Why the extra 0x00 on the end ?into the EEPROM and read it out with
i2cget -y 0 0x50 0x00
How do you know it has failed and you have not done anything else to confuse things, how do you know the PSOC is working correctly.i recieve an 0x97. The communication with my PSoC Device fails directly. The Raspberry prints
Error: Write failed
when i write something with
i2cset -y 0 0x40 0x00 0x10
I think it´s a Problem with ACK/NACK but i´m not sure.
Here is the Datasheet of the I²C Module of my PSoC:
Can someone help me?
Right lets try and get this straight (and as in the device datasheets) EEPROM with 16 bit addressing is accessed in following wayKampi wrote:Thank you for an answer.
You are right. I forgot that the Adresspointer is 16 Bit long.
I will try it with four Databytes.
I have to set an EEPROM Start Pointer if i want to read out the EEPROM. So i write 0x00 or is it wrong?
Code: Select all
i2cset -y 0 0x50 0x00 0x00 0x01 i2cset -y 0 0x50 0x00 0x00 i2cget -y 0 0x50
When doing i2cset use 'i' for block of data on end of command.Kampi wrote:Hey,
thank you for this very good help
Yes my EEPROM has Adress 0x50. I will try it and then i try it with my PSoC.
But if i use this Command:
i2cset -y 0 0x50 0x00 0x00 0x01
My Raspberry answer
Error: Invalid mode '0x01'!
Usage: i2cset [-f] [-y] [-m MASK] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x03 - 0x77)
MODE is one of:
c (byte, no value)
b (byte data, default)
w (word data)
i (I2C block data)
s (SMBus block data)
Append p for SMBus PEC
Users browsing this forum: No registered users and 14 guests