Commodore 900 keyboard interface

From: Michal Pleban <>
Date: Sun, 30 Nov 2014 23:52:51 +0100
Message-ID: <>

Today I hot hold of a Microchip development board populated with a 
midrange PIC. So I hooked it to the Commodore 900 keyboard port and 
played with it until I reverse-engineered the keyboard protocol. I am 
posting it here in case anyone else needs it :-)

The kyeboard connector has the same pinout as Amiga 2000, except the pin 
that is "n.c." on the A2000 is the /RESET signal (which is needed - see 

The signals, however, are used differently than on the A2000. In fact, 
the keyboard interface is crudely constructed with a shift register 
piggybacked on an IO chip in the C900 as an afterthought - originally 
they constructed the computer without the keyboard at all (!) so the 
protocol is quite primitive.

The keyboard clock is driven by the keyboard. The keyboard data is 
clocked on the negative edge of the clock. A start bit of 1 must be sent 
first, then 7 bits of the scancode, then a make (0) or break (1) bit.

The scancodes are different than those from the Amiga. They are laid out 
sequentially following the layout of the keys, so 0x01 = Esc, 0x02 = 1, 
and so on.

The break bit is significant for the Ctrl, Shift and Alt keys. For all 
the other keys, the break scancodes are ignored by the computer.

There is no special make/break mechanism for Caps Lock as on the Amiga. 
So the computer and the keyboard must keep track of the Caps Lock state 
/ LED separately. Perhaps the RESET line tells the keyboard that the 
computer has been reset so it can reset the LED (?).

Most probably there is also no mechanism of transmission 
resynchronization if some bits are sent incorrectly, such as on the 
Amiga. Because each transmission must begin with a "1", the keyboard is 
free to transmit any number of "0" bits before the actual transmission 
as these will be dutifully ignored by the computer.

So here it is - the Commodore 900 keyboard protocol. Now I can create 
the AT to C900 adapter :-)


       Message was sent through the cbm-hackers mailing list
Received on 2014-11-30 23:00:03

Archive generated by hypermail 2.2.0.