hi,
I am interfacing MSP430g2212 controller with bq27510-G2 fuel gauge through USI-i2c master mode.
I have taken an example code from "http://processors.wiki.ti.com/index.php/I2C_Communication_with_USI_Module"
Based on that ,I have added 16bi read/write API .
If i try to get DEVICE_TYPE from fuel gauge, i am getting always 0xFF10. But if the datasheet of "fuel gauge" says , DEVICE_TYPE like 0x0510 should get.
CRO CAPTURED I2C (PLS ref attached wave form & Code)
S 0xAA A 0x00 A 0x01 A 0x00 A S 0xAB A 0x10 A 0xFF A P
Code snaps:
if(write_reg16(0x00, 0x0001) != TRUE)
{
__no_operation(); // for debugger
}
dataX=0;
// read out DOUTZ register
if(read_reg16(0x00, &dataX) != TRUE)
{
__no_operation(); // for debugger
}
Queries:
1) I would like to know whether i am getting right thing or wrong.
2) Is there any possible ways to test the driver ?
Thanks& Regards
Raghu Ramaraj