Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

Overview

PS2toAmiga

Simple ATTiny85 based PS/2 to Amiga keyboard protocol converter that fits inside the keyboard.

The project was born as an idea to get small and color-matching keyboard to my old Commodore Amiga CD32 console, in order to make it more Amiga-like, in use with TerribleFire 330. I found few projects around The Net which did the same thing but some of them used old and almost unobtainable ICs with closed firmware and some didn't work that well.

Many projects used just way too big chip for the job, which I felt was a waste of precious silicon, as you only need 2 input and 2 output pins for the job - ATTiny85 was chosen as it's one of my favorite "all 'round" chip for simple tasks.

I wanted the adapter to sit inside the keyboard and use the CD32 AUX-connector (PS/2 style mini-DIN) as-is for cable.

Of course the keyboard protocol is the same in all Amigas, the pinouts just differ, so this project can be used to create replacement keyboard for the lost one to your bigger Amigas as well (like Amiga 2000, 3000 & 4000 etc.)

How it works

PS/2 keyboard protocol in it's basic level isn't that hard, it is bidirectional synchronous serial port with clock (CLK) and data (DATA) lines, communicating with PS/2 keyboard using microcontroller has been done multiple times already - which is why I chose to use PS2KeyAdvanced library for Arduino to handle that task - I didn't want to re-invent the wheel, and I had already used PS2KeyAdvanced in earlier projects as well. It also has nice support for Caps Lock, Num Lock etc.

The keycodes read from PS/2 keyboard using PS2KeyAdvanced are then translated to the respective Amiga keycode and sent to wire, using Amiga keyboard protocol.

The converter-code also keeps track of user pressing CTRL-Amiga-Amiga simultaneously and implements resetting the Amiga when those keys are pressed. In PS/2 keyboard, Windows-keys are mapped to respective Amiga-keys on both sides of the space bar. Also if your keyboard misses the Windows/Menu -keys, the Left and Right Amiga keys are mapped to F11 and F12 respectively.

Code itself is "quick'n'dirty" -style but should be pretty much commented out so you can modify the internals of it to your own needs - if you have any.

Installing

See PS2KeyAdvanced project for install instructions, for some reason the version 1.0.9 failed to install into my pretty recent Arduino install, but version 1.0.8 worked as well.

For ATTiny85 support I used ATTinyCore, again check their respective site for install instructions to your Arduino IDE.

After installing ATTinyCore and PS2KeyAdvanced, load the project into your Arduino IDE and select following settings:

  • Board: ATtiny24/45/85 (No bootloader)
  • Chip: ATtiny85
  • Clock Source: 16 MHz (PLL)
  • TImer 1 Clock: CPU frequency
  • LTO: Enabled
  • millis(): Enabled

Steps to install to ATTiny85:

Use whatever ISP programmer you have. I used cheap USBASP programmer with 10 -> 6 pin adapter cable, having header pins in ISP connector and then pushing the connector into ISP holes (no header soldered) and keeping them tilted in an angle during programming.

  1. Tools -> Burn bootloader (actually only sets fuses, and enables 16MHz PLL clock)
  2. Sketch -> Verify/Compile
  3. Upload using programmer

You should be done now, if not, verify your programmer connections. I also have had issue sometimes programming the new parts, which are set to 1MHz default in factory - you might need to change your Arduino settings to slow down the programmer for Fuse burning.

Connecting the adapter

Wiring the keyboard to your Amiga and PCB should be pretty obvious in the following diagram:

Connections

If that is not clear enough, the underside of the PCB has each pin function named.

Several Amigas have different pinouts, Google is your friend here.

Word of warning: if you think of re-using the PS/2 keyboard cable, be warned that most of the keyboards only have 4-wire cable in them and probably the necessary pins are not connected at all (at least if the Amiga you want to connect to has mini-DIN style keyboard connector). I solved this issue by ordering PS/2 extension cable and just cutting off the female plug and then using multimeter to solve cable colors to pins connection. Those extension cables usually have all the 6 wires connected and it's much easier to use them than to solder those pesky mini-DIN connectors.

PCB

PCB files are in pcb -folder, also including gerbers, if you just want to order the PCB. Schematics are respectively in schematics -folder. Bill of Materials, BOM is also provided.

PCB and Schematics were designed using Eagle 9.6.1 free edition.

Top side:

PCB-TOP

Bottom side:

PCB-BOTTOM

Other

Please report any issues you find with the code!

You can also participate in discussions without opening an issue. All enhancement ideas, questions etc. are welcome.

You might also like...
Accurate C port of AHX's Amiga replayer

ahx2play Aims to be an accurate C port of AHX 2.3d-sp3's internal replayer. The project contains example code in the ahx2play folder on how to interfa

Atari-ST version of Shrinkler Amiga packer

STrinkler - Atari exe packer suited for 4KiB demo Use Shrinkler packing technology by Blueberry/Loonies Atari platform support by Leonard/Oxygene Usag

per - Simple unix permission viewer and converter

Per is a simple utility that can verbosely print unix permissions and convert between symbolic and numeric notations and vice-versa.

Simple IEEE 754 float point to register converter

i3ecnv Simple IEEE 754 float point to register converter Usage IEEE 754 converter: Type: i3ecnv double value Example 1 ./i3ecnv 1.2 Value DO

 T-HYDRA is a modified version of original thc-hydra for better use inside Termux .
T-HYDRA is a modified version of original thc-hydra for better use inside Termux .

T-HYDRA is a modified version of original thc-hydra for better use inside Termux . Earlier , hydra pakage had been with Termux repositories. Then afte

Draw a triangle inside Electron's window using DirectX 11, mixing web and native content.
Draw a triangle inside Electron's window using DirectX 11, mixing web and native content.

Draw a triangle inside Electron's window using DirectX 11, mixing web and native content. Limitations The native content is rendered over a child wind

Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave.

Spacex Storage Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave. Contribution Thank you for conside

tabbed window manager that can tile windows inside floating containers

shod ┌───────────────────────┐ │ │ ┌─────┼────

A collection of code snippets and examples showing syntax and capabilities of VEX language inside SideFX Houdini
A collection of code snippets and examples showing syntax and capabilities of VEX language inside SideFX Houdini

VEX tutorial A collection of code snippets and examples showing syntax and capabilities of VEX language inside SideFX Houdini by Juraj Tomori How to u

Owner
Jari Tulilahti
IT Consultant at @rakettitiede - Embedded programming and Electronics are my specialties. Retro computing and fixing old electronics is my passion.
Jari Tulilahti
Simple lights effects driven by an ATTiny85

halloween-lights Simple light effects driven by an ATTiny85 assembled with three gadgets grabbed from Thingiverse Halloween Tree Stump LED Candle [thi

Paolo Loberto 1 Oct 29, 2021
CRServoF - The CSRF serial protocol to PWM servo converter

CRServoF - The CSRF serial protocol to PWM servo converter I wanted to create a small project to mess around with PWM servo output for ExpressLRS, and

Bryan Mayland 107 Dec 28, 2022
USB2Sun - USB keyboard/mouse to Sun Converter

USB2Sun While I've found many projects for connecting the Sun serial based keyboards to a modern machine via USB, I've never found anything to connect

Joakim L. Gilje 9 Nov 24, 2022
Make BAD USB to Reverse Shell with Arduino Digispark (recommended with attiny85)

Make BAD USB to Reverse Shell with Arduino Digispark (recommended with attiny85) Cara Pakai Pastikan Anda telah menginstal Driver Digispark dan mengon

Edo 3 Apr 17, 2022
A USB timer powered by Digispark ATtiny85 according to pomodoro time management technique

⏲ ES Timer Powered ⚡ by Digispark ATtiny85 and it works based on ?? pomodoro time management technique a special timer for all those that work a lot w

null 46 Dec 30, 2022
My own version of a PCB Christmas Tree, using an ATtiny85 / ATtiny13A.

PCB_ChristmasTree My own version of a PCB Christmas tree, using an ATtiny85 / ATtiny13/13A. Some of the ideas are my own, others are borrowed from var

Marius 2 Nov 19, 2022
A 555 timer simulator running on the ATTiny85 :)

ATTiny555 A 555 timer simulator running on the ATTiny85 :) For a more detailed description (and build instructions), check me out on Hackaday! Overvie

null 60 Dec 5, 2022
Digispark attiny85 code to smack the big button!

dave-o-rec The big button what records the trucks! Requires the DigiKeyboard.h library, which is included in the Arduino IDE's DigiStump package. Setu

Dave Regan 1 Dec 25, 2021
Building Netbsd's Amiga port 'loadbsd' tool.

Building Netbsd's Amiga port 'loadbsd' tool. During a netbsd install, I realized the binary Netbsd provided didn't match the functionality described i

Roc Vallès 1 Oct 5, 2021
Source code to the 1980s Amiga product, version dated 1992

HyperCacheAmiga Source code to the 1980s Amiga product, version dated 1992 A fellow named Matthew Kott reached out and asked me to release the source

Plummer's Software LLC 33 Nov 19, 2022