Data Processing Transfer Sequence in CPU for Keyboard Input

  • Thread starter Thread starter Ali Inam
  • Start date Start date
  • Tags Tags
    Data Processing
AI Thread Summary
When a key is pressed on the keyboard, the keycode is buffered by the keyboard's internal CPU and an interrupt is generated to notify the main CPU. The CPU then processes this interrupt, allowing the operating system to handle the input character, which may involve placing it in a keyboard buffer. The keycode is converted into an ASCII character, which is then sent to the video driver for display. The sequence of data transfer typically involves the keyboard buffer, then the operating system, and finally the video output. Understanding this process requires knowledge of operating systems and CPU architecture.
Ali Inam
Messages
99
Reaction score
0
When the data reaches the CPU via keyboard (suppose I typed the letter "A")


So, what are going to be the stages in the CPU. I mean where will data be going first ? !

The Cache ?
or RAM/ROM or registers ? !

I know about all the data processing functions they have, but, I am confused by the sequence of Data Transfer in order to see the letter "A" on the screen


Hopeful

:confused:
 
Technology news on Phys.org
I think no one is answering because it's like explaining how dial tone happens--seems to simple to users, but there are a whole lot of things going on behind the scene. Simplified version: the characters you type go into an input buffer in memory (handled by the interface the keyboard is attached to, which could be either a USB port/driver, or an older PS/2 port/driver), and the keyboard has to raise an interrupt to let the CPU know that chars are incoming. The CPU then let's the operating system "handle" the characters that were typed, and the manner in which they show up on the screen depends on the user program (if any) which the operating system considered to be active at the time when you typed the characters. The operating system allows the appropriate user program to decide what to do with the input chars, whether to display them, and how.
 
haha, this is too complex for a short answer.


read up on operating systems and architecture and you will understand *a little* more. The accurate short answer - it depends.
 
I've reported this thread to get it merged with the other one in homework--hopefully, they'll determine whether it ought to be in this forum or the homework one. If this is homework, I would suspect it's asking you to elaborate upon the interrupt service routine for whichever processor you're studying.

There's a post over in EE wondering about the 'antiquated' microprocessor textbook they're studying, which dates from 1996 (the one I used in the course I took in 2004 dates to 1991!) The reality of the situation is that the fundamental basics of how things work in microprocessors haven't changed that much. The interrupt service routine is still how nearly every operating system handles a key press or mouse movement (outside of maybe some 'real-time' operating systems).
 
There's a cpu inside the keyboard itself that constantly scans the keys for a change in state. When key press occurs, the keyboard buffers up the keycode for an "A" key being pressed and generates an interrupt. The PC's keyboard interrupt driver then inputs the buffered keystroke, and places it into a keyboard buffer, used by the BIOS or the OS. If there's is a pending request to read the keyboard buffer, the keycode is sent to the caller, otherwise it remains buffered. Once the request is made, the keycode is read. Somewhere in the process after this, the keycode is converted into an Ascii character. Then there's some program that sends the ascii character code to the video driver, either in text mode (MSDOS console mode), or graphics mode. In text mode the character is converted to a VGA code if needed, then indexes into a bit pattern matrix in the video cards font table to convert it into an bit image that it then displayed on the screeen. In graphics mode, the font pattern data is from the OS as opposed to the video cards bios.
 
The main problem that I got was in an Exam


They asked about the processing which occurs inside the CPU after the data leaves the keyboard.

I knew waht happens, but, unfortunately, got stucked in the end part of the question in which they had written in brackets that they needed the whole process in a proper sequence.

On that point, I started to think, WHICH DEVICE IS FIRST ? !

I thought it was RAM

But I then had an idea about the Level 1 cache because it is on the microprocessor,

In the END !

I came up with the sequence as
ROM
CACHE
RAM
REGISTERS

:blushing:
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top