Pressing a key on computer keyboard

  • Thread starter Thread starter jackson6612
  • Start date Start date
  • Tags Tags
    Computer Keyboard
Click For Summary
The discussion centers on how a computer keyboard registers key presses, specifically the "A" key. When the key is pressed, a sequence of voltage signals is generated, which is then sent to the RAM and recognized by the CPU. The keyboard uses a row and column scanning method to identify which key is pressed, mapping it to an ASCII code. The ASCII code for "A" is sent to the PC, where it is stored in a FIFO buffer until processed. The layman contributor seeks confirmation on their understanding of this process.
jackson6612
Messages
334
Reaction score
1
Suppose "0" and "1" digits of binary in computers stand for 0v and 5v respectively. Further suppose "A" on the keyboard is the result of this combination "1101". Let's say there are four open switches lying down under the "A" key. When the key is pressed one of the four switches produced 0v and all others 5v in a proper sequence. That sequence of voltages - 5v,5v,0v,5v - flows to the RAM, where it gets recorded temporarily. Then, the CPU notices the presence of the sequence of voltages there and so on.

Am I on the track? Please let me know, and please remember I'm a layman as I'm sure you have figured out yourself. Thanks for your help and time.
 
Engineering news on Phys.org
jackson6612 said:
Suppose "0" and "1" digits of binary in computers stand for 0v and 5v respectively. Further suppose "A" on the keyboard is the result of this combination "1101". Let's say there are four open switches lying down under the "A" key. When the key is pressed one of the four switches produced 0v and all others 5v in a proper sequence. That sequence of voltages - 5v,5v,0v,5v - flows to the RAM, where it gets recorded temporarily. Then, the CPU notices the presence of the sequence of voltages there and so on.

Am I on the track? Please let me know, and please remember I'm a layman as I'm sure you have figured out yourself. Thanks for your help and time.

No. In simple terms, keyboards are scanned in row+column fashion, and the scanning circuit has a "dictionary" (ROM) copy of what each row+column combination should map into, character code wise.

So the scanning circuit energizes column 1, and looks to see if that energization shows up on any of the rows (holding down a key connects the column drive to the appropriate row sense circuit). Columns are energized in a rotating fashion, and the circuit keeps looking for energy coming back on the row sense lines to indicate a key (connection) being held down.

That's way over-simplified, but that's what you asked for.
 
jackson6612,

berkman succinctly explained how a keyboard internally determines which key was pressed. Once the keyboard determines which key is being pressed, it determines if the <Shift> key is pressed. As berkman points out, the result is mapped to a particular ASCII code for that key. The basic ASCII characters range from 0h to FFh (0 - 255) and are then sent via RS232 protocols to the PC. In your specific example of "A", the ASCII character 41h (65 decimal) is sent, which would look like "0100 0001" in binary, and implies either the <Shift> key was depressed, or the <Caps Lock> was set.

From the PC's point-of-view, it does not care how the serial data is generated. When a serial character is received it is simply put into a FIFO buffer until the CPU requests it. For a detailed review of the serial protocol: http://www.computer-engineering.org/ps2protocol/

Fish
 
Thanks a lot, Berke, Fun.

As I mentioned that I'm a layman, so I'm not much interested in exact details. I wanted to know if I have the general idea right even for a single key. I do appreciate your help but it's just that much of it just flies over the head. So, please let me know if I have the general idea correct? Thanks.
 
jackson6612 said:
Thanks a lot, Berke, Fun.

As I mentioned that I'm a layman, so I'm not much interested in exact details. I wanted to know if I have the general idea right even for a single key. I do appreciate your help but it's just that much of it just flies over the head. So, please let me know if I have the general idea correct? Thanks.

read berkeman's reply again and you will get the idea :)
he layed it out about as simply as possible without getting too technical

Dave
 
Thread 'I thought it was only Amazon that sold unsafe junk'
I grabbed an under cabinet LED light today at a big box store. Nothing special. 18 inches in length and made to plug several lights together. Here is a pic of the power cord: The drawing on the box led me to believe that it would accept a standard IEC cord which surprised me. But it's a variation of it. I didn't try it, but I would assume you could plug a standard IEC cord into this and have a double male cord AKA suicide cord. And to boot, it's likely going to reverse the hot and...

Similar threads

Replies
4
Views
7K
Replies
12
Views
13K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
7K
Replies
3
Views
5K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 152 ·
6
Replies
152
Views
10K
  • · Replies 2 ·
Replies
2
Views
3K