03-25-2013 06:56 PM
Im trying to read data from an EEPROM using I2C and VISA in LV. The data sheet says I must do a "Dummy byte write sequence" in order to set the address to do a random read or a sequential read from a specific address, otherwise it simply reads form the current address. So what is a dummy write and how do I do one wihtout overwirting data to the address Im dummy writing to? What is I2C dummy write command string? Something in the form of "\T?? ~??~??<CR>"
Thanks,
Rick
03-26-2013 06:56 AM
Hello Rick,
I think this probably is explained in the datasheet, but also a quick google search can be very helpfull for general principles.
This page explains some basics on I2C including the dummy write, as I understand it, it simply is the write action for setting the adress (pointer) before sending a read command.
Regards, W
03-26-2013 08:08 AM
Thanks for the Google tip, would have never thought of that. The data sheet says send a dummy write, period and yes I get I2C bus signaling. What I'd like to know is the sequence of VISA commands to get these signals on the bus. Unfortunately my search of the NI knowledge base did not uncover the relation between VISA commands (\D \R \T etc) and I2C bus signaling. Perhaps you could point me to a relevant tutorial?
Cheers,
Rick
03-26-2013 11:26 AM
Situation: Running LabVIEW on a PC, with USB port connected to a USB to I2C converter connected to EEPROM. Here is the part that I missed, the string sent to the VISA is a command to the converter device to create a message to send on to the I2C bus. For this particular device the commands required are /D~00<CR> to Select I2C device at I2C address A0h /*T~01<CR> to transmit single byte address of 01h if memory < 256 bytes else /*T~01~00<CR> to set byte address to 100h. followed by /R10 to read 16 consecutive bytes beginning from the address set by the dummy write (ie the /T command). The "*" initiates the I2C no-stop which prevents the current master from loosing bus arbitration in a multi master system.
03-27-2013 03:40 AM
Glad to hear you found the solution to your problem, maybe you can list the hardware you are using together with the solution so others using the same hardware can use this as a reference, I'd suggest you accept that message as the solution.
regards, W