Other Parts Discussed in Thread: BQSTUDIO, EV2400
Hello, my friends
I would like to develop a Visual Basic 6 program to revise DataFlash for bq40z50, unfortunately i am not able to correctly write the dataflash address to device via WriteSMBUSBlock command 0x44,
At the first, the codes are as below:
Text9.text="0030" '0030 is seal command
lerror = WriteSMBusBlock(&H44, Text9.Text, Nums)
then the device can be sealed successfully via bqstudio check.
Secondly, my codes are as below:
Text9.text="4E08" '4E08 is the address of Cycle Threshold in Advanced Charge Algorithm
use the function,WriteSMBusBlock(&H44, Text9.Text, 8) 'send SMBus write block with command 0x44,block=0x08+0x4E
then read the parameter via the function,ReadSMBusBlock(&H23, sBlockResponse) and convert data1_LowByte+data1_highByte+data2_LowByte+data2_highByte to decimal, the the value via read my codes SMBus read block was not cosistent with bqstudio SMBus read block, the "4E08" have not been write successfully.
So as to i am not able to write 0x0100 to dataflash address 0x4E08
'send SMBus write block with command 0x44,block=0x08+0x4E+data1_LowByte+data1_highByte+data2_LowByte+data2_highByte
Would you please give me support to fix the bug, thanks a lot.
I'm looking forward to hearing from you.
Sincerely yours
Mike