
Sometimes you have a project that you started and did not finish that keeps staring you in the eye every time you enter your shack. This was one of mine, I was planning to build a copy of the famous MPF1 board, but after soldering the keys and the displays, it stopped. After a while the urge of building a copy of the MPF1 faded and the board was laying on my desk. Then I thought about creating an ATMega328 based universal retro board that I could use to emulate f.i. a KIM1 or even a MPF1. The problem was the amount of I/O pins an ATMega328 has when using an external oscillator. But with some deep thinking and some clever design I managed to fit it all on one ATMega328 and keeping the RX/TX pins free for serial communication for debugging messages. This is the design I came up with.

I use two common cathode seven segment X 4 displays and I driver them using an ULN2803 that contains 8 Darlington transistor circuits. The outputs drive the displays (active to ground) but also the scanlines of the keyboard. As I wanted nine rows (MPF1) I had to use a clever trick, there is a 9e state and that is “all off”. By connecting the last row to the ground I can read these pins if all scanlines are inactive. The last button is hardwired to the reset pin. Furthermore the design is very straightforward, the TX line is used as an output for a scanline so it can be used as serial out at the same time. Only the first display will light up a little extra. The RX pin is left free so this can also be used.
The design is made in a way that the ATMega328 chip can be easily replaced with an Arduino Uno, that makes development very easy as you can download the sketch from the IDE and monitor using the terminal of the IDE. When all is working fine, just program the code in an ATMega328 and put the chip in place. Here I have a zip file with the basic test code to see if the hardware is working and an example of the keyboard and display drivers code.

When everything was working I took the sourcecode of the KIMUNO project and cleaned up the code and added my own keyboard and display drivers. This took me a while because the code was a little unclear sometimes. I reformatted / restuctured the code, deleted some unused code and added comment. After a few evening the KIM1 clone was working on my hardware. At the end of the page I included my full sourcecode of the project. And after putting the code inside a standalone ATMega328, this was the result. A working KIM1 emulator.

I hope I have inspired someone to build this and even add more features or other emulations. I still want to write a full MPF1 emulation for this board, but that is one of the future plans.
Sourecode KIM1 ATMega328
Have fun, regards, Hein Pragt.