Skip to main content

Posts

Showing posts from April, 2022

Writing a binary (bcd) clock in Forth for RC2014 and Minstrel 4th

 A nother idea I had for using the 8x8 LED Matrix is a binary clock.  It fits very neatly into 8x8 pixels  (The 8x8 matrix looks way better in real life than it does in these videos. It's very difficult to photograph or film.) Eventually I want to learn to use interrupts on the RC2014. An interrupt routine would update a counter very accurately and independently of the main program, which could be divided for accurate seconds, minutes and hours. In the absence of that and no counter (as far as I'm aware) in CP/M (the OS I use on my RC2014) it was necessary to write a 'jiffy clock' that you'd call from your main loop. Here it is: The idea is that you call clinc every 1/60 second and it gives you hrs mins and secs words for access to those numbers. If you can't call it exactly every 1/60s, then it allows for calibration and by coincidence, the main loop of my program happens to loop almost at that rate, hence the number 62 at line 27.  I was trying to be clev