In a recent blog post by Adam Taylor, he examines how to approach using Pmods if there is not a driver available. His solution is to use the Pmod bridge in the Zynq SoC’s PL (programmable logic) to correctly map Pmod ports on a development board and to create a Zynq PS (processing system) driver.
The Pmod bridge allows for the definition of input types for both the top and bottom rows of the Pmod connector. This setup allows for the user to select from either GPIO, UART, IIC, or SPI interfaces. This helps the Pmod connector align with the standard for interface type.
For his example, he used a SPI interface on the top row. Then he selected the actual SPI communication channel.
As we are using the Zynq SoC, we have two options. The first would be to use an AXI SPI IP block within the PL and connected to the bridge. The second approach—and the one I am going to use—is to connect the bridge to the Zynq PS’ SPI using EMIO. This choice provides us with the ability to wire the pins from the PS SPI ports to the bridge inputs directly
To do this, he mapped the pins for this example, his diagram for the Pmod DA4 is shown below.
He uses the SPI drivers created by the BSP to drive the DA4, and to interact with his device. Then he drove a simple ramp output with the Analog Discovery monitoring the DAC output. One this was working as expected, he connected the DA4 and the AD2 together so that the Zynq SoC could receive the signal: