There are many ways to generate a square wave, and given the availability of phase-locked-loop-based clock generator chips, it’s easy enough to do so from a microcontroller. But the microcontroller can be persuaded to make a square wave on its own, and and this is what [Alun Morris] has done with his Mega Hurts frequency generator. It’s a pocket square wave signal generator, powered from a USB-C socket. At its heart is the inexpensive CH32V203F6P6 microcontroller mounted on a small dev board in a 3D printed case. There’s an OLED display and a rotary encoder to provide a user interface. The maximum frequency achievable is 30 MHz, with variable duty cycle. The generation is achieved using the chip’s 16-bit timer operating as a PWM peripheral, and the output reaches the world through a BNC socket. We can see it could be a useful little instrument, even if it’s limited to square waves alone. We quite like the very simple prototyping technique used here, dead-bugging SMD parts without the need for a custom PCB. IT proves that sometimes, just going ahead and making the thing with what you have is the way forward.
A Frequency Generator for Not a Lot
There are many ways to generate a square wave, and given the availability of phase-locked-loop-based clock generator chips, it’s easy enough to do so from a microcontroller. But the microcontroller …read more
Editor
Dec 2, 2026 · 2 min read

Source: Jenny List
From other categories

Databases
How Atlan Moved Its Data Platform from Spark and StarRocks to DuckDB on S3
just now·7 min

Mobile Development
Android 17 QPR3 Beta 5 gives the Pixel Launcher a new way to move app icons
33m ago·2 min

Security
ISC Stormcast For Wednesday, December 2nd, 2026 https://isc.sans.edu/podcastdetail/10200, (Wed, Dec 2nd)
5h ago·1 min

AI & Machine Learning
Large CSV imports in Datasette (Datasette Advent Day 1)
7h ago·1 min

Operating Systems
Linux App Release Roundup (November 2026)
8h ago·1 min

Programming Languages
Introducing Laravel Rust
13h ago·1 min