# Adafruit DVI Breakout Board

## Overview

https://youtu.be/dk4p7q6CDzw

![](https://cdn-learn.adafruit.com/assets/assets/000/111/260/medium800thumb/components_4984-04_1.jpg?1651495550)

We designed this little breakout board after seeing [some cool demos for the Raspberry Pi Pico driving an HDMI display](https://github.com/Wren6991/PicoDVI). By using some fun 'abuse' of overclocking and the RP2040's PIO system, a low-cost microcontroller can have great looking video output. Great for making demos, or just noodling around with digital video generation.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/994/medium800/components_4984-01.jpg?1690378935)

This breakout board has no active components on it. It's just a connector you can plug an HDMI/DVI cable into, and 220 ohm series resistors. There's a spot for an I2C EEPROM and some resistors, but those are for advanced folks who may want to create a 'sink' device with an EDID. We don't place those parts on this breakout, since this is intended to be a 'source' only!

![](https://cdn-learn.adafruit.com/assets/assets/000/122/995/medium800/components_4984-05.jpg?1690379540)

Wire it up to the bottom pins of your Pico board with the following:

- GP12 to D0+
- GP13 to D0-
- GP14 to CK+
- GP15 to CK-
- GP16 to D2+
- GP17 to D2-
- GP18 to D1+
- GP19 to D1-

And tie all the grounds together to one ground pin.&nbsp;[Then you can download this superfun example that will give you bouncy Eben heads](https://cdn-shop.adafruit.com/product-files/4984/picodvi-test.zip)&nbsp;(from&nbsp;[this tutorial](https://picockpit.com/raspberry-pi/raspberry-pi-pico-video-output/))

![](https://cdn-learn.adafruit.com/assets/assets/000/122/996/medium800/components_4984-03.jpg?1690379552)

# Adafruit DVI Breakout Board

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/111/263/medium800/components_front_Back.png?1651497277)

## Power Pins

- **5** &nbsp;- This is the 5V power pin. It is available for use if you're adding an I2C EEPROM to the board.
- **GND pins** &nbsp;- These are common ground for power and logic.

## Data Pins

The following&nbsp;[Transition-Minimized Differential Signaling (TMDS)](https://en.wikipedia.org/wiki/Transition-minimized_differential_signaling) pins for the DVI connector are available on the breakout board. They transmit highspeed serial data.

- **TXC+** and **TC-** - TMDS clock signal pins. Connects to the DVI port with 220 ohm series resistors.&nbsp;
- **TX0+** and **TX0-** - TMDS channel 0 signal pins. Connects to the DVI port with 220 ohm series resistors.&nbsp;
- **TX1+** and **TX1-** - TMDS channel 1 signal pins. Connects to the DVI port with 220 ohm series resistors.&nbsp;
- **TX2+** and **TX2-** - TMDS channel 2 signal pins. Connects to the DVI port with 220 ohm series resistors.&nbsp;

## I2C Logic Pins

There's a spot for an I2C EEPROM and some resistors, but those are for advanced folks who may want to create a 'sink' device with an EDID. We don't place those parts on this breakout.

- **C&nbsp;** - I2C clock pin, connect to your microcontroller's I2C clock line. Connected to the DVI port's DCLK line.
- **D&nbsp;** - I2C data pin, connect to your microcontroller's I2C data line. Connected to the DVI port's DDAT line.

# Adafruit DVI Breakout Board

## Raspberry Pi Pico Demo Code

Using the DVI Breakout Board&nbsp;with a Raspberry Pi Pico involves wiring up the breakout to the Raspberry Pi Pico, installing the [Raspberry Pi Pico development toolchain](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf), building examples from the [PicoDVI repository](https://github.com/Wren6991/PicoDVI/tree/master/software) and flashing the compiled .UF2 files to the Raspberry Pi Pico.

Warning: 

## Wiring

Wire as shown for Raspberry Pi Pico.

- **Pico GP12** to **Breakout**  **TX0+** (blue wire)
- **Pico GP13** to **Breakout TX0-** (yellow wire)
- **Pico GP14** to **Breakout TXC+** (green wire)
- **Pico GP15** to **Breakout TC-** (pink wire)
- **Pico GP16** to **Breakout TX2+** (white wire)
- **Pico GP17** to **Breakout TX2-** (cyan wire)
- **Pico GP18** to **Breakout TX1+** (purple wire)
- **Pico GP19** to **Breakout TX1-** (orange wire)
- **Pico GND** to all three **Breakout GND**'s (black wires)

![components_dviPico_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/111/703/medium640/components_dviPico_bb.png?1652453295)

## Toolchain Setup

To work on C/C++ development with the Raspberry Pi Pico, you need to have a toolchain environment setup on your system. There is support for Linux (including running it on a Raspberry Pi), Apple macOS and Windows.&nbsp;

Instructions for setting up the toolchain can be found from Raspberry Pi in their [Getting Started with Pico](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf) guide:

- For Linux, refer to section 2.1
- For Apple macOS, refer to section 9.1
- For Windows, refer to section 9.2

Warning: 

## PicoDVI Installation

After setting up your toolchain and the Pico SDK, you will download and build the [PicoDVI software](https://github.com/Wren6991/PicoDVI). This software is authored by Luke Wren, an engineer who worked on the RP2040 project at Raspberry Pi.

First, create a new directory called `pico` and navigate to the directory.

```terminal
mkdir pico
cd pico
```

Clone the `PicoDVI` repository from GitHub. Then, navigate to the **software** folder in the downloaded **PicoDVI** folder.

```terminal
git clone https://github.com/Wren6991/PicoDVI.git
cd PicoDVI/software
```

Next, you'll begin compiling the examples. Create a new directory in the **software** directory called **build**. Then, navigate to the **build** folder.

```terminal
mkdir build
cd build
```

Setup the `cmake` parameters by assigning the `PICO_SDK_PATH` to the file location on your system for the Pico SDK. For example, if you setup the Pico SDK to be in your home directory, you would pass `PICO_SDK_PATH=~/home/pico-sdk`.&nbsp;

It's important to include `PICO_COPY_TO_RAM=1` since it increases performance for some of the applications because they use SSI in fast DMA streaming mode.

```terminal
PICO_SDK_PATH=your/path/to/pico/sdk cmake -DPICO_COPY_TO_RAM=1 ..
```

After the parameters have been set, you can run `make` to create the .UF2 files that will run on your Raspberry Pi Pico. This builds all of the example apps.

```terminal
make -j4
```

[For more information on building the apps, check out the Readme on the software page of the PicoDVI repository](https://github.com/Wren6991/PicoDVI/tree/master/software)
## Flashing the .UF2 File to the Raspberry Pi Pico

Choose the example app that you would like to run on your Raspberry Pi Pico. Hold down the **BOOTSEL** button on your Pico and plug it into your computer's USB port using a USB cable that you know is good for data sync. You can drag and drop the .UF2 file onto the Pico or copy the file via the terminal using `cp`.&nbsp;

Here is an example of what copying a file via the terminal to the Pico would look like. You would enter the file location for your selected .UF2 file and then enter the location of your **RPI-RP2** drive on your system.

```terminal
cp PicoDVI/software/build/apps/sprite_bounce/sprite_bounce.uf2 /media/username/RPI-RP2/
```

You can run `ls` in the **PicoDVI/software/build/apps** folder to see a list of the available apps.

![](https://cdn-learn.adafruit.com/assets/assets/000/111/287/medium800/components_apps.png?1651525600)

## Running the App

After flashing the .UF2 file, keep your Raspberry Pi Pico plugged in via USB for power. Plug an HDMI cable into the DVI Breakout Board. Connect the other end of the HDMI cable into an HDMI monitor. You should see your application playing on the screen.

![](https://cdn-learn.adafruit.com/assets/assets/000/111/286/medium800thumb/components_4984-04_1.jpg?1651525163)

# Adafruit DVI Breakout Board

## PicoDVI GitHub Repository

# Adafruit DVI Breakout Board

## Sprite Conversion

https://youtu.be/dk4p7q6CDzw

## PNG

If you need to create custom sprite images for one of the demos, such as **sprite\_bounce** , you can use the `packtiles` script.

First, create a 128x128 pixel .png image and place it in the **pico/PicoDVI/software/assets** directory. (You can also download one of the lovely sprites provided below.)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/483/medium800/components_pt_128x128.png?1652239980)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/484/medium800/components_larshead_128x128.png?1652239985)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/485/medium800/components_limor_128x128.png?1652239994)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/486/medium800/components_tod_128x128.png?1652240007)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/487/medium800/components_toebeans_128x128.png?1652240023)

## Packtiles

Next, from a terminal `cd pico/PicoDVI/software` (your path may be different depending on where you installed it).

Run this command to convert the **pt\_128x128.png** file:

`./scripts/packtiles -sdmf rgab5515 assets/pt_128x128.png  assets/pt_128x128_rgab5515.h`

This will generate a converted .h file asset that can be compiled into the code.

## Edit main.c

To use this new asset in the sprite\_bounce demo code, head to **pico/PicoDVI/software/apps/sprite\_bounce** and open **main.c** in your editor.

You can look for one of the original sprites, such as (around line 24):

`include "eben_128x128_rgab5515.h"`

and swap that for the new one:

`include "pt_128x128_rgab5515.h"`

Then, swap out the asset used by the `berry[]` array:

`berry[i].img = i % 2 ? pt_128x128 : raspberry_128x128;`

Re-save the **main.c** file.

## Build

Now, you can build the app:

`cd PicoDVI`  
`mkdir build`  
`cd build`  
`PICO_SDK_PATH=path/to/sdk cmake -DPICO_COPY_TO_RAM=1 ..`  
`make -j4 `

This will create the **sprite\_bounce.uf2** file we need and place it in the **pico/PicoDVI/software/build/apps/sprite\_bounce** directory.

## Run It

Now, you can flash the Pico with the new **sprite\_bounce.uf2** file just as shown previously on the [Demo Code page!](https://learn.adafruit.com/adafruit-dvi-breakout-board/raspberry-pi-pico-demo-code)

# Adafruit DVI Breakout Board

## Downloads

## Files

- [HDMI Connector pinout](https://learn.adafruit.com/assets/111264)
- [EagleCAD PCB Files on GitHub](https://github.com/adafruit/Adafruit-DVI-Breakout-Board-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20DVI%20Breakout.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/111/261/medium800/components_schem.png?1651496250)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/262/medium800/components_fabPrint.png?1651496260)


## Primary Products

### Adafruit DVI Breakout Board - For HDMI Source Devices

[Adafruit DVI Breakout Board - For HDMI Source Devices](https://www.adafruit.com/product/4984)
We designed this little breakout board after seeing [some cool demos for the Raspberry Pi Pico driving an HDMI display](https://github.com/Wren6991/PicoDVI). By using some fun 'abuse' of overclocking and the RP2040's PIO system a low-cost microcontroller can have great...

In Stock
[Buy Now](https://www.adafruit.com/product/4984)
[Related Guides to the Product](https://learn.adafruit.com/products/4984/guides)

## Related Guides

- [Adafruit Monster Eyes](https://learn.adafruit.com/adafruit-monster-eyes.md)
- [NES Emulator for RP2040 & RP2350 DVI Boards](https://learn.adafruit.com/nes-emulator-for-rp2040-dvi-boards.md)
- [Using DVI Video in CircuitPython](https://learn.adafruit.com/using-dvi-video-in-circuitpython.md)
- [Wires and Connections](https://learn.adafruit.com/wires-and-connections.md)
- [Plotting Offline Data - JSONL to CSV files, filters and graphs](https://learn.adafruit.com/plotting-offline-data-jsonl-to-csv-files-filters-and-graphs.md)
- [Understanding USB Type C: Cable Types, Pitfalls and More](https://learn.adafruit.com/understanding-usb-type-c-cable-types-pitfalls-and-more.md)
- [Leverless Controller](https://learn.adafruit.com/leverless-controller.md)
- [Boomy Pi Airplay Boombox](https://learn.adafruit.com/boomy-pi-airplay.md)
- [Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board](https://learn.adafruit.com/adafruit-bq25185-usb-dc-solar-charger-with-3-3v-buck-board.md)
- [Adding Third Party Boards to the Arduino v1.6.4+ IDE](https://learn.adafruit.com/add-boards-arduino-v164.md)
- [Adafruit TCA8418 Keypad Matrix and GPIO Expander Breakout](https://learn.adafruit.com/adafruit-tca8418-keypad-matrix-and-gpio-expander-breakout.md)
- [USB MIDI Host Messenger](https://learn.adafruit.com/usb-midi-host-messenger.md)
- [Open Source Protective Face Shield Designs](https://learn.adafruit.com/open-source-face-shield-designs.md)
- [USB C Dock](https://learn.adafruit.com/usb-c-dock.md)
- [AI 3D Printed Figure](https://learn.adafruit.com/ai-figure.md)
