Skip navigation links COURSES > DIGITAL LOGIC DESIGN (EEL3705.SP07.WEB_COHORT1) > COURSE LIBRARY > SUPPLEMENTAL NOTES > USING THE PS/2 PORT FOR KEYBOARD OR MOUSE INPUT EDIT VIEW
End navigation links
Using the PS/2 port for keyboard or mouse input
Item The PS/2 Mouse/Keyboard Protocol
This web page describes the PS/2 link-layer transmit/receive protocol in detail. It is a good example of a synchronous, bidirectional serial line protocol. This may be useful when trying to understand my keyboard receiver circuit, or when designing your own more sophisticated bidirectional link control circuits.
Item Notes on PS/2 keyboard decoding
PS2-keycodes-v4.doc (757 Kb)
PS2-keycodes-v4.pdf (207.161 Kb)
PS2-keycodes-v5.doc (778.5 Kb)
PS2-keycodes-v5.pdf (216.908 Kb)
Here are some notes that I started in Fall '06 in the process of designing my PS/2 keyboard decoder, which translates raw keyboard byte sequences into a more "natural" ASCII-based code. I recently revised them (v4) to describe my new greatly-simplified finite-state machine design. Version 5 rearranges the code a little bit. Read the PDF if your version of Word does not support all of the needed fonts.
Item The PS/2 Keyboard Interface
This webpage describes the application-layer protocol for PS/2 Keyboard Interface in detail. This may be useful if you want to use the keyboard in a more sophisticated, bidirectional way, with error checking, setting the key-repeat rate, turning the LEDs off and on, etc.
Item The PS/2 Mouse Interface
This web page describes the application-layer protocol for mice connected to the PS/2 port. You will need this information if you want to design applications that use the mouse for input. This is a bit more difficult than using the keyboard because a simple unidirectional (receive-only) interface will not work in this case; you need to send commands to the mouse in order to properly initialize it.

OK