PS/2 Keyboard v.5

This module connects a usb keyboard to my modular computer. You need to connect the O_CLK & O_DAT to the z80 data lines(D1,D2 is my default ) to control the clock and Data signals of the Keyboard. Also the kb_int to an int and ce_in and ce_out to the device select board (this two can be on the same device no, as you can see in the picture i jumpered them).

Whenever a key is pressed on the keyboard the KB_INT signal is set, i connect this signal to my interrupt handler board so it is possible to know which device gave the interrupt. In version 5.1 of the PCB you can select via a jumper if you want to have a notKBint or a KBint

On my OS i just set a flag whenever this device issues an interrupt. On my main loop i just check if there is a key available and if it is, i read it (IN A,(xx))and then i reset the board to be able to receive the next key. All the neccessary code for handling the keyboard is available on github, one routine to initialize it, one to check for the availability of a key and one to read it. Key translation and key release is handled on these routines.

Schematics
PCB version 5

PCB version 5.1 files bellow

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *