3-button AT89C2051 clock kits.

I wanted some simpler-to-use firmware for these kits. I’m not bothered about having timers, alarms, countdowns, etc. The features I did want were:

  • Easy and intuitive method of setting the time, accurate to the second.
  • Ability to dim the display (less dazzle at nighttime, and also lower power draw when running from batteries).
  • Twelve-hour or twenty-four-hour clock mode.

I achieved these aims, as follows:

  • Load different firmware to swap between 12-hour and 24-hour modes.
  • The left-hand button (nearest the hour display) always advances the hour by one, without affecting minutes or seconds.
  • The middle-button (nearest the minute display) always advances the minute by one, and zeros the seconds. To set the time, accurate to the second, you can hold the button down, and release it when your reference clock reaches zero seconds.
  • The remaining, right-hand, button has the dual function of changing the brightness setting (four available brightness levels are cycled through) and (by holding the button down for a second) changing the way the separator colons work: always on, always off, or flashing once for each second.

Here’s the firmware (hex files) to load to the AT89C2051:

12-hour version: clock12h.ihx

24-hour version: clock24h.ihx

And the source code:

12-hour version: clock12h.c

24-hour version: clock24h.c

Original (as supplied in kit) firmware: kitAsSupplied.hex


Posted

in

by

Tags:

Comments

2 responses to “3-button AT89C2051 clock kits.”

  1. Samyak Doshi avatar
    Samyak Doshi

    Hey, regarding another project you’ve uploaded on your YouTube channel, the SBUS to PWM decoder-encoder pair, I wanted to ask you where you got the Arduino boards.

    If you purchased them from somewhere, can you give me a link?
    If you’ve designed it on your own, will you be willing to share the PCB design files?

    Regards,
    Samyak

    1. ceptimus avatar

      Just search on Ali Express for “diy more pro mini strong” or similar. I just did that and found this link: https://www.aliexpress.com/item/32842932841.html
      The links usually expire fairly quickly, but the search will usually turn up several sellers – and you can choose the one with the best price+shipping to your location.

Leave a Reply

Your email address will not be published. Required fields are marked *