Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

images mediafiles mechanicalcpuclock clock label 668x425 Mechanical CPU Simulating Wall Clock

Lior Elazary’s Mechanical CPU Clock intrigues me — it’s a clock that simulates the way a CPU works:

For a CPU to do any meaningful work, it needs to be told what to do. This comes in the form of instructions. For this wall clock I will only concentrate on the hours to make things simple. That is, we will increment a variable named Hours and check to see if it’s equal to 11 (we will use 0 base indexing for the hours, so 12 is represented as a 0). If the check is true, then we will reset the variable back to 0. We do not want to code the above statement directly into the CPU, since we want it to be general purpose CPU (otherwise we are just making a clock). Therefore, we will implement a basic instruction set and write the clock code around these primitive instructions (the set of instructions to execute are known as an assembly language). Lastly, we will keep the hour variable in a Register, which is a term given for a special memory component used to hold data and operate on it. We will also use a simple 1 unit (1 bit) memory address to act as a flag for the control unit, and name it DTD for personal reasons (stands for dedicated to Dani. A long personal story). Note that this CPU will be programed with the clock instructions, but it could be programed with any other code to do a number of other things.

Also, see the Instructable.

John Baichtal

My interests include writing, electronics, RPGs, scifi, hackers & hackerspaces, 3D printing, building sets & toys. @johnbaichtal

blog comments powered by Disqus

Related Supplies at Maker Shed


Get every new post delivered to your Inbox.

Join 26,248 other followers