Hi,
I am using BQ27421 for battery measurement in my project.
I am writing a driver for it. I have referred quick start guide and TRM both.
I have some confusion regarding configuration and data reading. Can someone please clarify it?
(1). In configuration flowchart given in quick start guide it is mentioned that to unseal fuel charge we need to do I2C write as follow:
I2CWriteWord(0x00, 0x8000, 100)
what is 100 for? delay of 100 ms or us?
(2) To read values such as SOC(state of charge) we first need to write into that register than read or just read?
In quick start guide it is mentioned as follow:
SOC[2] = I2CReadSubCommand(0x1C, 2, 100);
and definition for I2CReadSubCommand :
I2CWrite(0x04, 100);
Buffer[2] = I2CRead(2, 100);
0x04 is address of SOC. so are we writing 100 in it?
and I2CRead is most confusing , what does that mean?
I have developed driver but it always return 0. Can someone please clarify above 2 points?
Thanks.