LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga I2C read/write eeprom

Solved!
Go to solution

Has someone a I2C communication LabVIEW example to read/write an eeprom?

I'm using sbRIO-9636 with FPGA.

I'm already tried with the example "Advanced I2C", but it don't works...

 

Can someone help me?

 

0 Kudos
Message 1 of 5
(5,259 Views)

Hi,

can you attach your example and give me more details.

What does not work?

LV Version?

 

Maybe you can look at the link below, it is an instuction to programm an eeprom using I2C protokoll.

 

http://forums.ni.com/t5/LabVIEW/I2C-eeprom-programming/td-p/12937

 

There is an exaple in LabVIEW 2012 called "I2C Communication - sbRIO"

 

 

0 Kudos
Message 2 of 5
(5,228 Views)

Hi,

 

thank you for responding.

 

I'm using an sbRIO-9636 to communicate with an EEPROM (PCA9501). I have configured 2 DIO Lines for Data Communication (SDA) and Clock (SCL). I need a third DIO Line for "Write Control". This Line is set to low for writing data into the EEPROM.

I have downloaded a simple I2C example and slightly modified for my communication. This VI's works to communicate with LED driver and also with Programmable Gain Amplifier (PGA204).

Now I tried to communicate with my EEPROM. But the write and/or the read function are not working. The data which I write in the register will not be read (the readed data are always 0xFF, for every register). I'm not sure if the reading does not work and/or also the writing function.

 

I'm using LV2012.

 

Has anyone any experience with writing and reading of eeprom via i2c with fpga? Maybe an example? I have see in the datasheet, that reading an eeprom is particularly. Because the eeprom is using an internally address counter, who will be set with a dummy write (it's calling random read).

 

Attached is my example, what I'm using for I2C communication. This example works with LED drivers and PGA's, but not with eeprom's.

 

Thank you for helping me.

0 Kudos
Message 3 of 5
(5,209 Views)
Solution
Accepted by topic author Mauro_Orzelleca

Another suggestion:

Do you know about the VI Package Manager? There you can install an I2C&SPI API open source application (Vers. 3.0.0.22). This is an easy way to implement an I2C Bus system on an FPGA target.

This way is a little bit smarter.

Maybe you like it.

0 Kudos
Message 4 of 5
(5,168 Views)

ok, thank you.

 

Best regards,

Mauro

0 Kudos
Message 5 of 5
(5,151 Views)