LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA I2c slave

Solved!
Go to solution

is it possible to implement I2C  slave  on the kit NI USB 7845R (https://www.ni.com/en-us/shop/model/usb-7845.html)? 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 10
(5,058 Views)
Solution
Accepted by topic author Nilton_FR

Good morning Nilton,

 

Yes, it's possible but requires knowledge on the communication protocol implemented.

 

Below you can find some examples, and other interesting information related. Most examples will require small changes and FPGA recompilation to work in your target:

 

https://www.ni.com/en/support/downloads/tools-network/download.spi-and-i2c-driver-api.html

https://forums.ni.com/t5/Examples-and-IP-for-Software/I2C-IP/ta-p/3491271

https://forums.ni.com/t5/Example-Code/I2C-Bus-Communication-Example-Using-LabVIEW-FPGA/ta-p/3996143

 

Regards,

Barbara Pracek
Engenharia de Aplicações
National Instruments Brasil

0 Kudos
Message 2 of 10
(5,005 Views)

thanks, I bougth the kit usb 7845 recently, so still waiting for it to get delivered.

 

by the way, I am also from brazil XD.

0 Kudos
Message 3 of 10
(4,983 Views)

Hi,

          I am trying to make I2C communication via the NI USB 6009. Can you please help me out in providing any example VIs or libraries specially meant for  I2C with 6009 and not 8452. I have done with 8452 already but for my application I need to perform using 6009. 

 

For my application even the software clocking will be okay.

 

Thanks in Advance.

 

Fredrick Johnson JOSEPH 

0 Kudos
Message 4 of 10
(4,790 Views)

Hi Frederick,

 

Unfortunately you won't be able to implement a sucessful I2C communication using a 6009, because this board is software timed which means there isn't a hardware clock reference. For this reason we can't guarantee any synchronization with an I2C device.

 

Please, next time post new questions on new boards this way your question will be visualized by all user and the forum stays organized.


Regards,

Barbara Pracek
Engenharia de Aplicações
National Instruments Brasil

0 Kudos
Message 5 of 10
(4,778 Views)

Sir,

     I have to control the motion of 4 DC rhino Servomotors using Spartan 3E board.I have to implement through I2C communication.I have made a VI for controlling a single motor.steps that I have followed are-
1.I have used the J1 header pins I/O1 and I/O2 as SCL and SDA pins respectively.
2.In the VI, initially both SCL and SDA lines are high.
3.while the scl is high ,sda makes a transition from high to low.
4.after that I have set the SCL line low to send the address and the data byte on the SDA line.After the communication is over , again both the lines become high.
Problems:
1.While sending the data through the VI to vary the speed of the motor ,its not varying."
2.the motor is not stopping upon sending data 0 .
3. I have to control the motion of 4 motors at a time.I am facing problem as to how to address them and what all changes I need to make in the VI.
 
Please provide me the valuable suggestions and modification needed in the VI as soon as possible.
Thanking You,
Regards
Pooja
0 Kudos
Message 6 of 10
(4,692 Views)

Dear shreya111,

 

I have read your specific problems, however if you could clarify some topics it would be great for me to understand what is happening and be able to help you.

 

* Are you using any library for the I2C communication? If yes, which library?

* What are those conectors and what their functions are?

* Is there something that worked inyour project?

 

Could you please send us more specific information about your problems?

 

Regards,

 

gfavaron

 

 

0 Kudos
Message 7 of 10
(4,661 Views)

Sir,

    I am not using the IDW library.I have installed the FPGA module for labview 2012 and xilinx spartan 3e tools.I am using the pins i/o 1 and i/o 2 on j1 header of spartan 3e board as SCL and SDA pins respectively.So Using te FPGA I/o method node I have to send the signals on SDA and SCL lines .

 

0 Kudos
Message 8 of 10
(4,604 Views)

Sir, 

     Yes I am able to drive the DC rhino servomotor .However I am not able to do the motion control properly.I have attached the datasheet of the DC servomotor dat I am using below.I have to send the data as specified in its datasheet.However I am not able to approach for that problem.Kindly provide me necessary suggestions regarding that.

0 Kudos
Message 9 of 10
(4,603 Views)

Hello shreya111,

 

I never use the Spartan 3E starter kit, looking to its manual it doesn´t communicate I2C directly. Looking a forum on Xilinx web site they use an IP to implement I2C on Spartan FPGA.

Based on this information i think in LabVIEW you need use one I2C library to implement this I2C or development the protocol, and not only send signal on a pin.

NI have some devices that have an Spartan 3E embbeded to user program, on this devices we always recommend use one I2C library to implement I2C on FPGA.

 

Regards,

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 10 of 10
(4,546 Views)