NOTE - I may be able to answer questions about PC keyboard H/W and interfacing - I have no knowledge, however, about PC S/W even if it's to do with keyboards
A - Although the connectors have 5 or 6 pins, there are only four connections;
Q - Is the codes on the keyboard serial cable the same as the scan codes you use when writing 'C' programs, or ASCII?
A - Nope, Totally different from both. There's no logic to them; therefore the easiest way to deal with them is to use a look-up table.
Q - What are the codes for the 3 extra keys on a 'win95 105 keyboard?
A - According to my PC keyboard code displayer, in Mode 2 they are:-
Looking at the pins of the plug:-
(or the wires of a socket)
Apologies if these graphics do not show on your default background colour.
1 - DATA, 2 - n/c, 3 - GND, 4 - +5V, 5 - CLOCK, 6 - n/c
1 - CLOCK, 2 - DATA, 3 - n/c, 4 - GND, 5 - +5V
AT keyboard routines (both ends) on Mauricio Culibrk's PIC page, for if you want a PC keyboard connected to a PIC project, or a PIC project to connect to a PC. Also a link to a keyboard FAQ that is very clear
Apologies - DEAD Link - Was "http://www.enterprise.ca/~jbilous/kybrdidx.htm" - or Tomi Engdahl's computers and microprocessors page(then FIND 'keyboard') - Links to various keyboard info. inc. links to a good document on interfacing the keyboard and to AT controlling code for the 6502
Philips Ap Note 434 (PDF) or Philips Ap Note 434 (GIF) gives the 80C751 (8051 family) microcontroller code for a PC AT keyboard to I2C converter.
Atmel App Note AVR313 (PDF) has info. and code (in C) to interface a PC AT keyboard to the Atmel AVR range.
Aminet/hard/hack (also in the hard/hack dir of other Aminet mirrors) gives the 8051 microcontroller code for the PC keyboard to Amiga converter which can handle win95 keyboards
KEYBTST.ZIP gives a very basic program for the parallax BASIC stamp II, to send key-codes to the PC's keyboard port. It also gives a write-up of the XT and AT keyboard interfaces (although IMO some details could be wrong / different to the keyboards I've looked at).
This Mail from Roger Coleman gives a snippet of code for the PIC microcontroller, for decoding alphanumeric keyboard codes .
Try also:-
www.repairfaq.org/gilipg/LINK/PORTS/F_Keyboard_FAQ.html
How to interface an AT keyboard to a system expecting ASCII input
PIC 16C84 Routine
hth.com/filelibrary/TXTFILES/keyboard.txt
www.geocities.com/SiliconValley/Bay/8302/keybrd.htm
nyquist.ee.ualberta.ca/~jdv/
www.barcodeman.com/scan_doc.html
a repeat of an FAQ
(thanks to Mark Willis and James Newton for some of these links)
The IBM PC reference manual, section 4 also has good material.
If you want more information, Mail Me
Last Updated by Steve Lawther on Saturday, 3 July, 1999 at 7:08 PM.