Apple KB encoder replacement


My Apple ][+ keyboard encoder died, so I replaced it with a PIC 18F46K22 microcontroller. I put the PIC on a little perf board to mount on the keyboard like the original. I added a serial port so I could program it with Microchip's bootloader, and I can send characters to the Apple over that.

There are 6 resistors: I used PORTB for the Y inputs from the keyboard matrix since it has weak pullups. That way the inputs aren't floating when no key is being pressed. But there are 10 inputs, and the extra 2 bits are on PORTC, so they need external resistors (I used 38K, to try to match the weak pullups). Likewise, the shift and ctrl keys need pullups (I also used 38K) so they don't float when they aren't used. Instead of using an RS232 serial converter like the MAX232, I just used current limiting resistors on TX and RX, and used inverted serial mode on the PIC. For RX (C7), I used a 22K resistor, and for TX (C6), I used a 1K.

My design doesn't support the optional numeric keypad or the repeat key. There are some other features that I've thought about, and some are partially coded: auto-repeat (like modern keyboards), macros, joystick input (map digital joystick L/R/U/D/Fire to keys), lowercase.

Another option for replacing the encoder is to use a 3600 PRO, which has a generic key mapping, along with an external EPROM. The Apple //e used this method, and it's shown in the schematics.


notes

front of PCB

back of PCB

PBP source code and hex file


back to KR3600 page

back to Home page