PS/2 Encoder interfaces industry standard PS/2 PC-compatible keyboards to devices requiring TTL-level RS232, parallel data , and/or PC XT signaling. All ASCII key sequences are decoded, as well as common keyboard sequences like "CTRL-ALT-DEL". To provide maximum flexibility for various uses while retaining ease of operation, the unit's configuration can be modified in-circuit using the PS/2 keyboard itself.
The PS/2 Encoder can be purchased as a bare PCB, minimal kit (PCB, uC only), full kit with DIP 24 pin header, full kit with 2x12 IDC header, or assembled with either type of connector.
- A PS/2 compatible keyboard (USB keyboards with PS/2 converters may not work) with a Mini-DIN6 plug.
- Regulated 5VDC Power source.
- For RS232 operation, a TTL to RS232 level converter.
PS/2 Encoder models can be purchased at the RETRO Innovations Online Store
PS/2 Encoder consists of an Atmel ATMEGA168 AVR microcontroller and associated connectors. The GPLv2-licensed C firmware reads data from a PS/2 compliant keyboard, converting PS/2 scan codes into ASCII values that are presented via an 8-bit parallel and 5V RS232 connections and converting scancodes to XT compatible keyboard scan codes. The PCB features include:
- Supports 24 pin .6″ IC socket connection as well as 2×12 header connection.
- Crystal footprint included on PCB
- PS/2 connector footprint included on PCB
- Through hole design makes "do-it-yourself" construction easy.
Bill of Materials
||Mini-DIN6 PS/2 Connector
||10K 1/8W resistor
||Atmel ATMEGA48/88/168/328 uC
||18pF ceramic capacitor
||.1uF ceramic capacitor
||DIP24 IC header
||2x12 breakaway header
||1x2 .1" breakaway header
- Populate and trim C1,C2,C3 (install C3 from the bottom of the board)
- Populate and trip R1
- Populate IC1 with socket if desired
- Populate and trim Q1
- If SV1 desired, populate on bottom of PCB
- If SV2 desired, populate from top of PCB
- Populate X1
- (Optional) populate CONFIG or simply solder pads
- Connect VCC to regulated +5VDC
- Connect GROUND to appropriate ground line.
- Data connection
- For parallel operation, connect D0-7 and STROBE to appropriate parallel keyboard input lines.
- For serial operation, connect keyboard 5V SND line to PS/2 Encoder RS232 Receive pin, and keyboard 5V RCV line to PS/2 Encoder RS232 Send pin.
- For XT operation, connect XT Clock and Data to appropriate pins on DIN5 plug, adding Vcc and GND to the plug as well.
- If desired, /INTERRUPT can be connected to active low wired-or IRQ line on target system.
- Apply power to system
Configuration mode can only be accessed when the CONFIG jumper is present (or the pins are otherwise connected). To enter configuration mode, hold CTRL and ALT and press the Backspace key on the keyboard. Once in configuration mode, only certain keys will respond to keypresses:
|Shift + ENTER
||ENTER will send CRLF via Parallel and RS232
||Set RS232 to 7-bit data length
||Set RS232 to 8-bit data length
||Increase inter-character delay
||Increase keyboard typematic rate
||Increase keyboard typematic delay
||Increase oscillator speed (on units without crystal)
||ENTER will send CR only via Parallel and RS232
||Decrease inter-character delay
||Decrease keyboard typematic rate
||Decrease keyboard typematic delay
||Decrease oscillator speed (on units without crystal)
||Set STROBE as active-low
||Set STROBE as active-high
||Set RS232 to 110bps
||Set RS232 to 300bps
||Set RS232 to 600bps
||Set RS232 to 1200bps
||Set RS232 to 2400bps
||Set RS232 to 4800bps
||Set RS232 to 9600bps
||Set RS232 to 19200bps
||Set RS232 to 38400bps
||Set RS232 to 57600bps
||Set RS232 to ODD parity
||Set RS232 to EVEN parity
||Set RS232 to NONE parity
||BS sends Backspace via Parallel and RS232
||Backspace sends Delete via Parallel and RS232
||Print current configuration
||Save current configuration
Once the desired configuration is set, pressing 'w' will save the settings, and CTRL+ALT+BS will exit configuration mode and apply the new settings. If configuration mode is exitted without saving, settings will last only until power is removed.
Source code and EAGLE schematics/PCB files are available at http://www.go4retro.com/downloads/PS2Encoder/
- Add functionality for B2B3,C0,and AUX pins
- Add support for various escape sequences