BR24Lxxx chip for ink waste cartridge

Hi i have this chip

looks like a i2c chip, is it possible to read the data from it and write some new data?
its for a waste cartridge for a label printer. It says i need to change it but iv opened it and cleaned it so i want to reset the chip. Thanks for the help in advance :smiley:

looks like a i2c chip, is it possible to read the data from it and write some new data?

Yes, that's possible. The linked datasheet tells you how to do it.

its for a waste cartridge for a label printer. It says i need to change it but iv opened it and cleaned it so i want to reset the chip.

Do you know what content you have to write to "reset" it?

Hi Pylon and thanks for answering :), no i dont know what to write, i was hoping i could dump the information and try to decipher it, maybe just alter it a little and then write info to it.

I have no idea where to start in the code to get the chip to dump the info :S.

From what i understand from the datasheet i can use the arduino 5v and sda scl directly, cause it can take 5v?

When i look at the other stuff in the datasheet i just get confused, i would like to learn how to. If you can give me a pointer for how to read the values so i can get an example of how to do it i would appreciate it a lot :slight_smile:

From what i understand from the datasheet i can use the arduino 5v and sda scl directly, cause it can take 5v?

Correct.

If you can give me a pointer for how to read the values so i can get an example of how to do it i would appreciate it a lot

Start with reading this page.

pylon:
Correct.

Start with reading this page.

Thx i read it and i tried all the sketches with the right address 0x54

i removed the part where it writes to the eeprom cause i want to know whats on it. i cant get any good data out of it.

iv read the datasheet many times but i dont understand it either :frowning:

Hi, iv watched some tutorials and tried a little more, i came up with this code

#include <Wire.h>

#define ADDRESS 0x54

void setup() {
  Serial.begin(115200);
  Serial.println("STARTED");
  Wire.begin();

  delay(15);

  //eepromWrite(0,0,125); 
  //delay(5);

 

}

void loop() {

  Serial.println("STARTED READING");
  Serial.println(eepromRead(0,0));
  Serial.println("FINISHED READING");

}

void eepromWrite(byte highAddress, byte lowAddress, byte data){
  //control byten er i hardwaren ikke tenk på det.
  Wire.beginTransmission(ADDRESS);
  Wire.write(highAddress);
  Wire.write(lowAddress);  
  Wire.write(data); 
  //Wire.write(data2); 
  Wire.endTransmission(); 
}


byte eepromRead(byte highAddress, byte lowAddress){

  Wire.beginTransmission(ADDRESS); 
  //Wire.write(highAddress); 
  //Wire.write(lowAddress);  
  Wire.write('H'); 
  Wire.endTransmission(); 

  //Wire.requestFrom(ADDRESS,0); 

  while(!Wire.available()){ 
  
  }

  return Wire.read();



}

random read cycle seams to be the easiest way to read from it, but it just hangs, it does not return anything. and what does the datasheet mean by "it is necessary to input 'H' to the last ACK"?

edit: Oh forgot to mention that the i2c scanner sketch returns
"Scanning...
I2C device found at address 0x54 !
done"

what does the datasheet mean by "it is necessary to input 'H' to the last ACK"?

That just means the standard I2C behavior to send a NAK to terminate a read request.

random read cycle seams to be the easiest way to read from it, but it just hangs, it does not return anything

Because the code doesn't implement a read command as documented in the datasheet.

Which exact type are you using (not all are handled equally)?

ok :slight_smile:

im not sure really so i took a picture :slight_smile:

1.jpg

Looks like you have a BR24L02W.

So the read routine should look like this:

int16_t eepromRead(byte address){

  Wire.beginTransmission(ADDRESS);
  Wire.write(address);
  if (Wire.endTransmission(false)) {
    return -2;
  }

  if (Wire.requestFrom(ADDRESS,1) != 1) {
    return -1;
  }

  return Wire.read();
}

In my opinion there is an error in the datasheet. The types BR24L04/08/16-W are listed to have one address byte but I think they must have two, otherwise you aren't able to address each byte directly and the datasheet doesn't mention such blocks. But as your chip has only 256 byte of memory this shouldn't be relevant.

Remember that you won't be able to write to the chip if the pin 7 is connected to Vcc.

Thanks! :slight_smile:

i used your code like this.

#include <Wire.h>

#define ADDRESS 0x54

void setup() {
  Serial.begin(115200);
  Wire.begin();
  delay(15);

  for (int i=0; i <= 255; i++){
      Serial.print(eepromRead(i));
      Serial.print(",");
      delay(10);
   }
 
  

}

void loop() {
  // put your main code here, to run repeatedly:

}


int16_t eepromRead(byte address){

  Wire.beginTransmission(ADDRESS);
  Wire.write(address);
  if (Wire.endTransmission(false)) {
    return -2;
  }

  if (Wire.requestFrom(ADDRESS,1) != 1) {
    return -1;
  }

  return Wire.read();
}

it returned

ran it once

246,255,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,180,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,

then once more

246,255,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,180,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,250,246,242,252,248,244,254,

it returned the same twice so it seems legit? or is it just random bytes?

i think i can get access to a new one and check what it puts out.