# RP2040 RunCPM Emulator with USB Keyboard & HDMI screen

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/121/873/medium800thumb/microcontrollers_PXL_20230613_194705372.TS-opt.jpg?1686689301)

The CP/M operating system was created in 1974 and ran on the 8080 and Z-80 microprocessors. Before the rise of the IBM PC & MS-DOS, it was considered a powerful operating system, especially for home computers.

There are a number of CP/M emulators & simulators. One of them, [RunCPM by MockbaTheBorg](https://github.com/MockbaTheBorg/RunCPM/), was previously [adapted to run on the RP2040 family of microcontrollers by guidol70](https://github.com/guidol70/RunCPM_RPi_Pico). This project adds USB for keyboard input & HDMI for display output. The resulting computer is entirely self-contained and doesn't need a host computer to operate.

This project uses two Adafruit Feathers. Why's that? Both the [digital video output](https://learn.adafruit.com/picodvi-arduino-library-video-out-for-rp2040-boards) and the [USB Host](https://learn.adafruit.com/adafruit-feather-rp2040-with-usb-type-a-host) are implemented using [the RP2040's powerful PIO peripheral](https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython)—but each task requires almost all of the chip's capacity in order to do so. That made it necessary to split the project in half. One of the Feathers does the CPU and OS emulation plus the video signal generation. The other reads keystrokes and transmits them over a UART connection to the first board. It's not a Beowulf cluster, but it's still a cool technique to expand the capabilities in this project.

After putting the project together, you'll want to do something with it! There's a great deal of software for CP/M readily available on the internet. This guide will cover where to download some classic & modern CP/M software. With an assembler or a BASIC interpreter, you can even write your own new CP/M software right on the device.

## Parts
### Adafruit Feather RP2040 with DVI Output Port - Works with HDMI

[Adafruit Feather RP2040 with DVI Output Port - Works with HDMI](https://www.adafruit.com/product/5710)
Wouldn't it be cool if you could display images and graphics from a microcontroller directly to an HDMI monitor or television? We think so! So we designed this RP2040 Feather that has a digital video output (a.k.a DVI) that will work with any HDMI monitor or display. Note it doesn't do...

In Stock
[Buy Now](https://www.adafruit.com/product/5710)
[Related Guides to the Product](https://learn.adafruit.com/products/5710/guides)
![Video of DVI prototyping dev board sending graphic images to an HDMI monitor.](https://cdn-shop.adafruit.com/product-videos/640x480/5710-07.jpg)

### Adafruit Feather RP2040 with USB Type A Host

[Adafruit Feather RP2040 with USB Type A Host](https://www.adafruit.com/product/5723)
You're probably really used to microcontroller boards with USB, but what about a dev board with two? Two is more than one, so that makes it twice as good! And the&nbsp; **Adafruit Feather RP2040 with USB Host** is **&nbsp;** definitely double-the-fun of our other Feather...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5723)
[Related Guides to the Product](https://learn.adafruit.com/products/5723/guides)
![Angled shot of black rectangular microcontroller with USB C and USB A connectors at both ends.](https://cdn-shop.adafruit.com/640x480/5723-00.jpg)

### Adalogger FeatherWing - RTC + SD Add-on For All Feather Boards

[Adalogger FeatherWing - RTC + SD Add-on For All Feather Boards](https://www.adafruit.com/product/2922)
A Feather board without ambition is a Feather board without FeatherWings! This is the **Adalogger FeatherWing** : it adds both a battery-backed Real Time Clock and micro SD card storage to any Feather main board. Using our [Feather...](https://www.adafruit.com/products/2830)

In Stock
[Buy Now](https://www.adafruit.com/product/2922)
[Related Guides to the Product](https://learn.adafruit.com/products/2922/guides)
![Adalogger FeatherWing with Real time clock and SD card slot.](https://cdn-shop.adafruit.com/640x480/2922-11.jpg)

### HDMI 5" Display Backpack - Without Touch

[HDMI 5" Display Backpack - Without Touch](https://www.adafruit.com/product/2232)
It's a mini panel-mountable HDMI monitor! So small and simple, you can use this display with any computer that has HDMI output, and the shape makes it easy to attach to a case or rail. This backpack features the TFP401 for decoding video and includes the attached display, so it's...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2232)
[Related Guides to the Product](https://learn.adafruit.com/products/2232/guides)
![Top down view of a HDMI 5" Display Backpack - Without Touch connected to a Raspberry Pi powered by a USB. The HDMI screen displays a desktop image including the Raspberry Pi logo. ](https://cdn-shop.adafruit.com/640x480/2232-07.jpg)

### FeatherWing Tripler Mini Kit - Prototyping Add-on For Feathers

[FeatherWing Tripler Mini Kit - Prototyping Add-on For Feathers](https://www.adafruit.com/product/3417)
This is the **FeatherWing Tripler** - a prototyping add-on and more for all Feather boards. This is similar to our [FeatherWing Proto](https://www.adafruit.com/products/2884) except there are three! The magic of the Tripler comes when you want to connect your Feather to...

In Stock
[Buy Now](https://www.adafruit.com/product/3417)
[Related Guides to the Product](https://learn.adafruit.com/products/3417/guides)
![Triple prototyping feather wing PCB with socket headers installed](https://cdn-shop.adafruit.com/640x480/3417-05.jpg)

### Part:  Hand removing/installing micro SD card from SD adapter SD/MicroSD Memory Card (8 GB SDHC)
quantity: 1
Add mega-storage in a jiffy using this 8 GB class 4 micro-SD card. It comes with a SD adapter so you can use it with any of our shields or adapters. Preformatted to FAT so it works out...
[ Hand removing/installing micro SD card from SD adapter SD/MicroSD Memory Card (8 GB SDHC)](https://www.adafruit.com/product/1294)

### Part: 512MB micro SD Memory Card
quantity: 1
Add storage in a jiffy using this 512MB microSD card. Preformatted to FAT32, so it works out of the packaging with our projects. Works great with any device in the...
[512MB micro SD Memory Card](https://www.adafruit.com/product/5252)

### Part: USB MicroSD Card Reader/Writer - microSD / microSDHC / microSDXC
quantity: 1
This is the cutest little microSD card reader/writer - but don't be fooled by its adorableness! It's wicked fast and supports up to 64 GB SDXC cards! Simply slide the card into...
[USB MicroSD Card Reader/Writer - microSD / microSDHC / microSDXC](https://www.adafruit.com/product/939)

### Part:  Angled shot Mini Wireless Keyboard - Black w/ Batteries Mini Wireless Keyboard - Black w/ Batteries
quantity: 1
Add a good quality, slim keyboard to your Raspberry Pi, Beagle Bone Black or other mini-computer with this sleek black chiclet keyboard. It's a full QWERTY keyboard with a wireless...
[ Angled shot Mini Wireless Keyboard - Black w/ Batteries Mini Wireless Keyboard - Black w/ Batteries](https://www.adafruit.com/product/1737)

### Part: Pink and Purple Woven USB A to USB C Cable - 1 meter long
quantity: 1
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and...
[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)

### Part: Fully Reversible Pink/Purple USB A to micro B Cable - 1m long
quantity: 1
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save seconds a day by...
[Fully Reversible Pink/Purple USB A to micro B Cable - 1m long](https://www.adafruit.com/product/4111)

### Part: HDMI Flat Cable - 1 foot / 30cm long
quantity: 1
Connect two HDMI devices together and save space with this basic flat HDMI 1.4 cable. It has nice molded grips for easy installation, and is 1 foot long (~30 cm).This cable is...
[HDMI Flat Cable - 1 foot / 30cm long](https://www.adafruit.com/product/2197)

### Part: Black Nylon Machine Screw and Stand-off Set – M2.5 Thread
quantity: 1
Totaling 380 pieces, this M2.5 Screw Set is a must-have for your workstation. You'll have enough screws, nuts, and hex standoffs to fuel your maker...
[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)

- [Next Page](https://learn.adafruit.com/rp2040-runcpm-emulator-with-usb-keyboard-hdmi-screen/set-up-arduino.md)

## Featured Products

### Adafruit Fruit Jam - Mini RP2350 Computer

[Adafruit Fruit Jam - Mini RP2350 Computer](https://www.adafruit.com/product/6200)
We were catching up on a recent [hackaday hackchat with eben upton](https://hackaday.io/event/202122-raspberry-pi-hack-chat-with-eben-upton)&nbsp;and learned some fun facts: such as the DVI hack for the RP2040 was inspired by <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/6200)
[Related Guides to the Product](https://learn.adafruit.com/products/6200/guides)
### Adafruit Feather RP2040 with DVI Output Port - Works with HDMI

[Adafruit Feather RP2040 with DVI Output Port - Works with HDMI](https://www.adafruit.com/product/5710)
Wouldn't it be cool if you could display images and graphics from a microcontroller directly to an HDMI monitor or television? We think so! So we designed this RP2040 Feather that has a digital video output (a.k.a DVI) that will work with any HDMI monitor or display. Note it doesn't do...

In Stock
[Buy Now](https://www.adafruit.com/product/5710)
[Related Guides to the Product](https://learn.adafruit.com/products/5710/guides)
### Adafruit Feather RP2040 with USB Type A Host

[Adafruit Feather RP2040 with USB Type A Host](https://www.adafruit.com/product/5723)
You're probably really used to microcontroller boards with USB, but what about a dev board with two? Two is more than one, so that makes it twice as good! And the&nbsp; **Adafruit Feather RP2040 with USB Host** is **&nbsp;** definitely double-the-fun of our other Feather...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5723)
[Related Guides to the Product](https://learn.adafruit.com/products/5723/guides)
### Adalogger FeatherWing - RTC + SD Add-on For All Feather Boards

[Adalogger FeatherWing - RTC + SD Add-on For All Feather Boards](https://www.adafruit.com/product/2922)
A Feather board without ambition is a Feather board without FeatherWings! This is the **Adalogger FeatherWing** : it adds both a battery-backed Real Time Clock and micro SD card storage to any Feather main board. Using our [Feather...](https://www.adafruit.com/products/2830)

In Stock
[Buy Now](https://www.adafruit.com/product/2922)
[Related Guides to the Product](https://learn.adafruit.com/products/2922/guides)
### HDMI 5" Display Backpack - Without Touch

[HDMI 5" Display Backpack - Without Touch](https://www.adafruit.com/product/2232)
It's a mini panel-mountable HDMI monitor! So small and simple, you can use this display with any computer that has HDMI output, and the shape makes it easy to attach to a case or rail. This backpack features the TFP401 for decoding video and includes the attached display, so it's...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2232)
[Related Guides to the Product](https://learn.adafruit.com/products/2232/guides)
### FeatherWing Tripler Mini Kit - Prototyping Add-on For Feathers

[FeatherWing Tripler Mini Kit - Prototyping Add-on For Feathers](https://www.adafruit.com/product/3417)
This is the **FeatherWing Tripler** - a prototyping add-on and more for all Feather boards. This is similar to our [FeatherWing Proto](https://www.adafruit.com/products/2884) except there are three! The magic of the Tripler comes when you want to connect your Feather to...

In Stock
[Buy Now](https://www.adafruit.com/product/3417)
[Related Guides to the Product](https://learn.adafruit.com/products/3417/guides)
### SD/MicroSD Memory Card (8 GB SDHC)

[SD/MicroSD Memory Card (8 GB SDHC)](https://www.adafruit.com/product/1294)
Add mega-storage in a jiffy using this 8 GB class 4 micro-SD card. It comes with a SD adapter so you can use it with any of our shields or adapters. Preformatted to FAT so it works out of the box with our projects. Tested and works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1294)
[Related Guides to the Product](https://learn.adafruit.com/products/1294/guides)
### 512MB micro SD Memory Card

[512MB micro SD Memory Card](https://www.adafruit.com/product/5252)
Add storage in a jiffy using this **512MB** microSD card. Preformatted to FAT32, so it works out of the packaging with our projects. Works great with any device in the Adafruit shop that uses microSD cards. Ideal for use with Feathers, data loggers, or small Linux SBCs (not good...

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

## Related Guides

- [Adafruit Feather RP2040 with DVI Output Port](https://learn.adafruit.com/adafruit-feather-rp2040-dvi.md)
- [Adafruit Feather RP2040 with USB Type A Host](https://learn.adafruit.com/adafruit-feather-rp2040-with-usb-type-a-host.md)
- [Adafruit Fruit Jam](https://learn.adafruit.com/adafruit-fruit-jam.md)
- [Feather RP2350 Audio Reactive Video Synth](https://learn.adafruit.com/feather-rp2350-audio-reactive-video-synth.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)
- [Wireless ESP32-S2 Touch Screen Controller for Pure Data](https://learn.adafruit.com/wireless-esp32-s2-controller-for-pure-data.md)
- [USB C Power Delivery Monitor](https://learn.adafruit.com/usb-c-benchtop-power-supply.md)
- [Personal and Portable ESP32-S2 Web Server](https://learn.adafruit.com/wordle-personal-esp32-s2-web-server.md)
- [LED Emerald with Circuit Playground Bluefruit](https://learn.adafruit.com/led-emerald-with-circuit-playground.md)
- [Programming with Scratch 2 or 3 on Raspberry Pi](https://learn.adafruit.com/programming-with-scratch-on-raspberry-pi.md)
- [USB Host to BLE Keyboard Adapter](https://learn.adafruit.com/esp32-s3-usb-to-ble-keyboard-adapter.md)
- [Generating Text with ChatGPT, Pico W & CircuitPython](https://learn.adafruit.com/generating-text-with-chatgpt-pico-w-circuitpython.md)
- [AstroPrint 3D Printing](https://learn.adafruit.com/astroprint-3d-printing.md)
- [NeoPixel Mini VU Meter](https://learn.adafruit.com/neopixel-mini-vu-meter.md)
- [SD Card Performance in CircuitPython](https://learn.adafruit.com/microsd-optimization-circuitpython.md)
- [Using a Mouse with USB Host](https://learn.adafruit.com/using-a-mouse-with-usb-host.md)
- [MP3 Playback in CircuitPython with Lars the Sloth Puppet](https://learn.adafruit.com/mp3-circuitpython-lars.md)
- [32x32 Square Pixel Art Animation Display](https://learn.adafruit.com/32x32-square-pixel-display.md)
