08-05-2014 10:34 AM
Ok so the problem was hardware my I2C connector was not working properly so I don't receive the error anymore. Now when I do run the VI with the correct parameters. All values I read are 0.. when I use the original TI Software all EEPROM registers have non 0 values.
Any idea as to why this is happening?
08-06-2014 12:10 AM - edited 08-06-2014 12:19 AM
Have you tried to read another register than 0x00 ?
Your screenshot doesn't show the relevant part of the array because the index selector is set to 10. As expected, this part of the array is empty. Could you show the first elements of the array, starting from 0 ?
08-06-2014 03:01 AM
I have figured out that you have to keep the index value at 0 in order to read the EEPROM Values.
The BQ7710A device with which I am communicating has 10 EEPROM registers. In my VI, I only can input the starting EEPROM address and I am able to read only its contents. What would be the best way to read EEPROM values from 1 to 10 without manually changing them?
I have attempted to change the width of my table for the single EEPROM address but I just get an array filled with the same values.
Copying and pasting the same functions is working out but I don't want to do it 10 times. I also want data to be collated in one single table.
What are your recommendations?
08-06-2014 07:05 AM
You could use a loop to read the registers one by one or use the "num bytes to read" to read them all at once.
What do you want to do exactly ? Write AND read each of the ten registers ?
In your example, you only set the starting address but don't write any data.
08-06-2014 07:12 AM
Yes ideally I would like to make a VI which can handle both writing and reading. The one I uploaded is just a starting point and there are still lot of things I want to add on including script addressing.
I tried changing the num bytes to read but sadly it is the value of one register which is displayed several times.
What is the best solution to write and read in 10 EEPROM registers? Is a loop the best solution or anything better exists?
08-06-2014 07:25 AM
Do you get the expected data from registers 1 to 10 if you run the attached VI ?
08-06-2014 07:45 AM
Yes absolutely! This is great, thanks so much.
Would this work for writing also?
I still have to familiarize myself with the flowchart of the BQ77910A and the steps needed before writing.
08-06-2014 08:05 AM
I encourage you to have a look at the I2C examples which install with LabVIEW.
Doing so, I have just learned some points. There are richly documented and instructive.
You have to write 2 VIs, on to write the registers and one to read them. The examples how this can be done.
08-07-2014 03:28 AM
This VI should read the registers without using a loop. Let me know if it works.
08-07-2014 07:14 AM
The for loop is needed to read all the register otherwise I just see an array filled with one byte value.