Pressing a key on computer keyboard

  • Thread starter Thread starter jackson6612
  • Start date Start date
  • Tags Tags
    Computer Keyboard
AI Thread 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
 
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top