Binary Clock Upgraded for FPGA Use




Some time ago, John Whittington developed a binary clock that runs on an ATmega328 chip. It’s beautiful wooden frame and array of diffusers allow programmable LEDs to merrily tick away, with the top two rows of lights representing hours, and the bottom two showing minutes in a binary-coded decimal (BCD) format.

While a nice conversation piece, Whittington realized that since a binary clock is basically a frequency divider — each successive BCD changes state at a slower rate than the one before it — this would be an ideal project for learning more about FPGA programming and Verilog. One of the first things you need to know when working with this technology is the use of counters and flip-flops, which were implemented as the heart of this project’s timekeeping routine. The project was ported to a Lattice IceStick using the IceStorm toolchain.

The other challenge beyond timekeeping was driving the WS2812 LEDs — and seeing how Matt Venn was able to add this peripheral to the PicoSOC — was what finally got him started on the project.

You can find out more about Whittington’s experience porting his binary clock to an FPGA in the video below. This includes a test bench demonstration around 17:00, where he sets the binary clock, and even changes an external frequency generator around to show off the divider concept nicely.


Binary Clock Upgraded for FPGA Use was originally published in Hackster Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

Original article: Binary Clock Upgraded for FPGA Use
Author: Jeremy S. Cook