|  KEYBOARD
             The 
        Keyboard is a common input device. It is practically attached to every 
        computer system. Its primary purpose is to allow interaction during procession 
        between the operator and the processor. Usually a keyboard is divided 
        into Function keys, Alphanumeric keys and Numeric keypad. A standard keyboard 
        has 84 keys, however, now days there are keyboard having 104 or even more 
        keys.  
         
          |   |  1] Pressing a key causes 
        a change in the amount of current flowing though a circuit associated 
        specifically with that key.2] A microprocessor built into the keyboard, such as the intel 8048, constantly 
        scan circuits leading to the keys. It detects the increase and decrease 
        in current from the key that has been pressed. By detecting both an increase 
        and a decrease in current, the processor can tell when a key has been 
        pressed and when it's been released. Each key has a unique set of 
        codes, even if, to the users, the keys seem identical. The processor 
        can, for example, distinguish between the left and the right shift keys. 
        To distinguish between a real signals and an aberrant current fluctuation, 
        the scan is repeated hundreds of times each second. Only signals 
        for two or more scans are acted upon by the processor.
 3]Depending on which key's circuits carries a signal to the microprocessor, 
        the processor generates a  number, called a scan code. There are 
        two scan codes for each key , one for when the keys is depressed and 
        the other for when it's released. Then the processor sends an interrupt 
        signal over the keyboard cable to tell the processor that a scan code 
        is waiting for it. An interrupt tells the processor to drop whatever 
        alse it is doing and to divert its attention to the service requested 
        by the interrupt.
 4] The BIOS (basic input/output system ) reads the scan code from the 
        keyboard port and sends a signal to the keyboard it can delete the 
        scan code from its buffer.
 5] Depending on the status indicated by the bytes, the BIOS translates 
        the approriate scan code into an ASC II code used by the PC, that stands 
        for a character, or  into a special code for a character, or into 
        a special code for a function key or a cursor movement key. Uppercase 
        and lowercase characters have different ASC II codes. Applications can 
        choose to interpret any keystrike to display a character or as command. 
        The BIOS places the ASC II or special key code into its own memory buffer, 
        where it is  retrieved by the operating system or application software 
        as soon as any current operation is finished.
 |