
SuperPower RPi KiCAD
SensorsIot/SuperPower
Here you should find the best power supplies for your low-power projects

PS/2 to Amiga Keyboard Interface Adapter
Ps2 to amiga is an open-source printed circuit board by dylangageot, from the dylangageot/pakia repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 46.8 × 18 mm with 6 parts on 9 nets, routed with 54 tracks and 0 vias.
It is built around the ATTINY85-20SU. Its parts include 3 connectors, 1 capacitor and 1 IC. It belongs with the retro computing and games and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
Standalone Amiga keyboards are more than ever difficult to find, especially due to the increased perceived value of Amiga computers and peripherals on the second-hand market.
Unfortunately, the keyboard interface used by Commodore is proprietary, see the Amiga keyboard interface documentation. Even though it uses the same 5-pin DIN 41524 connector as IBM AT keyboards, the keyboard interface is still different and therefore not compatible with any easy-to-find PC-compatible keyboards.
PAKIA is yet another adapter circuit, taking a PS/2 keyboard interface in input, and translating it into the Amiga keyboard interface in output.
Despite being different, both PS/2 and Amiga keyboard interfaces share similarities: they use the same KDAT and KCLK signal pair. In either case, the keyboard is responsible for generating the clock and preparing 8 data bits to be read on the KDAT signal a falling or rising edge of the KCLK signal.
Leveraging multiple timers and interrupt service routines, an ATtiny85 captures frames sent out from an input PS/2 keyboard, interprets them, and then converts them to the Amiga keyboard interface using a look-up table written in Flash memory.
In contrast to other solutions, signal timings for the Amiga keyboard interface are driven by discrete time events instead of being driven by blocking delays. One hardware timer generates periodic interrupt requests that once the corresponding ISR runs, the signal is taught to evolve its state through a software-based finite state machine, hence changing pins levels for both KDAT and KCLK.
This asynchronous philosophy makes it possible to incorporate this piece of software in a busier system, without introducing blocking delay when Amiga commands are being sent, minus interrupt service routines execution time of course.
You might think that this is overengineering and that other solutions got it right enough by using blocking delays to handle their signal timings, and you are probably right! The solution I have implemented was way more stimulating for me to develop, so here we are!
The binary currently weighs 3.2KB, in that regard, one could choose to use an ATtiny45 instead of an ATtiny85, it might be enough even in case of additional features coming in future updates.
The project uses C++ mainly to benefit from namespaces.
[!WARNING] The build system is only available on Linux.
Required:
avr-gccandavrdude, respectively 5.4.0 and 6.3-20171130 on my setup.
avrdude in the Makefile, with the variable PROGRAMMER,make,make flash while your programmer is wired to the ISP connector on the PCB.The lookup table to convert PS/2 scancode to Amiga ones is hard-coded in src/translation_map.hh.
A tool called translation-map-generator can be built from the tools directory.
By modifying the source code, one can generate other hard-coded LUT from a readable code:
(cd tools && make)
tools/translation-map-generator > src/translation_map.hhThe schematic and PCB were drawn in KiCAD. The project is available in the hardware directory.
"yet another adapter circuit", is there are other adapter circuits?
Yes, there are other adapter circuits!
I have started this project blindly, without searching if anyone made one before. Frankly, it was appealing to my eye, so why not! I have found documentation on both keyboard interfaces and started developing a proof of concept on an Arduino Uno board, based on an ATmega328p.
I have discovered many of them once I had finished the prototype for PAKIA and wanted to design a PCB for it, with eventually a lighter microcontroller than the ATmega328p. Here is a list of related open-source projects and their respective solutions:
There is also the Lyra 3 adapter sold by Individual Computers. This one is very complete feature-wise, but I did not want to buy one as I thought that it would spoil my pleasure of developing my own, I'm sure you get it, right?
| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | 100nF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1 |
| 1 | ATtiny85-20S | Package_SO:SOIC-8W_5.3x5.3mm_P1.27mm | U1 |
| 1 | AVR-ISP-6 | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J2 |
| 1 | Conn_01x05 | Library:AMIGA_KB_PADS | J1 |
| 1 | DIN-5_180degree | Library:DIN_5PIN_180d_Female | J4 |
The 5 most common of 6 parts.

SensorsIot/SuperPower
Here you should find the best power supplies for your low-power projects

KivApple/dell-charger-emulator
Emulator of original Dell charger using ATTINY85


bwack/C64-Saver-bwack
C64 Saver v1 and v2 - Overvoltage protection for the C64 and its power brick.


valerionew/very-good-uc-doggos
A special graduation present for a special friend. Six microcontrollers in one devboard


spielhuus/LoRa-Environmental-Sensors
ATtiny85 based LoRa atmospheric sensor board with BME280
It measures 46.8 × 18 mm and has 2 copper layers, 1.6 mm thick.
6 parts, built around the ATTINY85-20SU. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the dylangageot/pakia repository on GitHub, at the commit this page was made from: the board is hardware/ps2_to_amiga.kicad_pcb and its schematic hardware/ps2_to_amiga.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).