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

 

 

 

 

 

Edited by david.600

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

After reading other posts online and your answer, i saw that the 6 ports are already connected , and i only need to make the IIC_0 port external.

After the IIC_o port is external you should go to  I/0 ports , then there are only 2 ports of IIC ,

then you choose the restrictions as described in the following post:

IIC how to vivado

Edited by david.600

Share this post


Link to post
Share on other sites
  • 1

@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.

Share this post


Link to post
Share on other sites
  • 0

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!

 

Edited by Notarobot

Share this post


Link to post
Share on other sites
  • 0

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.

Edited by david.600

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now