04-01-2016 11:55 AM - edited 04-01-2016 11:56 AM
I am trying to create a C program that would read and write via IIC interface to external devices. The IIC on the board would be always master. For that, I created a simple block design by adding the Zynq ip and AXI IIC ip, performed auto connection, created wrapper, went through the processes to generate the bitstream and exported the project to SDK:
Now, I created a new project with Hello World template and would like to perform reads and writes on IIC using the board. Is there a project template on IIC usage? How do I initialize this interface? How to check if a IIC slave is connected to by board? Where's the IIC .h file that contains the description of availabe functions that I could call from main()?
Is there a tutorial that focuses on IIC inteface that includes SDK fotware development examples?
04-04-2016 10:56 PM
04-04-2016 10:56 PM
04-08-2016 03:12 AM
Just an idea, why don't you use the one of the hard functions in the PS to get a iic interface. You can route them through the PL to any pin.
04-11-2016 10:09 AM
I have the exact same problem. I am using Zybo and I don't know how to write/read via IIC despite the inclusion of the AXI IIC IP in the PL. Also, although the examples provided, I still couldn't figure out to which physical pins does the IIC interface connects to. So, my questions are:
- How to know if a slave is connected?
- Where to connect (physically) the SCL and SDA wires of my slave?
- How to read/write to such slave?
Many thanks in advance :)
04-11-2016 10:21 AM
* the only way to know if a slave is attached is to create a transaction and see if it responds to a known to succeed read.
* which i2c ? ps or pl ? if ps, the ps7 block config should tell you which MIOs are used. If pl, look at the pin assignment xdc.
* I think this is already covered in detail.
04-23-2016 01:22 PM
04-23-2016 01:36 PM - edited 04-23-2016 01:37 PM
If you want to add a AXI IIC IP to your PL, then I think you need to right-click on the outputs "make external" and implement the design. Then, you should be able to assign pins/pads, thus, making then physically routed on your board (see the board schematic). Then comes the software. You need to use SDK to configure your AXI IIC block and if you know the I2C protocol standard your first two questions are solved. When your create a project in SDK, the BSP is created and contains many examples including the IIC.
07-18-2019 11:25 PM
Hi,will please share the dts file for iic ,i'm getting a error after booted up the zcu102 board