• 0

DA4 with Zybo Zynq-7000


John92
 Share

Question

Posted (edited)

Hello,

I'm kind of new in the Topic and need your advise as to how to get the DA4 Pmod to run on the Zybo Zynq-7000 Board.

I could not find a IP for the DA4 and the Librarys I found seemed to be for PIC32 and not for ARM. (DSPI and DACSPI4)

My Project so far is written in C and VHDL.

I would be glad for any bit of help :)

Best regards John

 

Edited by John92
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

Hi @John92,

You are correct in that Digilent does not have an existing premade IP for the Pmod DA4. There is an Avnet made project for that uses the Zedboard that is linked in Resource Center, https://digilent.com/reference/pmod/pmodda4/start#additional_resources, though I have not personally used this demo.

Otherwise, what you could do (I understand this isn't necessarily what you are hoping for) is take an existing Pmod IP that also communicates over SPI (such as the Pmod DA1 IP) and adjust it's code to work for the Pmod DA4. Mostly this will boil down to changing the DA1.c (https://github.com/Digilent/vivado-library/blob/master/ip/Pmods/PmodDA1_v1_0/drivers/PmodDA1_v1_0/src/PmodDA1.c) DA1-SpiIint function to properly set up using the external reference voltage (explained in the Pmod DA4 Reference Manual here, https://digilent.com/reference/pmod/pmodda4/reference-manual#interfacing_with_the_pmod), and the DA1_WriteIntegerValue function to instead transfer 4 bytes worth including the command, address (which output you want to send the signal out on), and the 12-bit data value.

The SPI clock polarity (as set in the XSpi_SetOptions function in the DA1_SpiInit function) may need to be changed as well, I haven't looked into this specifically to see the two Analog Devices ICs use different SPI Modes.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hello JColvin,

thanks a lot for your answer 😀  I think I will try to change the DA1 as described, but I first need a little time to learn more about SPI and the AD5628 to understand the code.

One question that comes with this would be how to connect this Code with the GPIO Pins. Until now I only used the PL to control the GPIO Pins, considering that this code is in C and not VHDL or Verilog I assume that this is a library and not a IP? (this is all pretty new to me)

Best regards
John

Link to comment
Share on other sites

  • 0

Hi @John92,

What happens with the Digilent IPs, at least in the case of the Pmod DA1, is that HDL is created to facilitate the connection between the Pmod port (the GPIO pins) and the on-board processor (Microblaze or the ARM Core processor on a Zynq chip) which is all wrapped together in a block that gets clicked and dragged onto the block design. There is a guide for how this can be done on our reference site here, https://digilent.com/reference/learn/programmable-logic/tutorials/pmod-ips/start, though it is designed for 2019.1 and older versions of the Xilinx software.

The software side would then all be in C (the necessary files/libraries to connect the pin manipulations to the pins in the FPGA will have already been ported).

Alternatively, you can, of course, just create an HDL project to run the Pmod DA4 on the Zybo Z7 and just ignore the ARM core processor entirely (though a caveat with this is that if you wanted to use the UART/serial terminal you will need to use the processor as that functionality is only available through the ARM core). There is a vhdl example for the DA4 made by another user at the end of this Forum thread here: https://forum.digilent.com/topic/49-working-with-da4-pmod-on-nexys4/?sortby=date, if you are interested.

Thanks,
JColvin

 

Link to comment
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
 Share