Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
back2root:ibm-pc-ms-dos:hardware:8042 [2022/12/29 17:32] – [8042 - Speaker Controller (AT,PS/2) - Port 61h] frater | back2root:ibm-pc-ms-dos:hardware:8042 [2024/08/27 15:38] (Version actuelle) – [Commands System Issues to Keyboard (write port 60h)] frater | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
=== Commands System Issues to Keyboard (write port 60h) === | === Commands System Issues to Keyboard (write port 60h) === | ||
- | + | {{tablelayout? | |
- | ^ Command | + | ^ Command |
| EDh | Set/Reset Mode Indicators, keyboard responds with ACK then waits for a following option byte.\\ When the option byte is received the keyboard again ACK's and then sets the LED's accordingly.\\ Scanning is resumed if scanning was enabled. If another command is received instead of the option byte (high bit set on) this command is terminated. | | EDh | Set/Reset Mode Indicators, keyboard responds with ACK then waits for a following option byte.\\ When the option byte is received the keyboard again ACK's and then sets the LED's accordingly.\\ Scanning is resumed if scanning was enabled. If another command is received instead of the option byte (high bit set on) this command is terminated. | ||
- | |7-3|2|1|0| Keyboard Status Indicator Option Byte | + | |7-3|2|1|0| Keyboard Status Indicator Option Byte |
- | | + | | | | `--- Scroll-Lock indicator |
- | | + | | | `---- Num-Lock indicator |
- | | + | | `----- Caps-Lock indicator |
- | | + | `------- reserved (must be zero) </ |
- | </ | + | | EEh | Diagnostic Echo, keyboard echoes the EE byte back to the system without an acknowledgement. |
- | | EEh | Diagnostic Echo, keyboard echoes the EE byte back to the system without an acknowledgement.| | + | | F0h | PS/2 Select/Read Alternate Scan Code Sets, instructs keyboard to use one of the three make/break scan code sets.\\ Keyboard responds by clearing the output buffer/ |
- | | F0h | PS/2 Select/Read Alternate Scan Code Sets, instructs keyboard to use one of the three make/break scan code sets. Keyboard responds by clearing the output buffer/ | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | | F2h | PS/2 Read Keyboard ID, keyboard responds with an ACK and a two byte keyboard ID of 83AB. | |
- | | F2h | PS/2 Read Keyboard ID, keyboard responds with an ACK and a two byte keyboard ID of 83AB.| | + | |
| F3h | Set Typematic Rate/Delay, keyboard responds with ACK and waits for rate/delay byte.\\ Upon receipt of the rate/delay byte the keyboard responds with an ACK, then sets the new typematic values and scanning continues if scanning was enabled.< | | F3h | Set Typematic Rate/Delay, keyboard responds with ACK and waits for rate/delay byte.\\ Upon receipt of the rate/delay byte the keyboard responds with an ACK, then sets the new typematic values and scanning continues if scanning was enabled.< | ||
- | | + | |7|6|5|4|3|2|1|0| |
- | | + | | | | |-+-+-+-+---- typematic rate indicator (see INT 16,3) |
- | | + | | | | | | `------- A in period formula (see below) |
- | | + | | | | `---------- B is period formula (see below) |
- | | + | | `------------- typematic delay |
- | | + | `-------------- always zero |
- | | F4h | Enable Keyboard, cause the keyboard to clear its output buffer and last typematic key and then respond with an ACK. The keyboard then begins scanning.| | + | </ |
- | | F5h | Default w/Disable, resets keyboard to power-on condition by clearing the output buffer, resetting typematic rate/delay, resetting last typematic key and setting default key types. The keyboard responds with an ACK and waits for the next instruction.| | + | | F4h | Enable Keyboard, cause the keyboard to clear its output buffer and last typematic key and then respond with an ACK. The keyboard then begins scanning. |
- | | F6h | Set Default, resets to power-on condition by clearing the output buffer, resetting typematic rate/delay and last typematic key and sets default key types. The keyboard responds with an ACK and continues scanning.| | + | | F5h | Default w/Disable, resets keyboard to power-on condition by clearing the output buffer, resetting typematic rate/delay, resetting last typematic key and setting default key types.\\ The keyboard responds with an ACK and waits for the next instruction. |
- | | F7h | PS/2 Set All Keys to Typematic, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Typematic. Scanning continues if scanning was enabled. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | F6h | Set Default, resets to power-on condition by clearing the output buffer, resetting typematic rate/delay and last typematic key and sets default key types.\\ The keyboard responds with an ACK and continues scanning. |
- | | F8h | PS/2 Set All Keys to Make/Break, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Make/Break. Scanning continues if scanning was enabled. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | F7h | PS/2 Set All Keys to Typematic, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Typematic.\\ Scanning continues if scanning was enabled. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | F9h | PS/2 Set All Keys to Make, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Make. Scanning continues if scanning was enabled.\\ This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | F8h | PS/2 Set All Keys to Make/Break, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Make/Break.\\ Scanning continues if scanning was enabled. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | FAh | PS/2 Set All Keys to Typematic Make/Break, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Typematic Make/ | + | | F9h | PS/2 Set All Keys to Make, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Make. Scanning continues if scanning was enabled.\\ This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | FBh | PS/2 Set Key Type to Typematic, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to typematic.This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | FAh | PS/2 Set All Keys to Typematic Make/Break, keyboard responds by sending an ACK, clearing its output buffer and setting the key type to Typematic Make/Break.\\ Scanning continues if scanning was enabled.\\ This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | FCh | PS/2 Set Key Type to Make/Break, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to Make/Break. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | FBh | PS/2 Set Key Type to Typematic, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to typematic.This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. | |
- | | FDh | PS/2 Set Key Type to Make, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to Make.\\ This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use.| | + | | FCh | PS/2 Set Key Type to Make/Break, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to Make/Break. This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | FEh | Resend, should be sent when a transmission error is detected from the keyboard| | + | | FDh | PS/2 Set Key Type to Make, keyboard responds by sending an ACK, clearing its output buffer and then waiting for the key ID (make code from Scan Code Set 3).\\ The specified key type is then set to Make.\\ This command may be sent while using any Scan Code Set but only has effect when Scan Code Set 3 is in use. |
- | | FFh | Reset, Keyboard sends ACK and waits for system to receive it then begins a program reset and Basic Assurance Test (BAT). Keyboard returns a one byte completion code then sets default Scan Code Set 2.| | + | | FEh | Resend, should be sent when a transmission error is detected from the keyboard |
+ | | FFh | Reset, Keyboard sends ACK and waits for system to receive it then begins a program reset and Basic Assurance Test (BAT). | ||
Ligne 54: | Ligne 54: | ||
- | < | + | < |
command F7h through FDh are NOP's on the AT and are ACK'ed but not acted upon | command F7h through FDh are NOP's on the AT and are ACK'ed but not acted upon | ||
</ | </ | ||
Ligne 83: | Ligne 83: | ||
Moving in and out repeatedly produces audible tones if the speed of repetition (the frequency) is within the range the speaker can reproduce and the human ear can hear. Also, a single movement in or out makes a click sound because it's so fast. Thus, a frequency which is too low to be heard as a tone may be heard as a rattle or buzz. (In fact, any frequency produced by this system also produces higher frequencies; | Moving in and out repeatedly produces audible tones if the speed of repetition (the frequency) is within the range the speaker can reproduce and the human ear can hear. Also, a single movement in or out makes a click sound because it's so fast. Thus, a frequency which is too low to be heard as a tone may be heard as a rattle or buzz. (In fact, any frequency produced by this system also produces higher frequencies; | ||
==== 8042 Status Register (port 64h read) ==== | ==== 8042 Status Register (port 64h read) ==== | ||
- | + | {{tablelayout? | |
- | ^ Port ^ Mode ^ name ^Description^ | + | ^ Port ^ Mode |
- | | 60h | read | + | | 60h |
- | | 60h | write |data register. | + | | 60h |
- | | 64h | read | + | | 64h |
- | | 64h | write |command register.| Writing this port sets Bit 3 of the status register to 1 and the byte is treated as a controller command. Devices attached to the 8042 should be disabled before issuing commands that return data since data in the output register will be overwritten.| | + | | 64h |
^ bit ^ Port 60h ^ Port 64h ^ 8042 Status Register | ^ bit ^ Port 60h ^ Port 64h ^ 8042 Status Register | ||
Ligne 161: | Ligne 161: | ||
<WRAP round box> | <WRAP round box> | ||
- | PC systems previous to the AT use the 8255 PPI as a keyboard controller and use the keyboard' | + | PC systems previous to the AT use the [[back2root: |
the keyboard' | the keyboard' | ||
</ | </ | ||
- | see <A HREF=" | + | see KEYBOARD COMMANDS for information on programming the keyboards internal microprocessor |