Академический Документы
Профессиональный Документы
Культура Документы
Keyboard Interfacing
Key debounce: Pushbutton Keys are used.
These push button keys when pressed, bounces a few times therefore microprocessor wait until the key reach to a steady state. This is known as keydebounce.
The reading of one contact as multiple inputs can be eliminated by a key-debounce technique, using either hardware or software.
Hardware technique
Software Technique
The steps involved in this process are: 1. Check whether all keys are open 2. Check a key closure 3. Identify the key 4. Find the binary key code for the key
decimal point
Logic 0 turns on a segment. Example: To display digit 1, all segments except b and c should be off. Byte 11111001 = F9H will display digit 1.
Logic 1 turns on a segment. Example: To display digit 1, all segments except b and c should be off. Byte 00000110 = 06H will display digit 1.
2 Key Lockout
In scanned keyboard mode with 2 key lockout, when a key is pressed, a debounce logic comes into operation During the next two scans, the other keys are checked for closure and if no other is pressed the first pressed key is identified The key code of the identified key is entered into the FIFO with SHIFT and CNTL status, provided that FIFO is not full, that is it has at least one byte free If the FIFO does not have any free byte, naturally the key data will not be entered and the error flag is set
N-Key Rollover
In scanned keyboard with N-key rollover each key depression is treated independently When a key is pressed the debounce circuit waits for two keyboard scans and then checks whether the key is still depressed If it is still depressed, the code is entered in FIFO RAM Any number of keys can be pressed simultaneously and recognized in the order, the keyboard scan recorded them All the codes of such keys are entered into FIFO