Hardware Developers Community - NI sbRIO & SOM

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C implementation on SOM Dev Kit

Hi all,

just got a SOM dev board and tried to load I2C IP which were written for sbRio or cRio and run into problems configuring the FPGA IO. So I have some question about that.

- There are several SPI/I2C packages in the JKI VI PM listed. Which is the best or latest package to be used (modified) with the SOM?

- Why is there no direct support (with examples) for the SOM?

- How are the FPGA IO's from the example packages to be modified to work with the socket clip IO of the SOM dev kit? Just can't find any info about that.

Thanks in advance and best regards

Christian

0 Kudos
Message 1 of 5
(7,834 Views)

Hi Christian,

I have I2C working on my SOM dev board, I installed "NI I2C IP" version 1.3.0.1 from the VI package manager. (I'm running labview 2015)

There's documentation available in a pdf stored at C:\Program Files (x86)\National Instruments\LabVIEW 2015\user.lib\_NI I2C IP\documentation\NI I2C Host Example for the PXIe-5644R-45R-46R.pdf

The only modification required for the SOM was wiring boolean True to the "direction ready" input on the I2C Master block. Previous versions of the RIO had a time delay that apparently doesn't exist on the zynq-7000 and the direction ready I/O signal doesn't exist.

The other modification I made was to increase the data array size in C:\Program Files (x86)\National Instruments\LabVIEW 2015\user.lib\_NI I2C IP\FPGA\Public\Data Array Type.ctl from 8 bytes to 255 bytes to allow more data to be transmitted or read at once.


niSOM_I2C.png

Message 2 of 5
(7,036 Views)

Hi and thank you for the helpful response.

According to the SOM quick start guide for the DevKit the I2C interface is routed to Pmod5. I can't find a pinout for the connector except what is printed on the PCB (1..8). How did you figured out which Pmod5 pin is used for SCL (1/2) and SDA(1/2)? Is there any documentation?

Update: Found and downloaded the the zip http://ftp.ni.com/pub/gdc/tut/som_reference_design_files.zip

0 Kudos
Message 3 of 5
(7,037 Views)

Hi Christian,

The I2C implementation is in the FPGA, so the data and clock lines can be routed to any FPGA lines on the SOM.

On the Reference Carrier, there are multiple implementations of PMOD connectors.  The PMOD standard (managed by Digilent) has 3 sets of pinouts.  The 1x6 and 2x6 pinouts are generic and somewhat interchangable.  The 2x4 connector is for I2C based PMODs. 

http://store.digilentinc.com/pmod-peripheral-modules/

If you are communicating I2C to something other than a PMOD, you can pick and choose any two DIO lines for SCL and SDA as you implement the IP core in the FPGA (I would recommend you keep SDA and SCL on the same FPGA IO bank).  If you are connecting to an I2C PMOD, then the pinout of the I2C PMOD header is documented on page A-6 of the SOM Carrier Design Guide.

Regards,

Spex

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 4 of 5
(7,037 Views)

Hi Christian,

Have you figured out the I2C implementation with the SOM. I am relatively new to FPGA programming. I have a MPU6050 sensor that I would like to connect to pmod 5 to acquire data with a FPGA VI and process the data with a RT VI. I was able to do acquire data with a myRIO RT VI but I find it confusing to do it in FPGA. Any help is welcome

Regards

Goku

0 Kudos
Message 5 of 5
(7,037 Views)