20-Cent USB Graphics Card Where a 13-Cent RISC-V Chip Puts PC Text on an Old Analog TV

User Avatar Aswinth Raj
Author
Share
Bitluni's 20-Cent USB Graphics Card Project

A graphics card does not have to be a power-hungry slab of silicon. Maker bitluni built a USB-to-composite-video adapter whose parts cost about 20 cents: a 13-cent CH570 RISC-V microcontroller, a crystal and a handful of passives. Plug it into a computer's USB-C port and an old TV's RCA input, and it shows greyscale text and simple graphics. His build video passed 380,000 views within two days of going up on 21 November.

Both connectors are just PCB

There are no USB or RCA connectors on the board. The USB-C plug is the edge of a 0.8 mm thick PCB with exposed contacts, a trick already common on cheap gadgets. The RCA plug is new: bitluni used an elongated, plated slot in the board so it pushes into a female RCA socket. The MCU is the only active part; the crystal, at about 3 cents, is the most expensive passive, and the chip's internal regulator proved good enough, so the optional external one was left off.

PWM as a video DAC

The CH570 has no video hardware and its DMA cannot drive parallel output pins, so bitluni turned the PWM peripheral into a crude digital-to-analog converter. A DMA stream changes the PWM duty cycle every period, so each period becomes one pixel at a different voltage, from the 0.3 V black level up to about 1 V for white, with lower sync pulses for lines and fields. Running PWM straight off the system clock with a 16-cycle period gave 11 grey levels, enough for readable composite video.

Compared with the CH32V003 he used before, the CH570 has about six times the RAM and twice the speed, which finally left room for a frame buffer. Timing was still the hard part: high-speed code had to run from SRAM because the compiler was pulling some functions from slower flash, and USB interrupts delayed the video buffer until he moved more into SRAM. The result shows up to 34 rows of text, and the board appears on the PC as a USB CDC serial device, so anything sent to the port is drawn on screen. He used it to show livestream chat in retro style.

Side discoveries

While testing, his TV in antenna mode also picked up the PWM signal through a breadboard jumper acting as a transmitter in the VHF band III range. He also found that the CH570's SPI peripheral, run out of spec at 150 MHz with a divider of 4, lands close to the PAL colour carrier frequency, which may make colour output possible later.

The KiCad project, a 3D-printable case and the code are in the CH570Composite repository. For more on cheap RISC-V chips, see the 10-cent RISC-V MCU development kit and bitluni's earlier 16-core RISC-V supercluster for $2.

Image credit: bitluni, video thumbnail, cropped and resized.

About the author: Aswinth Raj is an electronics engineer and the editor of CircuitDigest, where he has published more than 150 hands-on projects and tutorials across Arduino, PIC, ESP32, Raspberry Pi and EV battery systems. He selects the stories on this page for what engineers and makers can actually learn or build from. Connect on LinkedIn

Have any question related to this Article?

Add a comment

No account needed. Your comment appears once a moderator has reviewed it.

Never shown publicly.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.