Friday, January 17, 2014

the Keyboard Scan Codes.

the Keyboard Scan Codes.

1 - Regardless of the type of key used, the act of pressing it will cause a change in current flow through the
circuits associated with the key.

2 - A microprocessor such as the Intel 8048 within the keyboard constantly scans circuits leading to the key.
It detects the increase and decrease of power button being pressed. When it detects an increase or decrease
the stream, the processor can say so much whether the key was pressed or released. Each key has a particular
A set of codes, even for users that they appear identical. The processor may, for example, to distinguish between
Shift left and right. To distinguish between a real signal and abnormal fluctuations in the current scan
is repeated hundreds of times per second. Only the signals sensed by two or more scans have significance for the
processor.

3 - Depending on which key circuit bears the signal to the microprocessor, the processor generates a number, known as
scan code. There are two scan codes for each key, one for when it is pressed and another when it is
released. The processor stores this number in the buffer memory of the keyboard itself and loads it into a connection port for
that can be read by the computer's BIOS. Then, the processor sends an interrupt signal through cable
keyboard, stating that there is a code scan waiting for him. An interrupt requests that the processor set aside
whatever you're doing and turn your attention to the service being requested.

4 - The BIOS reads the scan code from the keyboard port and sends a signal to the keyboard, informing him that the code can
be cleared from memory.

5 - If the scan code is on a key obtained from or Shift keys to a considered
special or two states - Ctrl, Alt, Num Lock, Caps Lock, Scroll Lock and Insert - BIOS change two bytes in an area
special memory to record which keys were pressed.

6 - For all other keys, the BIOS checks these bytes to determine if a key was pressed with Shift or
special. Depending on what you find, the BIOS translates the scan code to ASCII code, used by the PC, which
represents a character or a special code for function key or key cursor movement. The characters
lowercase and uppercase have different ASCII codes. In both cases, the BIOS sets an ASCII code or key
special in its own memory, which will be sought by the operating system or the program so that the operation
is being carried out has finished.


Source: Evolution of Computers

No comments:

Post a Comment