Stokes’ ProjBlog

A journal documenting innumerable, mostly terminally in-progress undertakings. Nerdiness abounds.


Check out my (Atari key-)Pad, Part 1: Hardware Archeology September 2, 2013

Filed under: New project!,The Atari Keypad Project — Stokes @ 2:27 pm

Atari Keypad to USB A while back, a surplus electronics catalog was offering vintage Atari numeric keypads. Specifically, it was the Atari CX85, introduced sometime around 1982, intended for Atari 800 computers*. I have a thing for input devices, so of course I picked up a couple. It’s a hefty unit, housed in 70s/80s earth tones, with the ubiquitous Atari unshielded female DB9 connector. Its 17 keys have a nice, chunky feel to them. My goal: get this keypad attached to a modern computer — without any permanent modifications.

One thing leapt out immediately: 17 keys. I had to recount them to make sure I wasn’t seeing things. 16 keys is typical of a keypad, with keys wired in a 4×4 matrix. Having a prime number of keys is kind of bizarre. My initial thought was that maybe it contains a 4×5 matrix and some number of possible keys are just left out; that would fit a 9-pin connector, but I realized that the keypad has to be compatible with the Atari joystick port. In addition to +5V and ground pins, the joystick port has only five digital and two analog pins: the four cardinal directions, the ‘fire’ button, and paddle inputs. What’s more, the pins are input-only, so unless the keypad switches are DPST (unlikely), there’s no way the computer could scan the keypad (supplying power to each column or row to see which button is pressed). There had to be some logic in there.

Atari Keypad Internals/PinoutOpening up the keypad revealed a pair of chips: a 74C923 keypad encoder and a 4049 hex inverter. The 74C923 (which was new to me) does the real work: it handles reading a 4×5 keypad and returns the key being pressed as BCD using 5 data pins (OUTA through OUTE). A sixth pin, DATA_AV (‘Data Available’), is HIGH while any key is pressed. All the tedious parts of encoding the keypad (scanning, debouncing, et cetera) are handled automatically. So, I was half right: the 74C923 supports up to 20 keys (wired in a 4×5 grid), so three possibilities are ignored. If I weren’t trying to make my modifications completely non-permanent, I could add three more buttons, using the unused row/column combinations. If I were modifying the keypad, I could also use the DB9’s 9th pin — unused by the keypad itself — to add a knob, switch, or indicator light.

Atari Keypad internals Internally, the cable is attached to the PCB by means of something I don’t remember seeing before: spade-like connectors fitted into slots in the board. I admire the cheap and effective design; I can only assume that I don’t see this setup in modern equipment because it’s too difficult to assemble by robot. This is good news for my plan to make no permanent changes to the keypad: if I can find similar spade connectors, I can swap the cable for connections to a small microcontroller board sitting inside the keypad’s enclosure. Something like SparkFun’s ProMicro would fit easily and could emulate a USB keyboard.

Regardless of what microcontroller I use eventually, my first tests used an Arduino Leonardo. That ended up being slightly trickier than I’d anticipated. I describe how so in part 2.

* The fact that Atari once made a computer (a couple of them, in fact, before the Atari ST) surprises some of my younger friends. I feel old sometimes.


Leave a Reply

You must be logged in to post a comment.