Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot use i2c and custom fpga logic at the same time

I am driving a OV7670 camera sensor with my myRio. Configuring the camera's registers is done via I2C (or they call it the SCCB interface, but it's practically the same thing). The sensors has to be given an external clock input which I do through the FPGA (I run it with an 8MHz signal). I can then do a parallel read (8-bits) from the chip into the FPGA on each clock in order to read off the pixel information, place it in a buffer and let the real-time side read it and manipulate it. The whole idea is to let the FPGA do the image acquisition while the processor does the image manipulation.

 

The only problem is, when I have my FPGA configuration loaded, the I2C bus seems to stop working. I know that the I2C is actually handled throught the FPGA as opposed to the processor. Is there anyway to run those two functions simultaneously on the FPGA? If not, can I somehow implement the I2C protocol independently of the FPGA?

 

Thanks in advance

0 Kudos
Message 1 of 6
(7,760 Views)

Hey quickbacon,

 

I take it you're talking about using the built in I2C API for the myRIO. The myRIO comes preconfigured with a default FPGA personality, and the myRIO API is built off of that default personality - the default personality needs to be in place in order for it to function. By customizing the FPGA on your own, you've overwritten the personality, which is why the myRIO I2C VIs have broken.

 

If you want to use both the myRIO I2C VIs and customize the FPGA you can do so, but you need to modify the FPGA VI for the default personality instead of creating a new FPGA VI from scratch. To expose the FPGA VI that defines the default personality in a project, create a new project in LabVIEW and select the "myRIO Custom FPGA Project Template." Once you've created a project from that template, expand the FPGA target - the FPGA VI that's present under the target is the FPGA VI that defines the default personality. To add your own custom FPGA functionality, simply open that VI and add your functionality in parallel to the existing code. As long as you leave the code pertinent to the I2C VIs in place (it should be clearly labelled in the FPGA VI), the I2C VIs should still function. If you run into resource utilization problems, you can delete sections of code from the personality that deal with myRIO functions that you aren't using - just leave the code pertinent to I2C intact.

 

Regards,

Ryan K.
Product Manager, ATCA and BEEcube
National Instruments
Message 2 of 6
(7,731 Views)

Dear attender

 

Could you please tell me if you could solve your problem or not? I have a problem like yours and I want to ask some questions! I need to implement sccb protocol with labview and my signals should be output of Arduino UNO interfaced with labview.

 

Kindest regards

0 Kudos
Message 3 of 6
(7,002 Views)

Hello Meharn,

 

It appears as though this thread is dead. 

 

I recommend opening up a new thread in the LabVIEW Arduino Forums (https://decibel.ni.com/content/groups/labview-interface-for-arduino?view=discussions), LabVIEW Forums(http://forums.ni.com/t5/LabVIEW/bd-p/170), or Automotive and Embedded Networks Forums (http://forums.ni.com/t5/LabVIEW/bd-p/170) depending on the nature of your question.  This will maximize the exposure of your question to the correct people.

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 4 of 6
(6,978 Views)

Hello.

I am trying to interface OV7670 camera with NI PCI 1424 frame grabber through Altera cyclone FPGA. I have used I2C comuunication between FPGA and the Camera. I have generated .icd file also using camera file generator. If anybody wants the verilog code also i wil post it.  I have attached some of the images pattern I got.  Nothing seems to be working. Any help regarding this is appreciated. I am trying it for long time.

 

Supriya.

Download All
0 Kudos
Message 5 of 6
(6,423 Views)

Suppy,

 

     Older posts don't show up on the front page, so I would recommend creating a new post for this. 

Tanner B.
Systems R&D Engineer - Aerospace, Defense, and Government
National Instruments
0 Kudos
Message 6 of 6
(6,380 Views)