Getting Started with Anabit's PiWave DAC 150 MS/s
Share
High Speed PiWave DAC summary:
The PiWave DAC is an innovative high-speed digital-to-analog converter (DAC) reference design that delivers fast waveform generation without the complexity of an FPGA. The PiWave DAC uses the Raspberry Pi RP2350 microcontroller and its programmable I/O (PIO) subsystem to directly control the DAC's parallel input. This allows it to generate analog waveforms at a blazing 150 MS/s sample rate. The PIO architecture eliminates the need for an FPGA, allowing the user to create complex waveforms in a open source C programming environment.
How the High Speed PiWave DAC Works:
Microcontrollers are typically not fast enough to drive high speed parallel based DACs because of their processor based architecture. They do not have the ability to execute software based commands to shift digital signal data from memory to GPIO output pins fast enough or simultaneously to drive a high speed DAC interface. That is why FPGAs are typically employed for this use case since they can have dedicated hardware for doing this task without the need for processing software commands.
The RP2350 from Raspberry Pi has a built-in state machine feature called Programmable I/O or PIO for short. The PIO state machine runs on a separate core then the traditional microcontroller architecture so it is independent from it. The PIO is configured in software, but once it is configured it runs independently in hardware and can perform simple parallel operations real fast. Besides the PIO state machine capability another key element to enabling the control of a high speed parallel DAC is direct memory access or DMA. The PIO state machine can access the RP2350's SRAM and shift data to GPIO output pins all in one clock cycle! Besides shifting the binary signal data out to the DAC via GPIO pins, the DAC also requires a clock signal. The RP2350 allows you to output its clock from one of its GPIO pins. The RP2350's maximum clock rate is 150 MHz hence why the PiWave is a 150 MS/s DAC. You can also divide down the clock output to the DAC to lower speeds as needed. For more information on the PIO and DMA capabilities of the RP3250 see the link to its datasheet at the end of this getting started guide.
To help you get started using the PiWave we created example programs that can be accessed on github (see link at the end of the guide). The example programs were made in the free Visual Studio Code (VS Code) programming environment. They require the Raspberry Pi Pico Project plug-in (also free) for VS Code to compile and run. The programs were developed in C and there is one program for each resolution variant of the PiWave (10 / 12 / 14 bits). The programs can be loaded onto the PiWave via the USB C connection without any additional hardware. There is also a programming port pinout that you can use for debugging with the Raspberry Pi Debug Probe. To access a Raspberry Pi tutorial on getting started with the RP2350 and VS Code click here.
PiWave DAC Pin / Connectors / Buttons Descriptions:
- USB Boot: toggle button that is used to put RP2350 into boot mode. When in boot mode you can load programs onto the the RP2350. To put the RP2350 in boot mode, hold down the USB Boot button and cycle the power to the board or hit the reset button.
- USB C: connector to power the PiWave and can be used to load software (using bootloader)
- RST (button): toggle button that resets the RP2350 microcontroller.
- GND: there are 7x ground pins that connect to the continuous ground plane on layer 2 of the PiWave PCB.
- VIN: this pin connects directly to the USB C input power. It can be used to power the PiWave DAC design or it can be used to access the 5V from the USB to power external designs. It is not recommended to pull more than 250 mA from this pin.
- 3V3: pin to access the 3.3V bus on the PiWave. Do not pull more than 100 mA from this pin.
- VSS: this pin connects to the negative voltage bus from the design generated by the on board DC to DC inverter. The voltage value is about -6 V which can be used to power external circuits. Do not pull more than 50 mA from this pin.
- VCC: this pin connects to the positive voltage bus from the design generated by the on board DC to DC converter. The voltage value is about 6V which can be used to power external circuits. Do not pull more than 50 mA from this pin.
- TX and RX: pins that connect to the RP2350 UART pins. Logic level for this interface is 3.3V, using higher voltage logic could damage the RP2350.
- GP29 to GP24: these pins connect directly to spare RP2350 GPIO pins with the same pin numbers. These pins can be used to interface with external circuits. They are 3.3V logic, using higher voltage logic could damage the RP2350.
- Sig: this pin connects to the signal output of the PiWave DAC, same potential as BNC output pin.
- BNC Connector: output connector for the PiWave DAC signal output.
- SWD and CLK: connection pins for the Raspberry Pi Debug Probe which can be used to program and debug the RP2350.
- Red circle: this circle refers to key components in the output filter of the PiWave. Refer to the next section for more information.

Understanding the PiWave's Output Filtering (Recommended Read):
A high speed DAC's raw output is typically of little value until it goes through conditioning stages to create the output analog signal the end application needs. The signal conditioning stages for the PiWave consist of:
- Converting an output current signal to a voltage signal
- Converting a differential signal output to a single ended signal output
- Gain stage to increase the output amplitude of the signal
- Filter stage to remove things like general noise, DAC image artifacts, and glitch energy
When planning the PiWave the stage we had the most trouble deciding how to design was the filter stage. One reason is the filter design is tied to the end users application and we wanted to make this design applicable to a broad audience. The second reason is with a complex filter section the BOM costs of the design quickly go up in price so the whole design becomes expensive. For instance, the reason instrument grade waveform or function generators can cost > $1k is partly due to their complex adjustable filter stages.
For the PiWave we decided to go the route of less is more and went with a three pole LCL filter that has a cutoff frequency of about 27MHz. The design also includes some higher frequency noise filtering at the DAC's output. This choice of filtering was selected to keep the design flexible for different applications and keep the cost low-ish. The PiWave can be used for signal frequencies at or close to the cutoff frequency of the filter. But its sweet spot as far as amplitude and signal integrity is 10 MHz and below. When using the PiWave at lower frequencies it is recommended that you keep the clock rate high (150 MHz) and use oversampling. This will keep image artifacts from the DAC sample rate in a range that can be attenuated by the filter section. The one aspect of the signal that the PiWave filtering does not do a great job of attenuating is glitch energy. Click here to learn more about DAC glitches from this Texas Instruments video tutorial.
Link to PiWave DAC example code on Github
Have a question about the PiWave or run into any issues getting started with it? Please use the Anabit DAC Forum
PiWave DAC Specifications:
- Maximum DAC sample rate: 150 MS/s which is based on the RP2350's maximum clock rate of 150 MHz. The RP2350 can be over clocked, but maximum sample rate of DAC IC is 165 MS/s
- DAC resolution variants available: 10 / 12 / 14 bit
- Bipolar output amplitude (typical):
- 6.3 Vpp with 300 kHz sinewave
- 5.9 Vpp with 2 MHz sinewave
- 3 Vpp with 9 MHz sinewave
- 1 Vpp with 16 MHz sinewave
- LCL output filter bandwidth: ~27 MHz
- Typical attenuation: 30 MHz = -3.8 dB, 40 MHz = -6.7dB, 50 MHz = -9.2 dB, 75 MHz = -15.1 dB, 100 MHz = -22.2 dB
- Please note that at higher frequencies max amplitude drops due to filter but also because of amplifier gain roll off
- Output impedance: 50 Ω or 1 MΩ. Selectable, tied to pin GPIO 22 on the RP2350
- Power input: USB-C or 2.54 mm pin header, max current 300 mA and max power 1.5 W with 50 ohm output Impedance. At 1 Mohm max current is 200 mA and max power is 1 W.
- Memory: the RP2350 microcontroller has 520 kB of SRAM and is connected to a 16 MB flash memory IC via QSPI. See the RP2350 datasheet for more information.
Link to Raspberry Pi's RP2350 Datasheet
Link to Texas Instruments DAC IC datasheet used on PiWave