Arduino Uno with Bq2085 SMBUS read

Hi All,

I am really stuck in a problem. I have Ultralife battery which is having bq2085 chip with SMBUS to know the battery discharge status. I want to interface SMBUS with UNO board.

When i am reading from the Battery am getting only -1. Below is the code, Please guide me in right direction.

#include "Wire.h"

void setup()
{
Wire.begin();
Serial.begin(9600);
}

void loop()
{
Wire.beginTransmission(0x16);//Slave address
Wire.write(0x09); //battery cell voltage register
byte readData;
Wire.requestFrom(0x16, 1);
readData= Wire.read();//should get cell voltage
Serial.println(readData);//when i print this am getting -1.
byte errorcode = Wire.endTransmission(0x16);
Serial.print("Errorcode=");Serial.println(errorcode);
}

Output what i am getting is : readData = -1 and Errorcode = 2;

Same UltraLife battery connected with evm from TI and checked, i could read all battery cell voltages, charge status and all. But when i interface with board its not working.

Wire.beginTransmission(0x16);//Slave address
 Wire.write(0x09); //battery cell voltage register
 byte readData;
 Wire.requestFrom(0x16, 1);
 readData= Wire.read();//should get cell voltage
 Serial.println(readData);//when i print this am getting -1.
 byte errorcode = Wire.endTransmission(0x16);

You don't request a reply in the middle of sending data to a device.

Awsome stuff.

Do you have some photos of the prototype? The ones on the first post don't seem to show up. Also what battery model are you using?

Regards