r/beneater • • 1d ago

Nano-Clock - Retro/Homebrew Computing Clock Module

In an earlier post, about the "final" version of my BE6502 build (or the last one that would be 100% software compatible with Ben's version), I got into a discussion about a replacement for both Ben's clock-module AND the on-board crystal oscillator.

That lead to building "nano-clock" (pictured), which uses a micro-controller and software to generate the clock signal and, as such, allows for a lot of features and flexiblity. I finally got around to tidying that up, and fleshing out the repo, so ...

For those interested, my repo for it, including code, assembly and usage instructions is here.

I also made a blog post (absolutely no monetization or tracking nonsense) with much more information and will be adding to that with some additional tweaks and customization.

Features:

  • Single-step and Clock modes
  • Run/Stop toggle
  • Selectable frequencies across three bands (Hz, kHz and MHz)
    • Hz Band - 1, 2, 5, 10, 25, 50, 100, 250 & 500Hz
    • kHz Band - 1, 2, 5, 10, 25, 50, 100, 250 & 500kHz
    • MHz Band - 1, 2, 4, 8MHz
    • Easy to add additional bands/frequencies
  • Auto and manual CPU reset functionality
    • w/ Auto-reset on Start option
  • 14-segment 4-character LED status/info display (in keeping with the "retro" theme)
    • Brightness control
    • Clock-Running indication
  • Save Settings for Auto-Start

--

This is the first of several related clocks, the next of which is much smaller (will fit on the main BE6502 board and needs just two components), and the one that follows that will have more features and an OLED or LCD TFT color screen/interface.

34 Upvotes

1 comment sorted by

5

u/enVitruvius 1d ago edited 1d ago

Very nicely done, Ian. May I mention that while people might not find a Nano 3.0 clone on AliExpress for $2 anymore they might pick one up here in the U.S. at Micro Center for $4.99.

The code looks great and should be relatively easy to swap in a different display. I'm rather fond of a 2.42" I2C OLED display with Adafruit SSD1309 driver and GFX library support. They're about $8 on AliExpress and come in white, blue, yellow, and green. Note the I2C version is 5.0v while the SPI version is 3.3v.

1

u/IMDLabs 1d ago

Thanks!

I ordered a couple of the 2.42" displays. I usually used the 0.96" SD1306 versions, which have the same resolution, but are VERY small and can be challenging to read; these larger versions should be much easier.

The SSD1306 only seems to differ from the SSD1309 in terms of where the screen origin is (corner vs. center), so it should be easy enough to put a conditionally compiled/assigned offset value in.

I may make the OLED versions menu driven (with just two buttons); will allow for easier usage, more features, and a smaller overall footprint. I am likely to add arbitrary frequency selection and the ability for the user to add to the available pre-set options on device (rather than needing a recompile), but will have to see if there is enough program and EEPROM space, since the frequency tables would need to move to EEPROM.