Jump to content
  • 1

Zybo I2C


david.600

Question

Hi,

I have the Zybo Zynq 7000 board (Z-7010).

I want to receive data from Multiple Devices via I2C protocol.

In the PS there are 2 I2C Controllers.

The Steps i made so far:

1) In vivado i created the ip : Zynq7 processing system.

2) i'v enables the I2C 0 controller and routed it to Emio.

at this point i need 2 pins: clock and data, but instead i have 6 pins:

image.png.3e5a7d1aad6c2c9c15683ab954eda891.png

where should i connect the pins? 

after Exploring this issue online i saw another option : using the Axi_IIc ip, With the same problem:

image.png.31f2b47d8d83fe85e7ccf60d922873a2.png

 

 

 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi, @david.600

My advice would be to look at the Digilent PmodRTCC. It communicates with the Zynq ARM via I2c. I tested it in the past and it worked as advertised. Communication works two-way. I was able to read RTCC and write settings.

Looking at the code provided on GiHub you will find answers for your questions. I made only few modifications when used it because  had other components in the system. You can use other devices instead of RTCC, even several devices on the same I2c bus provided they have different addresses. Also I2c is very well supported on Arduino although not very fast.

Good luck!

 

Link to comment
Share on other sites

Thank you for the response,

I'm having trouble understanding the connection that should be made in vivado: should i use the emio port to the iic controller or the AXI_iic, and which of the ports are data and clock?(I have 6 ports).

i already found the code examples in SDK, i just need help to make the connection in vivado.

as for the PmodRTCC , they use an existing IP called PmodRTCC_v1_0 in order to connect it to the PMOD.

Link to comment
Share on other sites

@david.600,

In my undestanding there are two ways to implement I2c on Zybo:

- using I2C peripherals embedded in ARM; these can be conigured to be connected to Pmod JF because MIO pins can be wired to this Pmod only. You can use MIO configuration and select MIO 10 (scl) and MIO 11 (sda), for example. 

- using Xilinx AXI_IIC. You can get HDL source code from the PmodRTCC project and modify it to your requirements.

Advantage of the first option is that all programming is done in C-code. I am not sure that you can implement interrupts.

The second option has fewer limitations. It is possible to use four Pmod ports and implement interrupts but at cost of more coding and FPGA fabric. I think that it might be also slower that ARM peripheral because AXI peripherals introduce latency.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...