Those who are old enough to face punch cards in their lifetime are probably happy to be freed from their extremely low data density and long pile tendency. While they may be obsolete, they are a great tool for showing the basics of binary data storage: bits are easily visible and can even be manipulated with simple tools. As a test to recreate those features in more modern systems, [Michael Kohn] LEGO has developed a punch card-like system based on bricks that stores machine code instructions for a 65C816 CPU, the 16-bit successor to the Honorable 6502.
The bits are stored on a white 8 × 20 stud board, on top of which are placed small black pieces. A white background stud encodes a logic “zero”, while a black stud encodes a logic “one”. The bits are read by an array of reflective sensors, which conveniently have the same 8mm pitch as standard LEGO studs. A large wheel driven by a stepper motor slides the data card down the readout circuit along a small stretch of the LEGO train track.
The optical sensors are read by an MSP430 series microcontroller, which drives the motor through a stepper motor driver. Once the data is read, the bytes are transferred to a WDC W65C265SXB board, which runs on their 65C816 CPU as machine code instructions. In the video below, you can see a program loading with an LED flashing
We’ve previously featured educational punch-card systems like this Raspberry Pi-based model. If you’ve got a bunch of actual punch cards to read, check out this Arduino-powered readout system.