A compact DIY instrument replaces numerous oscillators by generating accurate frequencies across a broad range, offering flexibility, precision and convenience for electronics enthusiasts.

A DIY digital signal generator created by David Johnson-Davies uses Microchip Technology’s AVR16EB28 microcontroller to provide a versatile frequency source that eliminates the need for maintaining numerous individual oscillators. The compact design delivers frequencies from 2 Hz to approximately 33.5 MHz in precise 2 Hz increments, making it suitable for a wide range of electronics projects.
The design addresses a common challenge faced by engineers and hobbyists, who often require different clock frequencies when working with microcontrollers, FPGAs, vintage processors or other digital circuits. Instead of relying on separate oscillators for each application, the device produces a broad range of accurate output frequencies from a single unit.

Unlike conventional timer-based approaches that divide clock signals into limited values, the generator takes advantage of the Numerically Controlled Oscillator (NCO) available in the microcontroller’s timer and counter peripheral. This enables evenly spaced frequency steps across the operating range, allowing users to select an exact frequency rather than settling for the nearest available option.
The project incorporates an external 4.194304 MHz crystal oscillator for improved timing accuracy. A built-in phase-locked loop (PLL) multiplies the reference frequency before feeding the NCO, producing crystal-accurate complementary square-wave outputs. Users can enter frequencies directly through an integrated numeric keypad, while a rotary encoder provides quick fine adjustments. A compact 128×32 OLED display presents the selected frequency clearly.
Although the NCO architecture introduces minor timing jitter at certain frequencies, the designer notes that the average output frequency remains highly accurate and that the effect becomes less significant as frequencies increase.
Designed as an affordable and practical bench tool, the project offers an efficient solution for testing digital circuits, evaluating logic devices and experimenting with embedded systems, all without the need for a large collection of dedicated oscillators.



