Turning a Raspberry Pi Pico Into a GPU with DVI Output

As a continuation of his ESP32-based mini Linux PCB, Clem Mayer explores how to get video output from an RP2040 chip.

Evan Rust
2 months agoDisplays / Retro Tech

The ESP32 Linux board

Back in October 2023, element14 Presents host Clem Mayer got inspired by the Raspberry Pi Compute Module 4 and wanted to build his own single board computer. However, instead of using a more traditional SoC, he was able to get a very lightweight version of Linux running on an ESP32-S3- complete with the Compute Module 4 connector's existing pinouts for compatibility with other carrier boards. At the time, Mayer expressed interest in creating a GPU co-processor based on the Raspberry Pi Pico's RP2040 chip and PIO subsystem that could be used to generate DVI signals and drive external displays. And in this project, he demonstrates how he accomplished that goal.

Pico DVI

DVI, DisplayPort, HDMI, and even VGA standards all rely on I2C for setting up initial connections to the host device and configuring the display before a driver is even needed. Because of this fact, Mayer knew he could leverage Wren6991's PicoDVI library, which allows an RP2040 chip to send DVI signals via PIO and control a screen. He quickly flashed the example code to a Raspberry Pi Pico and connected an HDMI breakout board to the Pico, but ultimately got no signal. This was due to a difference of impedance across the signal bus, as the lack of resistors and differing conductor lengths caused the signal timing to degrade far too much. Once ordered and assembled onto a few pre-made Pico DVI Sock boards, the RP2040 was finally able to output sample text to a screen.

Sending and drawing graphical data

As mentioned before, display connectors feature I2C lines for reading/writing display configuration data. But going past the display, all PCIe connectors also have a set of connectors for the SMBus that is compatible with I2C and can be easily written to with a system call in Linux. Mayer's finalized code for the Pico is still based on the PicoDVI project, but rather than manipulating individual pixels, he made the Pico act as an I2C peripheral device to accept commands and convert them into Adafruit GFX calls that eventually get written to the screen from a buffer.

PCB design

Once validation was completed on both the breadboard and breakout, Mayer designed a more compact PCB that would house the Raspberry Pi Pico, HDMI connector, and all of the necessary supporting components such as a voltage regulator and an array of resistors for impedance matching. Perhaps the most interesting aspect of the board is its PCIe x1 connector at the bottom which allows it to slot into a computer motherboard just like a graphics card would, thus allowing a program to drive a display via I2C.

To see more about how Mayer designed and fabricated this Pico-based GPU, you can watch his video here on the element14 Presents YouTube channel.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles