Hello,
Apologies if this is the wrong place to post (I’m new to the forum).
I’m currently trying to connect my Pynq-Z2 board to a device (it’s a custom-made low-voltage to high-voltage converter) so that the device can be controlled with I2C. I have the device wired to the SCL and SDA pins on the Arduino header, but I’m struggling with how to actually write to the device.
Should I be using MicroBlaze? If so, how? How do I control it? I tried to use the python periphery package too, but I can’t find the device in the dev folder. All of the tutorials I can find are for specific peripherals, or use PMOD.
What might I be doing wrong? Thank you!
using base overlay or a custom made overlay?
i believe in both cases, you can use this:
https://pynq.readthedocs.io/en/latest/pynq_libraries/axigpio.html
https://pynq.readthedocs.io/en/latest/pynq_libraries/axiiic.html
the top one outlines the general use of axi peripherals, the bottom one outlines the transmit and receive functions for axi-i2c.
I am using the base overlay.
Is there anywhere that might tell me how to do this, or show me an example, using the arduino header? I have been reading the documentation (including the pages on axigpio and axiiic), and maybe I just don’t understand, but I can’t figure out how to impliment it.
Thank you!
1 Like
there are 3 ways of doing this:
-pass by the microblaze
-use the axi-iic IP library
-use the SM-bus library
i got mine working with SM-bus. the reason my thing didn’t work with the axi-iic block straight from the overlay was because the repeated starts didn’t want to work.
spo2sensor.py (8.3 KB)
spo2.hwh (193.3 KB)
spo2.bit (3.9 MB)
pynq-z2_v1.0.txt (16.4 KB)
the last file is the xdc, so you should change the file extension
you’ll need to trimm away the fat from my code but perhaps it will help
best of luck