This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ24297EVM-021: Charging Issue

Part Number: BQ24297EVM-021

Hi,

I am charging my battery with this kit but the current drawn is only 11mA. I have already changed the value of registers to get the accurate current but still didn't get any output. 

Here is my code.

#include <Wire.h>

// #define ADDR_Ax 0b101 //A2, A1, A0
// #define ADDR (0b1010 << 3) +

#define ADDR 0x6B
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.print("In setup");
  Wire.begin();
  writeI2CByte (0x00, 0b00110000);
  writeI2CByte (0x01, 0b00011011);
  writeI2CByte (0x02, 0b01100000);
  writeI2CByte (0x03, 0b00010001);
  writeI2CByte (0x04, 0b10110010);
  writeI2CByte (0x05, 0b10001100);
  writeI2CByte (0x06, 0b01110011);
  writeI2CByte (0x07, 0b01001011);
 }

void loop() {
  // put your main code here, to run repeatedly:
    readI2CByte(0x00, 1);
    delay(3000);
    // Serial.println("In loop");
    readI2CByte(0x01, 1);
    delay(3000);
    readI2CByte(0x02, 1);
    delay(3000);
    readI2CByte(0x03, 1);
    delay(3000);
    readI2CByte(0x04, 1);
    delay(3000);
    readI2CByte(0x05, 1);
    delay(3000);
    readI2CByte(0x06, 1);
    delay(3000);
    readI2CByte(0x07, 1);
    delay(3000);
    readI2CByte(0x08, 1);
    delay(3000);
     readI2CByte(0x09, 1);
    delay(3000);
  //   readI2CByte (0x02);
  //  writeI2CByte (0x05, 0x8C);
  //   readI2CByte (0x02);
  //   delay(3000);
}

void writeI2CByte(byte data_addr, byte data){
  Wire.beginTransmission(ADDR);
  Wire.write(data_addr);
  Wire.write(data);
  Wire.endTransmission();
}

byte readI2CByte(byte data_addr, unsigned int size){
  byte data = NULL;
  Wire.beginTransmission(ADDR);
  Wire.write(data_addr);
  Wire.endTransmission();
  Wire.requestFrom(ADDR, size); //retrieve 1 returned byte
  delay(1);
  Serial.print("Read REG = ");
  Serial.print(data_addr);
  while(Wire.available()){
    data = Wire.read();
    Serial.print(" Read Value = ");
    Serial.println(data, BIN);
  }
  return data;
}

Please provide solution to this problem.

Thankyou