Part Number:BQ20Z95
Dear all:
How can I access the Data Flash with SMBus(I2C)?
Reading bit sequence:
Start + 0x16 + ACK + 0x77 + ACK + 0x50 + ACK + 0x00 + ACK + Stop
Start + 0x16 + ACK + 0x78 + ACK + rs + 0x17 + ACK + returned LSB + ACK + returned MSB + ACK +.....32byte.....+ Stop
Writing bit sequence:
Start + 0x16 + ACK+ 0x77 + ACK + 0x50 + ACK + 0x00 + ACK + Stop
Start + 0x17 + ACK+ 0x78 + ACK + LSB + ACK + .....32byte.....+ Stop
Is it right?
Thanks!
《sluu264a_bq20z90-V1.50 + bq29330, bq20z95 Technical Reference》page100:
To write the value of Term Voltage to a value of 8.7 V the following sequence is used.
Read complete Gas Gauging-IT Config subclass (SubclassID = 80) into RAM:
· Write Subclass ID
– SMB Slave Address (0x16)
– SMB CMD 0x77 with 0x0050 as data (=80 decimal)
· Read Subclass (2 blocks are needed as its over 32 bytes long)
– SMBSlave Address (0x16)
– SMB CMD 0x78 receiving 32 bytes of data
– SMB CMD 0x79 receiving 32 bytes of data
Overwrite offset 45 of received data with 8.7 V:
· Update offset 45 of second block with 0x21fc (=8700 decimal)
Write the complete subclass back to the bq20z90/bq20z95:
· Write Subclass ID
– SMB Slave Address (0x16)
– SMB CMD 0x77 with 0x0050 as data
· Write Subclass
– SMB Slave Address (0x17)
– SMB CMD 0x78 with 32 bytes of data
– SMB CMD 0x79 with 32 bytes of data