A USB Graphics Card for Just 20 Cents
By Nick Bild
20 cents won't buy you much these days, but as it turns out, it is enough to build a graphics adapter. Hardware hacker Bitluni recently put together a tiny USB device that can display text and simple grayscale graphics on an old analog television. He managed to pull it off with a 13-cent RISC-V microcontroller, a handful of passive components, and some clever programming to squeeze video output from hardware that was never meant to be a GPU. The device, which Bitluni calls a USB GPU, is built around a CH570 RISC-V microcontroller. Despite its low price, the chip packs a processor running at up to 100 MHz, native USB support, a 2.4 GHz radio, and enough memory to handle basic video generation. Compared to the CH32V003 microcontroller he had experimented with previously, the CH570 offers twice the processing speed and six times the RAM. Keeping the total cost down took some creative hardware design. Rather than using normal USB and RCA connectors, Bitluni incorporated both directly into the PCB. The USB connector consists of exposed copper contacts along one edge of the board, and the RCA connector uses a specially shaped plated slot. Aside from the microcontroller, the board needs only a crystal oscillator and a few resistors and capacitors. Generating a composite video signal turned out to be quite a lot more challenging than assembling the hardware. The CH570 lacks the convenient DMA-to-GPIO functionality available on the earlier microcontroller, so Bitluni had to find another way to produce precisely timed analog video signals. His solution was to use pulse-width modulation (PWM), with DMA feeding brightness values to the PWM peripheral. By varying the duty cycle, the microcontroller can generate the voltage levels needed for synchronization and grayscale pixels. Without enough RAM for a standard full-resolution framebuffer, Bitluni developed a text mode that stores ASCII characters and renders them using an 8×8 pixel font on the fly. He also found that executing time-critical code from SRAM instead of the chip's relatively slow flash memory could improve performance by roughly 24 times. After plenty of trial and error, including a particularly frustrating compiler optimization that disrupted video timing, he managed to achieve a text resolution of 37 columns by 34 rows. The finished device can function as a USB serial terminal, displaying text sent from a computer on an analog television. Bitluni demonstrated it with text messages and ASCII art, and designed a small enclosure to finish things off. The final cost of the USB GPU was 20 cents, not counting the cost of manufacturing and shipping the PCB. Nobody is going to mistake its grayscale output for a modern graphics card. Still, getting usable video out of a device that costs less than a quarter is an impressive demonstration of just how much computing hardware you can buy for practically nothing.Never gonna give you up... (📷: Bitluni) The graphics adapter (📷: Bitluni)
↑ Back to top
Originally published by
Hackster News ↗
· rebuilt here from its own full-text RSS feed · all rights
remain with the publisher, please read and support them there.