LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI-8451 to talk to TI BQ20Z60 -> Chip address question

Solved!
Go to solution

I am working on testing products that use the TI LI-ON "Gas Gauge" chipset.  The chip talks smb bus and has a chip address of 0x17.  In order to access some of the functionality you have to do a series of writes to register 0x77 with data 0x48 followed by a read of register 0x78.

 

I can talk to the device all day using the TI-2300 smb adapter but can't seem to figure out the sequence required to stipulate the chip address 0x17 and then the register address(s) 0x77 & 0x78.

 

So I guess the bottom line question is.....how do you handle chip addresses with the NI-8451?

0 Kudos
Message 1 of 6
(3,031 Views)

Hi thouston,

 

Since SMB is derived from I2C, I would suggest taking a look at this document: Using I2C with LabVIEW and the USB-8451. It covers device addressing in both basic and advanced modes in addition to other useful information on using the 8451.

 

Tim W.

Applications Engineering

National Instruments

http://www.ni.com/support 

0 Kudos
Message 2 of 6
(3,012 Views)

I got all the register reads and writes working, along with a block read, but can't seem to figure out the block write.  I set everything up the same as a block read but substitute the write VI instead of the write/read VI.  I get no errors, but no data is stored.

 

Both the read and write VI's are attached.  The read works but the write does not.

0 Kudos
Message 3 of 6
(2,999 Views)

Have you taken a look at the I2C/SPI examples that come with the 845x driver? They're in the NI Example Finder (in LabVIEW go to Help>>Find Examples). From there go to Hardware Input and Output>>I2C and SPI. I'd suggest trying either the General I2C Write (in the I2C Basic directory) or General I2C Write Script (in the I2C Advanced directory)

 

Tim W.

Applications Engineering

National Instruments

http://www.ni.com/support 

0 Kudos
Message 4 of 6
(2,985 Views)
Solution
Accepted by topic author thouston@iccnexergy.com

I figured out the answer.  The chip required a PEC byte at the end.  I had to calculate the CRC and add it to the transaction among other things.

0 Kudos
Message 5 of 6
(2,975 Views)

Hi,

 

I think i'm having the same problem trying to write to the bq20z95 chip. Could you post your solution code? That'd be a big help.

 

Thanks,

 

CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 6 of 6
(2,967 Views)