Ted Yapo's 20-Year-Old PIC-Powered Clock Lives Again as a Freeform Clone

Building on an original PCB-based design first created 20 years ago, Paul Gallagher's replica is a freeform wonder.

Gareth Halfacree
4 years agoClocks / HW101
Gallagher's replica eschews the PCB for a freeform design. (📷: Paul Gallagher)

Maker Paul Gallagher has built a freeform clone of a Ted Yapo LED clock design dating back 20 years — using the same, unmodified source code on a Microchip PIC16F84A microcontroller.

"I saw Ted Yapo's tweet about the LED clock he made 20 years ago. It is controlled with a PIC16F84A and he shared the original source code," Gallagher explains. "Now if that isn’t an invitation to attempt a replica of the project, I don’t know what is! The project seems perfectly suited to a freeform construction, so that’s what I’ve done."

"I’ve selected components based on a visual inspection of a few photographs that Ted shared. The project uses a 32.768kHz clock (as this perfectly divides for time-based applications). The code sets LP clock mode accordingly in the configuration bits, and per the datasheet, I’ve used 100pF loading capacitors (not sure what Ted originally used). With this configuration, the clock seems to keep time reasonably well. The circuit uses a neat trick to have a single GPIO pin double as LED output and push-button input. This is used for the hour and minute adjust buttons, as there are not enough pins on the PIC16F84A to dedicate a pin for each function."

Where Yapo's original design was based on a circuit board with through-hole components, though, Gallagher's recreation uses the same core hardware but without the board — instead turning the components themselves, plus some copper wire, into the traces of the circuit.

Following the circuit's creation, Gallagher found that Yapo's original source code needed no modification — despite two decades having passed since it was written. "I’m running MPLABX IDE on MacOSX," Gallagher notes, "and it’s testament to Microchip’s custodianship of the aging PIC platform that I had no trouble at all recompiling the code with MPLabX 5.30 and mpasm 5.86."

The full project write-up is available on Gallagher's Little Electronic and Arduino Projects (LEAP) blog, with source code available on GitHub.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles