Quantcast
Viewing all articles
Browse latest Browse all 35901

bq34z100 checksum

Hi

I am using BQ34Z100EVM and Arduino Uno like master I2c device. I am trying to change some settings in Data Flash (Pack Configuration

, Number of series cell...) and i can to write new checsum. I tried in several ways to calculate newchecksum but controller does not accept.

i using the 4cell battery (3.7V to 4.2V per cell) and this is a list of commands that I send :

(writte 0x00 , 0x14, 0x04)

(writte 0x00 , 0x72, 0x36)

delay(300) /////miliseconds

(writte 0x61 , 0x00)

(writte 0x3E , 0x40)

(writte 0x3F , 0x00)

delay(300)

for (int i=0 ; i< 32; i++)

{

flashbyte[i] =(read  0x40+i);

delay(100);

}

packConfg = flashbyte[0] | 0b1000;

(writte 0x40, packConfg)

for (int i=0 ; i< 32; i++)

{

newchecksum =newchecksum + flashbyte[i];

}

Temp = newchecksum / 256   //integer divider

newchecksum = newchecksum - (Temp * 256)

newchecksum = 255 - newchecksum

(write 0x60 , newchecksum)

(write 0x00 , 0x41 , 0x00)   //reset

(read 0x08)                          // voltage read

(read 0x60)                          //read Check sum

After these steps I get read the following values:

Voltage = from 695 to 715

newchecksum = 81 Decimal

checksum = 89 Decimal

Please help :) 


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>