Hi I have printer which uses i2c chips in the cartridges. Unfortunately when chip counted down there are still ink left and I can not use them. I am trying to be smart and somehow reset or bypass this ink chips, or maybe emulate them. I am thinking If I can read chips when it full and then write it on the i2c eeproom then can just use this eeproom with rewriting data there so printer should every time recognize as a new chip. Any one done something like this?
How do you know that the chip is a simple EEPROM? I would expect the manufacturer to have made a bit more complicated to fool him.
Thank to reply. Yes you are correct I am not sure if it simple i2c eeproom. However It uses similar technology I managed to read this chips with standard i2c Arduino library.
So post the sketch you used to read it and the output you got!
Sorry, I have not seen yours reply.
Technically chips have 0x50 - 0x56 addresses and reading accessing to data via 0x80 address from 0 till 78 bit. every 8 bit.
There is my sketch:
...
int j=0;
for (BEGIN=0; BEGIN<=0x78; BEGIN=BEGIN+8) // access to second address byte
{
Wire.beginTransmission(address); // link to chip address 0x50 - 0x56
Wire.write(0x80); // must act as a position pointer
Wire.write(BEGIN); //second address byte
//Wire.endTransmission(false);
Wire.endTransmission();
Wire.requestFrom(address, 8); // request 8 bytes from slave
while(Wire.available()) // read from chip while available
{
j++;
c[j] = Wire.read(); // receive byte as byte
}
}
Wire.endTransmission();
// output result
int m;
for (m=0; m<=128; m++)
{
if (c[m]<=0xF) {Serial.print('x');} // add extra zero if byte = 0 for easy read
if (c[m]==0xFF) {Serial.print(' ');} // add extra zero if byte = 0 for easy read
//Serial.print(m); // print the data in HEX
//Serial.print("= "); // print the data in HEX
Serial.print(c[m], HEX); // print the data in HEX
Serial.print (' ');
}
Serial.println(' ');
m=0;
delay(200);
...
result:
E2 x0 x1 xA x5 x5 x0 x0 FF FF x0 x1 20 17 12 14 x1 x0 x0 45 x0 x0 x0 x0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF x0 x0 FF FF FF FF FF FF FF 80
x0
Problem is it reads only first 24 bytes.
I connected Logic analyser to a printer and manage to read this full value and it reading full 128 bytes.
And this is reading from analyser:
0xE2 0x00 0x01 0x0A 0x05 0x05 0x00 0x00 0xFF 0xFF 0x00 0x01 0x20 0x17 0x12 0x14 0x01 0x00 0x00 0x45 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x16 0x01 0x20 0x19 0x1B 0xB7 0x00 0x8C 0x1A 0x5D 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x85 0x00 0x12 0xFF 0x09 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x51 0x00 0x4E 0x20 0x00 0x00 0x53 0xEC 0x53 0xEC 0x53 0xEC 0x02 0x00 0x00 0x00 0x00 0x00 0x4D 0x55 0x54 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x52 0x00 0x00 0x00 0x00 0x4D 0x55 0x54 0x00 0x08 0x54 0x41 0x00 0x49 0x4D 0x50 0x50 0x2D 0x31 0x38 0x30 0x30 0x30 0x34 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF 0xFF 0xFF 0xFF 0xFF