RFSoC 4x2 How to generate square wave

<RFSoC 4x2 board, PYNQ version 3.0.1, connected over usb cable>

What I am asking is quite straight forward. Is it possible to generate square waves using one DAC only?

Thanks in advance.

1 Like

Hi @ljbedir,

You can send the minimum value supported by the ADC for half the period and then the maximum value for the other half.


Hi @marioruiz,

Let me elaborate my question into a more clear wording: What would be the necessary python code?

Respectful regards,

You can see how to use the DMA for data transfer here:

You can do something like this numpy - Plot Square Wave in Python - Stack Overflow and then pass the square wave to the input_buffer.

Did you also check the DAC-ADC notebook from the base Overlay?
(RFSoC-PYNQ/boards/RFSoC4x2/base/notebooks/rfdc at master · Xilinx/RFSoC-PYNQ · GitHub)

Is it possible to use DMA, as the transmitter block does not have a DMA, only amplitude controllers without DMA?

Yes, you’ll need to add the DMA and make the necessary modifications to the overlay.

What are those necessary modifications? Changing the AXI_Lite connections to AXI4 connections?

Hi @matthew,

I would suggest the DMA tutorial to understand what are the changes.