YouTuber Bitluni is well known for his oddly endearing endeavors with low-level hardware work, and this time he chose a seemingly simple one: use no main components other than a small microcontroller to make a VGA "graphics card." This is a road he's traveled before, but now he wanted to make the card smaller still, opting for glorious monochrome video, with impressive results for only 20 cents' worth of components.
In a previous VGA adventure, Bitluni used a CH32V003 RISC-V microcontroller, but found it a little too limiting for his taste. Browsing the spec sheet for its successor, the CH570, he was interested in the doubled RAM capacity and integrated USB connectivity, and even Bluetooth. So he got to work, with the first step being leveraging a PWM signal to make an impromptu DAC. Those are weird words, so we'll explain. (Related: Leveraging Pre-trained Language Model Checkpoints for E...)
A DAC, or digital-to-analog converter, is a part that takes a signal made of ones and zeros and converts it to voltage steps. They're everywhere, but the CH570 doesn't have one. However, you can leverage a PWM (pulse-width modulator), which flips on and off in rapid succession, as an approximation of voltage over time. This sounds odd, but it does work, and it is also the principle behind modern Class D audio amplifiers used in hi-fi, PA, and instruments. Bitluni was satisfied with 16 shades of gray, down from the 50 others might aim for.
Recent findings suggest that the CH570 has a very limited amount of RAM, so getting a full frame of graphics in it would be too eager a challenge at first, so he elected to render text at half the possible vertical resolution. This was extremely slow, though, until he realized that to properly leverage the CH570's speed, you need to put the code you intend to run into its SRAM cache first. After this fix, the picture generation ran 24x faster and enabled him to squeeze 34x37 characters. (Related: How to generate text: using different decoding methods ...)
With that working, he set to task recreating graphics, and after some more optimization work, he finally got Rick Astley dancing on screen, as tradition commands. The small animation was but a few frames long and in low resolution, but was very clearly recognizable. All this while, his development kit was connected to a tiny CRT television via its composite input, but now it was time to make actual physical gear.
Recent findings suggest that he designed a simple PCB with enough room for the CH570, along with a USB-C connector and a few assorted bits and bots. The board cost him $15 for a pack of 10, and set about $0.20 worth of components on it, with the CH570 being the dearest at $0.13. The exceedingly tiny board worked quite well, even down to the improvised RCA barrel "jack" that was just a couple of grooves.
The final step was using USB for connectivity, as he wanted to use the connection as a serial bus via USB CDC. This took a few tries, because the now-enabled USB connectivity needed to be handled by the CH570's CPU, and the time slices needed for it were eating into the video signal. After a few more optimization passes, Bitluni finally got the TV to display what he was typing. As an added bonus, he found that his development kit's jumper wire was acting as an impromptu VHF antenna and almost managed to lock the TV signal onto it.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Industry observers note that download the Tom's Hardware app for up-to-the-minute updates on iOS and Android. Also follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.
According to recent reports, bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.
