Skip to the content
PCBKitNew board
4 layers101.6 × 55.9 mmKEMOJO, the printed circuit board in 3D

PS/2 keyboard, mouse and joystick support for RCBus based on ATmega328

Size
101.6 × 55.9 mm
Copper layers
4
Thickness
1.6 mm
Parts
28
Nets
119
Pads
258
Tracks, vias
552, 2
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
5 Jun 2025
Updated
15 Jun 2025

Overview

KEMOJO is an open-source printed circuit board by codesmythe, from the codesmythe/KEMOJO repository on GitHub. It is a 4-layer board of 101.6 × 55.9 mm with 28 parts on 119 nets, routed with 552 tracks and 2 vias.

It is built around the ATMEGA328-PU, 74LS04PC and PC16550DV. Its parts include 12 connectors, 5 capacitors, 4 ICs, 1 resistor and 1 diode. It belongs with the keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

3

README

README.md

KEMOJO (Keyboard / Mouse / Joystick)

KEMOJO

This board provides PS/2 keyboard, PS/2 mouse and Atari or MSX (single button only) joystick support for an RCBus system. It uses the 40-pin RCBus interface.

The keyboard, mouse and joystick inputs are read by an ATmega 328P microcontoller. (This is the same MCU that is in the Arduino UNO.) The ATmega implements the Atari ST IKBD protcol and communicates that protocol serially to an RCBus system via a 16C550 UART.

Table of Contents

Hardware Documentation

Schematic

The board was created using Kicad version 8.0.

Click the image to download a PDF version of the schematic.

Schematic

Connectors

ReferenceDescription
J1In-system Programming (ISP) port for programming the ATmega328P firmware.
J2Atari or MSX Joystick 0, Male DE9 D-Sub. See J7 jumper settings below.
J3Atari or MSX Joystick 1, Male DE9 D-Sub. See J8 jumper settings below.
J4PS/2 6-pin Mini DIN connector for PS/2 keyboard.
J5PS/2 6-pin Mini DIN connector for PS/2 mouse.
J6FTDI Friend connection to 16C550 UART. For debug purposes or UART-only operation.

Jumpers

ReferenceDescriptionComment
J7, J8Atari or MSX operation for Joystick 1/0The J7 and J8 jumper blocks configue Joystick 1 and Joystick 0, respectively, for either Atari or MSX joystick operation. In MSX mode, only one fire button is supported. To configure a jumper block for Atari mode, close the top and bottom jumpers, and leave the middle two open. For MSX mode, close the middle two jumpers and leave the top and bottom jumpers open.
J9I/O Address decodeThe J9 jumper block controls where in the Z80 I/O space the KEMOJO board will appear. The TL16C550 UART that communicates with the ATmega328 requires eight I/O addresses, and can be configured to appear at I/O addresses 0x08-0x0F, 0x28-0x2F, 0x48-0x4F, 0x68-0x6F, 0x88-0x8F, 0xA8-0xAF, 0xC8-0xCF or 0xE8-0xEF.
J10Interrupt connection to RCBusThe board can generate a single interrupt from the TL16C550 UART. Jumper the top two pins of J10 to use the /INT RCBus signal (pin 22) or the bottom two pins to use the RCBus USER1/INT1 signal (pin 37).
JP4IEx bypassWhen the JP4 jumper is closed, the RCBus-Z80 IEI signal (pin 37) is connected directly to the IEO signal (pin 38). When closed, the board is disconnected from RCBus pins 37 and 38. The KEMOJO board does not use IEI or IEO. This jumper is provided to propagate the IEI/IEO daisy chained if required by the system.

Bill of Materials

Text file parts list for pasting into the Mouser BOM tool (login required).

Check out the interactive BOM for the board.

To obtain a KEMOJO PCB, download these Gerbers for use at your preferred PCB manufacturer. I use JLCPCB.

Component TypeReferenceQtyDescriptionPart
CapacitorC1,C2,C3,C4,C550.1 uF, MLCC, 5 mm PitchMouser 594-K104K15X7RF5WH5
DiodeD113 mm, yellow LED indicatorMouser 859-LTL-4251N
ConnnectorJ112x3 straight pin headerMouser 200-TSW10307TD
ConnectorJ2,J32D-Sub DE9 Male, right angle, PCB mountMouser 523-L7SDE9PA4CH4RC39
ConnectorJ4,J52Circular 6-pin Mini Din Connector for PS/2Mouser 490-MD-40SM
ConnectorJ611x6 right angle pin headerMouser 737-PH1RB-06-UA
Jumper BlockJ7,J822x4 straight pin headerMouser 200-TSW10407TD
Jumper BlockJ912x8 straight pin headerMouser 200-TSW10807TD
Jumper BlockJ1012x2 straight pin headerMouser 200-TSW10207TD
ConnectorJ1111x40 right angle pin headerMouser 710-61304011021
Jumper BlockJ1212x2 straight pin headerMouser 200-TSW10207TD
JumperJP411x2 straight pin headerMouser 200-TSW10207TS
TransistorQ112N7000 MOSFET in TO92Mouser 512-2N7000
ResistorR111470 ohm, axial, 1% tolerance, 1/4 WMouser 603-MFR-25FTF52-470R
Integrated CircuitU11ATmega328P MCU in 28-pin DIPMouser 556-ATMEGA328P-PU
Integrated CircuitU21TL16C550 UART in 44-pin PLCCMouser 595-TL16C550CFNR
Integrated CircuitU3174LS138 in 16-pin DIPMouser 595-SN74LS138NE4
Integrated CircuitU4174LS04 in 14-pin DIPMouser 595-SN74LS04NE4
OscillatorX117.3278 MHz can oscillator in 8-pin DIPMouser 774-MXO45HS-3C-7.3
SocketSocket for U1128-pin DIP socketMouser 737-ICS-328-T
SocketSocket for U2144-pin PLCC socketMouser 575-944424
SocketSocket for U3116-pin DIP socketMouser 571-1-2199298-4
SocketSocket for U4114-pin DIP socketMouser 571-1-2199298-3
SocketSocket for X118-pin oscillator socketMouser 535-1108800

Acknowledgements

This project has initially inspired by the Atari ST Eiffel 3 project. I've replaced the PIC microcontroller in that project with an easier-to-use ATmega 328P.

The low-level PS/2 code watches the PS/2 keyboard and mouse clock lines for transitions and signals an interrupt the ATmega. This code then reads in PS/2 bytes and buffers them. It was written by Daniel Cliche (@danodus) and is made available by him under an MIT license from here.

The higher level code that implements the Atari ST IKDB protocol is borrowed from the Hatari Atari ST emulator. It is made available under the GNU GPL, version 2 or higher.

The overall project thus uses the GNU GPL, version 2 or higher.

Parts

28
QtyValueFootprintReferences
50.1uFCapacitor_THT:C_Rect_L7.0mm_W2.0mm_P5.00mmC1, C2, C3, C4, C5
2Conn_02x04_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_VerticalJ7, J8
2DE9_PlugConnector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset7.48mmJ2, J3
2Mini-DIN-6CUSTOM:mini_dinJ4, J5
12N7000Package_TO_SOT_THT:TO-92_HandSolderQ1
1470Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR11
174LS04Package_DIP:DIP-14_W7.62mm_Socket_LongPadsU4
174LS138Package_DIP:DIP-16_W7.62mm_Socket_LongPadsU3
1ATMEGA328PPackage_DIP:DIP-28_W7.62mm_Socket_LongPadsU1
1CXO_DIP8Oscillator:Oscillator_DIP-8X1
1Conn_01x06_PinConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ6
1Conn_01x40Connector_PinHeader_2.54mm:PinHeader_1x40_P2.54mm_VerticalJ11
1Conn_02x02_Counter_ClockwiseConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ10
1Conn_02x02_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ12
1Conn_02x03_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ1
1Conn_02x08_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_VerticalJ9
1Jumper_2_BridgedConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP4
1LEDLED_THT:LED_D3.0mmD1
1LOGORCBUS_LOGO:RCBUSG***
1MountingHoleMountingHole:MountingHole_3.2mm_M3H1
1PC16550DPackage_LCC:PLCC-44_THT-SocketU2

Questions

How big is the KEMOJO PCB?

It measures 101.6 × 55.9 mm and has 4 copper layers, 1.6 mm thick.

What parts does the KEMOJO use?

28 parts, built around the ATMEGA328-PU, 74LS04PC and PC16550DV. 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.

Where can I download the KEMOJO KiCad files?

From the codesmythe/KEMOJO repository on GitHub, at the commit this page was made from: the board is hardware/KEMOJO.kicad_pcb and its schematic hardware/KEMOJO.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the KEMOJO design in my own project?

Its repository states no licence, so its author keeps all rights: ask codesmythe before reusing the design.

Similar boards

  • 2 layers170.2 × 100 mmZ80-SBC, the printed circuit board in 3D

    Z80-SBC

    skiselev/zeta_sbc

    Zeta SBC is an Zilog Z80 based single board computer. It is inspired by Ampro Little Board Z80 and N8VEM project. Zeta SBC is software compatible with RomWBW Firmware

    75 parts53GPL-3.0
  • 2 layers155 × 114 mmIOExpansion, the printed circuit board in 3D

    IOExpansion

    ja1umi/MUTIF09Project

    Various design materials for building my 8-bit-microprocessor-based single board computer(s)

    198 parts10MIT
  • 2 layers100 × 150 mmZ80 Simple Computer, the printed circuit board in 3D

    Z80 Simple Computer

    apws/261103-reto-comp-andrew-grok-kicad

    Rebuilt Z80 educational schematic in KiCad. The board is not routed yet.

    8 parts1
  • 4 layers244 × 244 mmConsole, the printed circuit board in 3D

    Console

    danwerner21/TI99_22-mark2

    Second revision of the TI_99

    269 parts4
  • 2 layersUZ80, the printed circuit board in 3D

    UZ80

    adzierzanowski/z80

    Zilog Z80 (and Intel 8080) assembler/disassembler for everyone and some other tools for my private Z80 stuff

    112 parts2
  • 2 layers106 × 71.3 mmDesktop Hardware Monitor, the printed circuit board in 3D

    Desktop Hardware Monitor

    aapaetsch/HardwareMonitorArduino

    Code, pcb files and schematics for building a hardware monitor based around the atmega328p

    44 parts
  • 2 layers177.8 × 160 mmSCTSCHEM, the printed circuit board in 3D

    SCTSCHEM

    ianalj/SCTSCHEM

    SCT32k schematic.

    57 parts
  • 2 layers92.7 × 85.7 mmPCB 2 (1), the printed circuit board in 3D

    PCB 2 (1)

    siddharthsharma123/ECE445

    UIUC - ECE 445 Senior Design

    44 parts