Arduino w/ Ancient Keypad

I recently picked up an old MAC Numeric Keypad for 0.50 at a thrift store

I have no idea where to even begin interfacing this thing?
can someone point me in a direction? Thanks




The cord has 4 wires yellow green red black
do you think it's as simple as finding the right contacts and reading it as if it were serial?

thanks

This could be a matrix keypad.

See Arduino Playground - KeypadTutorial

:slight_smile:

Dude that thing is awesome, sorry I'm not a help, I'm a newb too, but I just wanted to say old tech is awesome. I had my hopes up to resurrect this ancient RC car with an arduino, but the thing was so mechanically trashed it wouldn't have worked. Cool keypad. Is that a RJ11 connector? lol...

maybe it uses adb? (apple desktop bus)

Yeah, it would be early ADB I'd say, before it shifted to the Mini-DIN Connectors ? Seems to support exactly the same daisy-chain style connection...

given the case color, it looks to be off an original Mac 128 or 512K! Ahh.. the sound of an external disk drive booting..... :wink:

If it's the 4-pin RJ connector, the pinout is:

1 Gnd
2 Clock
3 Data
4 +5V

The connector numbers from right to left with the tab at the top.

I've got the encoding somewhere but I haven't found it yet. Data is valid on rising edge of clock and is transmitted lsb msb first and is bidirectional. That's all I remember.

The keypad doesn't have that many keys so it should be pretty easy to decode by hand.

So looks like it uses a ADB?
Wiki didn't mention that it had any other connector besides the mini-DN but if this does turn out to be ADB I will add that change.

I'm not sure if interfacing this is going to be out of my league but I'm going to give it a shot, if anyone has anymore info would be aweseome

now that I know the protocol I should be able to find all the info I need.

thanks for the pinout EmilyJane

will post results

Not ADB. It's a clocked interface like a shift register. ADB has the clock imbedded like asynchronous except all on one bidirectional data line.

Paraphrased from Inside Macintosh Volume III:

The data line is bidirectional and is driven by whatever device is sending data and the clock line is driven only by the keypad. Each transmission is 8 bits and is msb first.

When sending data to the Mac, the normally high clock has a period of 330 usec, 160 usec low and 170 usec high. Data is valid 40 usec before the falling edge of the clock and is held for 330 usec. Data is normally clocked into the Mac on the rising edge of the clock.

When the Mac sends data to the keypad, the clock has a period of 400 usec, 180 usec low and 220 usec high. the Mac places the data on the data line for 400 usec and the keypad reads the data 80 usec after the rising edge of the clock.

The Mac is the master and initiates all communication. After power-up, the Mac initiates communication by pulling the data line low. The keypad detects this and starts clocking in a command from the Mac. The 8th bit leaves the data line low.

The keypad always goes between the Mac and the keyboard and it looks like a keyboard to the Mac and like a Mac to the keyboard.

If you are still interested in trying an Arduino interface at this point, let me know and I'll give you the rest of the handshaking protocol. Or if you can find an electronic copy of Inside Macintosh Volume III, you can read it for yourself.

EmilyJane

I am still very interested, and I was able to locate a copy of Inside Mac Vol. III

however this stuff is right over my head :-/

I don't entirely understand how a handshake protocol works...

I get the basic Idea but...barely

Sorry about the delay, I'm on vacation. Tell me a little bit about what sort of things you have. For example, do you have an oscilloscope or a logic analyzer? If not, my suggestions will be very different.

I remember reading about someone wanting to make a converter from the original Mac keyboard to usb. I think his page even has a link to the micro-controller code he wrote: 24th Anniversary Macintosh

I think he has done almost all the work for you to enjoy the numeric keypad!