Many ADB keyboards has no discrimination between right modifier and left one, | Many ADB keyboards has no discrimination between right modifier and left one, | ||||
you will always see left control even if you press right control key. | you will always see left control even if you press right control key. | ||||
Apple Extended Keyboard and Apple Extended Keyboard II are the examples. | Apple Extended Keyboard and Apple Extended Keyboard II are the examples. | ||||
Though ADB protocol itsef has the ability of distinction between right and left. | |||||
And most ADB keyboard has no NKRO functionality, though ADB protocol itsef has that. | |||||
Though ADB protocol itself has the ability of distinction between right and left. | |||||
And most ADB keyboard has no NKRO functionality, though ADB protocol itself has that. | |||||
See protocol/adb.c for more info. | See protocol/adb.c for more info. | ||||
EOF | EOF |
Hardware | Hardware | ||||
-------- | -------- | ||||
Connect RX, TX and GND to UART pin of AVR. Note that you may need line drvier/level shfiter like MAX232 to interface high voltage of RS-232C. | |||||
Connect RX, TX and GND to UART pin of AVR. Note that you may need line driver/level shifter like MAX232 to interface high voltage of RS-232C. | |||||
====================================== | ====================================== | ||||
This firmware converts the protocol of Apple Macintosh keyboard **M0110**, **M0110A** and **M0120** into USB. Target of this project is USB AVR controller **ATmega32U4**. Using this converter you can revive these retro keyboards with modern computer. | This firmware converts the protocol of Apple Macintosh keyboard **M0110**, **M0110A** and **M0120** into USB. Target of this project is USB AVR controller **ATmega32U4**. Using this converter you can revive these retro keyboards with modern computer. | ||||
Pics of **M0110 + M0120** and **M0110A**. | |||||
Pictures of **M0110 + M0120** and **M0110A**. | |||||
![M0110+M0120](http://i.imgur.com/dyvXb2Tm.jpg) | ![M0110+M0120](http://i.imgur.com/dyvXb2Tm.jpg) | ||||
![M0110A](http://i.imgur.com/HuHOEoHm.jpg) | ![M0110A](http://i.imgur.com/HuHOEoHm.jpg) | ||||
<http://en.wikipedia.org/wiki/Modular_connector#4P4C> | <http://en.wikipedia.org/wiki/Modular_connector#4P4C> | ||||
Close-up pic of handset cable. You can see one end of plug has reverse color codes against the other. Click to enlarge. | |||||
Close-up picture of handset cable. You can see one end of plug has reverse color codes against the other. Click to enlarge. | |||||
[![4P4C cable](http://i.imgur.com/3S9P1mYm.jpg?1)](http://i.imgur.com/3S9P1mY.jpg?1) | [![4P4C cable](http://i.imgur.com/3S9P1mYm.jpg?1)](http://i.imgur.com/3S9P1mY.jpg?1) | ||||
[Teensy]: http://www.pjrc.com/teensy/ | [Teensy]: http://www.pjrc.com/teensy/ | ||||
![Jack fig](http://www.kbdbabel.org/conn/kbd_connector_macplus.png) | ![Jack fig](http://www.kbdbabel.org/conn/kbd_connector_macplus.png) | ||||
### Pull-up Registor | |||||
You may need pull-up registors on signal lines(`CLOCK`, `DATA`) in particular when you have long or coiled cable. **1k-10k Ohm** will be OK for this purpose. In that case the converter may not read signal from keyboard correctly without pull-up resistors. | |||||
### Pull-up Resistor | |||||
You may need pull-up resistors on signal lines(`CLOCK`, `DATA`) in particular when you have long or coiled cable. **1k-10k Ohm** will be OK for this purpose. In that case the converter may not read signal from keyboard correctly without pull-up resistors. | |||||
Building Frimware | |||||
Building Firmware | |||||
----------------- | ----------------- | ||||
To compile firmware you need AVR GCC. You can edit *Makefile* and *config.h* to change compile options and pin configuration. | To compile firmware you need AVR GCC. You can edit *Makefile* and *config.h* to change compile options and pin configuration. | ||||
(receptacle) | (receptacle) | ||||
Wiring: You can change this with ediging config.h. | |||||
Wiring: You can change this with editing config.h. | |||||
Pin mini DIN MCU | Pin mini DIN MCU | ||||
---------------------------------- | ---------------------------------- | ||||
Protocol | Protocol | ||||
-------- | -------- | ||||
Singnal: Asynchronous, Positive logic, 19200baud, Least bit first | |||||
Signal: Asynchronous, Positive logic, 19200baud, Least bit first | |||||
Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit | Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit | ||||
This converter uses software method for testing purpose. AVR UART engine will work better. | This converter uses software method for testing purpose. AVR UART engine will work better. |
### Interrupt driven(ps2_interrupt.c) | ### Interrupt driven(ps2_interrupt.c) | ||||
Uses pin interrupt to detect falling edge of clock line. | Uses pin interrupt to detect falling edge of clock line. | ||||
### USART hardware module(ps2_usart.c) | ### USART hardware module(ps2_usart.c) | ||||
Uses AVR USART engine to recevie PS/2 signal. | |||||
Uses AVR USART engine to receive PS/2 signal. | |||||
To select method edit Makefile. | To select method edit Makefile. | ||||
To change pin configuration edit config.h. | To change pin configuration edit config.h. | ||||
Build Frimware | |||||
Build Firmware | |||||
-------------- | -------------- | ||||
Just run `make`: | Just run `make`: | ||||
Protocol | Protocol | ||||
-------- | -------- | ||||
Singnal: Asynchronous, Negative logic, 1200baud, No Flow control | |||||
Signal: Asynchronous, Negative logic, 1200baud, No Flow control | |||||
Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit | Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit | ||||
AVR USART engine expects positive logic while Sun keyboard signal is negative. | AVR USART engine expects positive logic while Sun keyboard signal is negative. | ||||
To use AVR UART engine you need exteral inverter in front of RX and TX pin. | |||||
To use AVR UART engine you need external inverter in front of RX and TX pin. | |||||
Otherwise you can software serial routine to communicate the keyboard. | Otherwise you can software serial routine to communicate the keyboard. | ||||
This converter uses software method, you doesn't need any inverter part. | This converter uses software method, you doesn't need any inverter part. |
Arduino Leonardo | Arduino Leonardo | ||||
http://arduino.cc/en/Main/ArduinoBoardLeonardo | http://arduino.cc/en/Main/ArduinoBoardLeonardo | ||||
Circuit@Home USB Host Sheild 2.0 | |||||
Circuit@Home USB Host Shield 2.0 | |||||
http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino | http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino | ||||
Hardware | Hardware | ||||
-------- | -------- | ||||
Target MCU is ATMega32u4 but other USB capable AVR will also work. | Target MCU is ATMega32u4 but other USB capable AVR will also work. | ||||
You can use PJRC Teensy as dev board. | |||||
You can use PJRC Teensy as development board. | |||||
http://www.pjrc.com/teensy/ | http://www.pjrc.com/teensy/ | ||||
Wiring: | Wiring: | ||||
Data from computer | Data from computer | ||||
------------------ | ------------------ | ||||
- LED contorol ON/OFF(0/1) | |||||
- LED control ON/OFF(0/1) | |||||
bit 7 1(fixed) | bit 7 1(fixed) | ||||
bit 6 全角 | bit 6 全角 | ||||
bit 5 ひらがな | bit 5 ひらがな |