Arduino with ISL94202 I2C communication

Hello,
I am currently working on a BMS project where I am using the Arduino Mega 2560 as my microcontroller. The BMS IC that I am currently using has I2C communication capability, but when I tried to run the code and interface with the board its returning the garbage values. The below are the details of my code that I used to check the communication of my setup:

#include<Wire.h>

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(80); //
byte error = Wire.endTransmission();

if ( error == 0)
{
Serial.println("chip found");
}
else {
Serial.println("chip not found");
}
}

void stat_MODE()
{
Wire.beginTransmission(80); // Slave address of my BMS IC is 0X50H
Wire.write(0X00); // register address
Wire.endTransmission();
Wire.requestFrom(80,7);
Serial.println("Read register3");
byte k = Wire.read();
Serial.println(k);

}

void loop() {
// put your main code here, to run repeatedly:
stat_MODE();
delay(5000);
}

Could you please tell me is there any mistake is there in my code because its always returning the garbage values

is there an #include file for the device? I just see wire.h. Most devices need a library loaded before they can be used. Libraries also include sample test code. Do THOSE work?

No, they dont have any such file or library for this IC ISL94202 sir

Open-BMS/Electronics/BMS FrontEnd/ISL94202.lib

Really? First link after googling "ISL94202 library"

1 Like

Can you please tell me what are the exact use of these libraries because in those github files I can see lots of codes and the file with extension .lib only has texts, could you please specify the exact use of the libraries

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.