I needed a ADB to USB keyboard converter to test a feel of ADB keyboards on actual usage. After 2days coding and several hours debug, I made this converter based on my keyboard firmware. If you are interested in ADB keyboard converter, try this.
You can buy preassembled TMK ADB-USB converter hereKeymap EditorYou can edit keymap and download firmware with web browser.
For TMK converter(ATMega32u2)For old TMK converter rev.1(ATMega32u4)README FIRSThttps://github.com/tmk/tmk_keyboardhttps://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usband optionally,
https://github.com/tmk/tmk_keyboard/wikihttps://github.com/tmk/tmk_keyboard/labels/NOTENEED HELP?Your self-made converter doesn't work?Frist, post pics of your hardware and wriring this really save time of us. Don't save your time by omitting this. One pic won't be enough, at least two shots of controller side and ADB connector/keyboard side are needed.
Don't ask help before placing pull-up resistor!You are cheap and use Pro Micro got from China? OK, but confirm it is 5V/16MHz one hundred times before you ask here.Perhaps, you may need to fix some sloppy variants by shorting solder jumper J1.You got Error -30? It means your wiring is wrong in 99.9% cases. Check your wiring again and again![rant]
Many people said they are sure their wiring is fine first but it became clear they failed to do that in the end
many times in this thread

And they often omit pull-up resistor for no reason, you must have it.
Don't take advantage of generosity of kind and helpful members(yes, including me, of course

)! Their time is more precious than your time, use your time to learn and look into your problem first.
[/rant]
If you edit codePost your code. Don't hesitate to show your dirty code!
UPDATE2012/12/12 Extended keyboard support by
blargg2013/04/08 Fix issue:
ADB-USB converter misses keystrokes (NOT FIXED COMPLETELY)2013/07/22 Changed Pin usage:
PD0, NOT PF0 now
2013/10/11 WIP: Fix
ADB-USB converter misses keystrokes2013/11/28
Fix key drop problem finally Thank you,
blargg!
2015/04/28 Mouse is supported by
mek-apelsin2015/12/18 Request for help: extended mouse support
2016/06/04 Added LIMITATION section
2016/06/04 Apple Adjustable Keyboard media keys are supported now
2016/09/03 Keymap editor(unimap) is available now
2018/01/19 Fix lag problem on ADB-USB converter
LIMITATION- On ADB keyboards
left and right modifier are logically same and can not be discriminated one another by converter. You can remap modifier keys to any key but both left and right key always register same key code. On
Apple Extended keyboard(AEKI and II) modifiers can be discriminated except for 'Command'. (This is ADB limitation, not converter's)
- Caps lock key of
Apple adjustable keyboard is not mechanical locking swith but the keybaord emulates locking switch behaviour. You will have a problem when using the capslock key as control, for example.(Not converter's limitation)
-
Apple adjustable keyboard keypad is not confirmed yet. Not sure if it works or not at this time. Confirmed finally!(2018 Dec)SOURCE CODEhttps://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usbBUILD FIRMWAREhttps://github.com/tmk/tmk_keyboard/blob/master/doc/build.mdBUILD CONVERTER YOURSELFYou can use PJRC Teensy or other dev board with ATMega32U4/2.
ADB female socket from the front:
,--_--.
/ o4 3o \ 1: DATA
| o2 1o | 2: Power SW
- === - 3: VCC
`-___-' 4: GND
- Connect keyboard DATA line to PD0 pin(configurable in config.h), not to mention VCC and GND as well.
- Just 'make' to build firmware binary.
- And program your AVR with the firmware.
You must have a external pull-up resistor(1K is recommended but any of 1K-10K works) on DATA line.Keyboard Conveter
,------.
5V------+------|VCC |
| | |
R | |
| | |
DATA----+------|PD0 |
| |
GND------------|GND |
`------'
R: 1K Ohm resistor
https://github.com/tmk/tmk_keyboard/wiki/FAQ#pull-up-resistorWe'd seen poeple suffered from a
mouse-going-top-left problem. Some of them had clearly hardware problems like bad connection and wiring but I didn't know exact reason actually.
https://geekhack.org/index.php?topic=14290.msg1754134#msg1754134But now I finaly got it. You must have a pull-up resistor in the end, mouse function doesn't work without it. If you build firmware without mouse feature it may work without pull-up resistor.
DEBUGYou can use PJRC's 'hid_listen' command to see debug print.
http://www.pjrc.com/teensy/hid_listen.htmlPower keyIn default configuration Power key is used as 'Magic command' trigger key.
https://github.com/tmk/tmk_keyboard#magic-commandsYou may not use it for your usage unless you change the configuration.
https://geekhack.org/index.php?topic=14290.msg1867968#msg1867968Locking CapsLockMany of old ADB keyboards have mechanically locking switch for Caps lock and TMK supports them.
https://github.com/tmk/tmk_keyboard#mechanical-locking-supportOr you may want to remove locking pin from the push-lock switch to use it as a normal momentary switch.
http://www.youtube.com/watch?v=9wqnt2mGJ2YADB protocol ResourceThis is code for ADB protocol:
https://github.com/tmk/tmk_core/blob/master/protocol/adb.c#L301-L478REQUEST FOR HELP: Extended mouse protocol supportIt is required for more buttons and movement resolution of mouse/trackball.
Do you have multiple button mouse? Implement it!
https://github.com/tmk/tmk_keyboard/issues/274OLD STUFF: More