12-04 更新 实时
首页/ 算力市场/ 正文

Bitluni 用单个微控制器做出 20 美分 USB GPU

算力市场 来源:Tom's Hardware 2026-11-29 19:30 1 阅读 机器翻译
Bitluni 用单个微控制器做出 20 美分 USB GPU

YouTuber Bitluni 以其在底层硬件工作中那些古怪却又讨人喜的尝试而闻名,而这一次他选择了一个看似简单的项目:除了一颗小型微控制器之外,不使用任何主要元件,做出一块 VGA“显卡”。这条路他以前走过,但这次他想把这块卡做得更小,并选择了效果出色的单色视频,仅用价值 20 美分的元件就取得了令人印象深刻的结果。

在此前一次 VGA 尝试中,Bitluni 使用了一颗 CH32V003 RISC-V 微控制器,但觉得它对自已来说限制有点多。在翻阅其继任者 CH570 的规格表时,他对翻倍的 RAM 容量、集成 USB 连接甚至蓝牙产生了兴趣。于是他开始动手,第一步就是利用 PWM 信号临时搭出一个 DAC。这些词听起来很怪,所以我们来解释一下。

DAC,即数模转换器,是一种把由 1 和 0 组成的信号转换为电压阶梯的元件。它们随处可见,但 CH570 并没有。不过,你可以利用 PWM(脉宽调制)——它以极快的速度反复开与关——来近似地表示随时间变化的电压。这听起来很奇怪,但确实可行,而且它也是现代 D 类音频放大器背后的原理,这类放大器被用于高保真音响、扩声系统和乐器。Bitluni 对 16 级灰度已经满意,而别人可能会追求 50 级。

CH570 的 RAM 容量非常有限,因此一开始想让它存下一整帧图形,野心未免太大,于是他选择以可用垂直分辨率的一半来渲染文字。不过,这样做的速度极慢,直到他意识到,要真正发挥 CH570 的速度,必须先把你打算运行的代码放进它的 SRAM 缓存中。做出这一修正后,画面生成速度提升了 24 倍,让他得以在屏幕上塞下 34x37 个字符。

在这一点跑通之后,他便着手重现图形,又经过一番优化,他终于按照传统,让 Rick Astley 在屏幕上跳起舞来。这段小动画只有寥寥几帧,分辨率也很低,但辨识度非常清晰。整个过程中,他的开发板一直通过复合视频输入接口连着一台小小的 CRT 电视,但现在是时候做真正的实体硬件了。

他设计了一块简单的 PCB,留出足够空间容纳 CH570,外加一个 USB-C 接口和一些杂七杂八的元件。这块板子一包 10 片花了他 15 美元,板上元件约值 0.20 美元,其中最贵的是 CH570,为 0.13 美元。这块极其微小的板子运转得相当不错,就连那个临时凑合的 RCA 筒形“插座”——不过是几道凹槽而已——也照样能用。

最后一步是用 USB 实现连接,因为他想通过 USB CDC 把这条连接当作串行总线来用。这一步试了几次才成功,因为如今启用的 USB 连接需要由 CH570 的 CPU 来处理,而它所需的时间片会挤占视频信号。又经过几轮优化,Bitluni 终于让电视显示出了他正在输入的内容。额外的惊喜是,他发现开发板上的跳线起到了临时 VHF 天线的作用,几乎让电视信号锁定在了它上面。

译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。

查看英文原文(Bitluni builds a 20-cent USB GPU from a single microcontroller)

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.

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.

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.

Bitluni's 20-cent GPU

(Image credit: Bitluni @ Youtube)

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.

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.

正文保留英文原文,标题与摘要由机器翻译。

本文由采集器自动同步

原文发布于 Tom's Hardware(Bitluni builds a 20-cent USB GPU from a single microcontroller),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。

阅读原文 ↗