02-13-2012 01:29 PM
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?
Solved! Go to Solution.
02-16-2012 10:28 AM
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
02-22-2012 01:19 PM
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.
02-23-2012 08:49 AM
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
02-24-2012 01:55 PM
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.
02-25-2012 11:29 AM
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