HOW TO USE LEGO BRICKS FOR DATA STORAGE

Those old enough to have encountered punch cards in their lifetime are probably glad to be rid of their extremely low data density and the propensity of tall stacks to tip over. But obsolete as they may be, they’re a great tool to show the basics of binary data storage: the bits are easily visible and can even be manipulated with simple tools. As an experiment to re-create those features in a more modern system, [Michael Kohn] made a punch card-like system based on LEGO bricks that stores machine code instructions for a 65C816 CPU, the 16-bit successor to the venerable 6502.

Bits are stored on a white 8×20 stud board, onto which small black pieces are placed. A white background stud encodes a logic “zero”, while a black stud encodes a logic “one”. The bits are read out by an array of reflectance sensors, which conveniently has the same 8 mm pitch as standard LEGO studs. A big wheel driven by a stepper motor slides the data card under the readout circuit along a short stretch of LEGO train tracks.

The optical sensors are read out by an MSP430 series microcontroller, which also drives the motor through a stepper motor driver. Once the data is read out, the bytes are transferred into a WDC W65C265SXB board, which executes them as machine code instructions on its 65C816 CPU. In the video below, you can see a program being loaded that blinks an LED.

We’ve featured educational punch-card systems before, like this Raspberry Pi-based model. If you’ve got a bunch of actual punch cards that need reading out, check out this Arduino-powered readout system.

Source: HOW TO USE LEGO BRICKS FOR DATA STORAGE


About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation and engineering. My writing style is clear and simple, and I am skilled in using infographics and diagrams. I am a great researcher and am able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top