# Adafruit DVI Sock for Pico

## Overview

Info: The DVI Sock uses the HSTX pins on the Pico 2, so it is compatible with both CircuitPython and Arduino.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/705/medium800thumb/adafruit_products_5957-01.jpg?1714482458)

Wouldn't it be cool to display images and graphics directly from your Pico or Pico W to an HDMI monitor or television? We think so! So we designed this **DVI Sock** with a digital video output (a.k.a DVI) that will work with any HDMI monitor or display. Note it doesn't do audio, just graphics!

![](https://cdn-learn.adafruit.com/assets/assets/000/129/706/medium800/adafruit_products_5957-04.jpg?1714482503)

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

![](https://cdn-learn.adafruit.com/assets/assets/000/129/707/medium800/adafruit_products_5957-03.jpg?1714482557)

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. Wire it up to the bottom pins of your Pico board, or solder it directly onto the 'end' like a li'l PCB sock. The connections that are made:

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

![](https://cdn-learn.adafruit.com/assets/assets/000/129/710/medium800/adafruit_products_5957-06.jpg?1714482642)

We also breakout the 5V, GND, Hot-Plug Detect, CEC and Util pins, for more advanced hacking. Note that while _technically_ you're supposed to provide 5V to the DVI port, it isn't convenient to do so on the Sock so it's left disconnected. Since the 5V is used for the I2C EDID EEPROM and we don't care about it, the 'Sock will work just fine without.

# Adafruit DVI Sock for Pico

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/129/714/medium800/adafruit_products_double.jpg?1714484648)

## Power Pins

- **5** &nbsp;- This is the 5V power pin. It is not connected by default. 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.

## HDMI Connector

On the end of the board is the HDMI connector. It provides DVI output to any HDMI display or monitor. The following GPIO pins are routed to the connector:

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

## Additional HDMI Pins

Three additional pins for the HDMI connector are broken out on either side of the HDMI port. You can route them to GPIO pins if you would like to use them:

- **Utility pin** - labeled **Util** on the board silk. This pin is reserved for future HDMI specification updates
- **CEC pin** - labeled **CEC** on the board silk. [Consumer Electronic Control](https://en.wikipedia.org/wiki/Consumer_Electronics_Control) is a one-wire bidirectional serial bus that is standardized for remote control functions
- **Hot Plug Detection pin** - labeled **HPD** on the board silk. Hot plug detection is used to detect if a device is connected or disconnected to the HDMI connector by&nbsp;monitoring power, plug and unplug events

# Adafruit DVI Sock for Pico

## CircuitPython

Info: The DVI Sock uses the HSTX pins on the Pico 2, so it is compatible with CircuitPython.

It's easy to use the **DVI Sock** with CircuitPython and the [PicoDVI](https://docs.circuitpython.org/en/latest/shared-bindings/picodvi/index.html) core module. This module [has been added to CircuitPython as of 8.1.0b2](https://github.com/adafruit/circuitpython/releases/tag/8.1.0-beta.2) - but note that it uses a _lot_ of memory so in particular if you want to use Pico W with WiFi support, you'll likely only be able to get away with monochrome display.

## Wiring

Attach the Sock to the bottom pins of your Pico board, or solder it directly onto the 'end' like a li'l PCB sock.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/724/medium800/adafruit_products_5957-06.jpg?1714489182)

## CircuitPython Usage

To use with CircuitPython, you need to first install the PicoDVI dependencies into the **lib** folder onto your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file.

Connect your Pico board to your computer via a known good data+power USB cable. The board should show up in your File Explorer/Finder (depending on your operating system) as a flash drive named **CIRCUITPY**.

Extract the contents of the zip file, and copy the **entire lib folder** , the **Helvetica-Bold-16.pcf** font file, **blinka\_computer.bmp** bitmap file and **code.py** file to your **CIRCUITPY** drive.

Your **CIRCUITPY/lib** folder should contain the following folders and file:

- **adafruit\_bitmap\_font/**
- **adafruit\_display\_shapes/**
- **adafruit\_display\_text/**
- **simpleio.mpy**

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/Pico_DVI_Sock_Examples_CircuitPython.png )

## Hello World DVI Output Example

Once everything is saved to the&nbsp; **CIRCUITPY** drive, you can connect the DVI Sock to an HDMI monitor and connect your Pico to USB power. You'll see the Hello World example display on the screen.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_DVI_Sock_Examples/CircuitPython/code.py

This example is a port of the [Arduino **16bit\_hello** code written by Phil B](https://github.com/adafruit/PicoDVI/blob/master/examples/16bit_hello/16bit_hello.ino). with some slight variation to show off some of the unique abilities of **displayio**.

The example begins by showing a rectangle, circle, triangle and rounded rectangle and changing the fill attribute from `None` to a color.

Then, a few chart variations are shown, including a sine wave pattern, line graph and bar graph.

Next is a text alignment example, showing how to use the `anchor_point` and `anchor_position` functions in the **adafruit\_display\_text** library.

Following that is a custom text example, loading a bitmap font instead of the built-in **terminalio** font.

Then there is a quick break from fonts to show off a bitmap image, specifically Blinka happily using her computer.

Finally, an example shows how to update the text in a `Label` object for projects where you want to display text information that updates over time.

# Adafruit DVI Sock for Pico

## Python Docs

# Adafruit DVI Sock for Pico

## Arduino

Using the DVI Sock with Arduino involves connecting the DVI Sock to a Pico board, connecting the boards to an HDMI monitor and USB power, installing the Adafruit fork of the PicoDVI library and running the provided example code.

## Wiring

Attach the Sock to the bottom pins of your Pico board, or solder it directly onto the 'end' like a li'l PCB sock.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/726/medium800/adafruit_products_5957-06.jpg?1714491570)

## Library Installation

You can install the&nbsp; **Adafruit fork of the PicoDVI&nbsp;** library for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/727/medium800/adafruit_products_Arduino_Open_Library_Manager.png?1714491588)

Click the&nbsp; **Manage Libraries ...** &nbsp;menu item, search for **PicoDVI -**  **Adafruit Fork** &nbsp;and select the **PicoDVI -**  **Adafruit Fork** &nbsp;library:

![](https://cdn-learn.adafruit.com/assets/assets/000/129/728/medium800/adafruit_products_lib.png?1714491795)

If asked about dependencies for any of the libraries, click "Install all".

![](https://cdn-learn.adafruit.com/assets/assets/000/129/729/medium800/adafruit_products_depends.png?1714491803)

If the "Dependencies" window does not come up, then you already have the dependencies installed.

Warning: If the dependencies are already installed, you must make sure you update them through the Arduino Library Manager before loading the example!

## Example Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_DVI_Sock_Examples/Arduino_Pico_DVI_Sock/Arduino_Pico_DVI_Sock.ino

Upload the Example Code to the Pico. Then, you can connect the DVI Sock to an HDMI monitor and USB power to the Pico. You'll see the **16bit\_hello** example display on the screen.

There is an [excellent explainer page](https://learn.adafruit.com/picodvi-arduino-library-video-out-for-rp2040-boards/16bit_hello) for the example code in the PicoDVI Arduino Library Learn Guide.

### PicoDVI Arduino Library: Video Out for RP2040 Boards - 16bit_hello

[PicoDVI Arduino Library: Video Out for RP2040 Boards](https://learn.adafruit.com/picodvi-arduino-library-video-out-for-rp2040-boards)
[16bit_hello](https://learn.adafruit.com/picodvi-arduino-library-video-out-for-rp2040-boards/16bit_hello)
# Adafruit DVI Sock for Pico

## Arduino Docs

# Adafruit DVI Sock for Pico

## Downloads

## Files

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

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/129/711/medium800/adafruit_products_schem.png?1714483079)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/712/medium800/adafruit_products_fab.png?1714483175 dimensions are in inches)


## Primary Products

### Adafruit DVI Sock for Pico - Works with HDMI Displays

[Adafruit DVI Sock for Pico - Works with HDMI Displays](https://www.adafruit.com/product/5957)
Wouldn't it be cool to display images and graphics directly from your Pico or Pico W&nbsp;to an HDMI monitor or television? We think so! So we designed this **DVI Sock** with a digital video output (a.k.a DVI) that will work with any HDMI monitor or display. Note it...

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

## Featured Products

### Raspberry Pi Pico RP2040

[Raspberry Pi Pico RP2040](https://www.adafruit.com/product/4864)
The Raspberry Pi foundation changed single-board computing [when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new **Raspberry Pi Pico**. This...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4864)
[Related Guides to the Product](https://learn.adafruit.com/products/4864/guides)
### Raspberry Pi Pico W

[Raspberry Pi Pico W](https://www.adafruit.com/product/5526)
The Raspberry Pi foundation changed single-board computing [when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new **Raspberry Pi Pico W**. This...

In Stock
[Buy Now](https://www.adafruit.com/product/5526)
[Related Guides to the Product](https://learn.adafruit.com/products/5526/guides)
### HDMI Cable - 1 meter

[HDMI Cable - 1 meter](https://www.adafruit.com/product/608)
Connect two HDMI devices together with this basic HDMI cable. It has nice molded grips for easy installation, and is 1 meter long (about 3 feet). This is a HDMI 1.3 cable.

We're now stocking a very fancy Official Raspberry Pi cable with overmolding and a Pi logo. Please note...

In Stock
[Buy Now](https://www.adafruit.com/product/608)
[Related Guides to the Product](https://learn.adafruit.com/products/608/guides)
### 7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL

[7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL](https://www.adafruit.com/product/1667)
Yes, this is an adorable small HDMI television with incredibly high resolution **and built in 3W stereo speakers**! We tried to get the smallest possible HDMI/VGA display with high-res, high-contrast visibility. The visible display measures only 7" (17.8cm) diagonal, and the TFT comes...

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

## Related Guides

- [Adafruit TCA8418 Keypad Matrix and GPIO Expander Breakout](https://learn.adafruit.com/adafruit-tca8418-keypad-matrix-and-gpio-expander-breakout.md)
- [Introducing Adafruit ItsyBitsy M4](https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4.md)
- [Adafruit PC Joystick to seesaw I2C Adapter](https://learn.adafruit.com/adafruit-pc-joystick-to-seesaw-i2c-adapter.md)
- [2.3" Monochrome 128x32 OLED Display Module](https://learn.adafruit.com/2-3-monochrome-128x32-oled-display-module.md)
- [JOY of Arcada — USB Game Pad for Adafruit PyGamer and PyBadge](https://learn.adafruit.com/joy-of-arcada-usb-game-pad-for-adafruit-pygamer-pybadge.md)
- [Adafruit S-35710 Low-Power Wake Up Timer Breakout](https://learn.adafruit.com/adafruit-s-35710-low-power-wake-up-timer-breakout.md)
- [Black Lives Matter Education & Workshop Kit](https://learn.adafruit.com/black-lives-matter-badge.md)
- [Tyrell Desktop Synthesizer](https://learn.adafruit.com/tyrell-desktop-synthesizer.md)
- [DIY Robotic Sky Tracking Astrophotography Mount with CircuitPython](https://learn.adafruit.com/diy-robotic-sky-tracking-astrophotography-mount.md)
- [Ladyada's Bento Box](https://learn.adafruit.com/lady-adas-bento-box.md)
- [Fruit Jam, Zork and the Z Machine](https://learn.adafruit.com/zork-and-the-z-machine.md)
- [Adafruit USB Host BFF](https://learn.adafruit.com/adafruit-usb-host-bff.md)
- [Arcada Animated GIF Display](https://learn.adafruit.com/pyportal-animated-gif-display.md)
- [Adafruit STCC4 and SHT41 CO2, Temperature & Humidity Sensor](https://learn.adafruit.com/adafruit-stcc4-and-sht41-co2-temperature-humidity-sensor.md)
- [Adafruit Infrared IR Remote Transceiver](https://learn.adafruit.com/adafruit-infrared-ir-remote-transceiver.md)
