A USB Graphics Card for Just 20 Cents
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 execut




Comments
No comments yet. Be the first to share your thoughts.