KIM-1 LED Matrix Art

Spring 2023 | ECE 197DP | Python, 6502 assembly language

I completed this project as the final task in ECE 197DP—a weekly 3-hour lab/elective centered around the KIM-1 single-board computer. The course aimed to provide a hands-on introduction to fundamental circuit theory and 6502 assembly language. Throughout the semester, we got comfortable reading datasheets and working with various LEDs, integrated circuits, and other electronic components. We presented our individual projects at the 2023 M5 Circuits & Code showcase.

Components

Page 1 of Circuits & Code demo board. Includes a picture of the KIM-1 and the Adafruit 8x8 LED grid fully illuminated with a blue B. Close-up shots of the blue B and apple pattern on the grid are attached below. A portrait of me, Erika, outside in front of trees is included to the right.

After settling on the Adafruit 8x8 LED grid as the main project component, I drafted six tentative designs to map to keys A through F on the KIM-1's keyboard. I wanted to create something that could serve as a desk accessory, similar to Divoom's pixel art speakers.

Page 4 of Circuits & Code demo board. Includes screenshots of the Python automation script used to convert pixel art patterns from plain text to assembly code, with an example text file and the resulting output. There is also a screenshot of structure of the project's main assembly program, as well as the first drafts of each pixel art pattern in their initial color schemes. From left to right, top to bottom: an apple, the letter B, a cat, the letter D, an envelope, and the letter F.

I tested various color combinations on the DotStar with the first 1-2 rows of each pattern, reworking the RGB and brightness values as needed. To cut down on testing time, I wrote a short Python script that took a text file with colors written in plain text and produced the appropriate assembly language instructions for each LED, allowing me to test and adjust different RGB values quickly. This saved a substantial amount of time, as the information for a single pixel involves 4 separate hex values and I was frequently adjusting the values for all 16 (and eventually 64) pixels at a time.

When I moved on to testing the 8x8 patterns in full, only about half of my patterns were showing up on the DotStar, with the rest of the grid remaining off. I eventually realized that the initial memory location I was loading the LED instructions to didn't have enough space for all 256 bytes of information. Luckily, the KIM-1 clone by Corsham actually included additional RAM ("RAM from 2000 to FFF7. The KIM-1 had nothing past 1FFF") and I was able to easily adjust the start address to avoid any additional memory-related issues.

Some additional details are included in the slides below. While not very complicated, this project and the course introduced me to many fundamental skills that I've found useful in other classes since. I appreciated being given room for creativity and problem solving, while being encouraged to ask questions and learn from my mistakes.

ECE 197DP also inspired me to propose the creation of another experiential learning course focused on providing students with the opportunity to work on a semester-long project with regular instructor guidance, as a stepping stone between 197DP and the junior & senior design projects. This new course is now ECE 287.

Page 2 of Circuits & Code demo board. Includes a project block diagram. KIM-1 communicates with 6502 RAM-I/O-Timer, which in turn outputs to the Adafruit DotStar via the ClockIn and DataIn ports. The ground and +5V power connections are mistakenly omitted. Close-up shots of the E and F patterns are positioned in the bottom left and top right, respectively. Page 3 of Circuits & Code demo board. Includes parts list and a brief reflection.

Posted July 6 2024. Last updated August 24 2024.