LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i2c sequential read

Hi, 
  
I'm currently doing a Labview project to write/read data on EEPROM via I2C thru serial port. I'm using the devices 24LC32A and PIC16F873. I was successful  on executing the byte write and random read operation by following the EEPROM datasheet. However I'm having problems on executing sequential read as I want to read the content of the EEPROM from address 000 to FFF by single read operation. On the datasheet, it says that sequential read are executed just the same way with random read, except that once the EEPROM transmits the first data byte, the master issues an acknowledge as opposed to the STOP condition used in random read. How can I make the master issue an acknowledge condition on Labview? Below is the command string format I sent to EEPROM when I performed random read successfully. 
  
Start of file (SOF; 2 bytes), control byte (write; 1 byte), address hi (1 byte), address lo (1 byte), End of file (EOF; 2 bytes), control byte (read; 1 byte), # of bytes to read (1 byte), EOF (2 bytes)

 

Attached as well is the read code I’m currently working.
  
Hope someone can help me. Thanks in advance.

0 Kudos
Message 1 of 2
(3,161 Views)

I would recommend looking into this example code:

-I2C Digital Waveform Reference Library

http://zone.ni.com/devzone/cda/epd/p/id/6080

 

There is an Add Acknowledge Bit.vi that would be ideal for you.

dK
0 Kudos
Message 2 of 2
(3,121 Views)