Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:hardware:8042

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine 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] fraterback2root: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?rowsHeaderSource=Auto}} 
-^  Command  ^ Description  ^+^  Command  ^ Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ^
 |  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.  Hardware defaults to these indicators turned off. <code> |  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.  Hardware defaults to these indicators turned off. <code>
-     |7-3|2|1|0| Keyboard Status Indicator Option Byte +|7-3|2|1|0| Keyboard Status Indicator Option Byte 
-       |  | | `--- Scroll-Lock indicator  (0=off, 1=on)   +  |  | | `--- Scroll-Lock indicator  (0=off, 1=on) 
-       |  | `---- Num-Lock indicator  (0=off, 1=on) +  |  | `---- Num-Lock indicator  (0=off, 1=on) 
-       |  `----- Caps-Lock indicator  (0=off, 1=on)        +  |  `----- Caps-Lock indicator  (0=off, 1=on) 
-       `------- reserved (must be zero)   +  `------- reserved (must be zero)    </code>                                                                                                                                                                       
-</code>+|  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/typematic key and then transmits an ACK.  The system must follow up by sending an option byte which will again be ACK'ed by the keyboard:<code> 
-|  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/typematic key and then transmits an ACK.  The system must follow up by sending an option byte which will again be ACK'ed by the keyboard:<code> + 00  return byte indicating scan code set in use 
-     00  return byte indicating scan code set in use      + 01  select scan code set 1  (used on PC & XT) 
-     01  select scan code set 1  (used on PC & XT)      + 02  select scan code set 2 
-     02  select scan code set 2      + 03  select scan code set 3</code>                                                                                                                                                                                                                                                                                                                                                 
-     03  select scan code set 3  </code>+|  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.<code> |  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.<code>
-  |7|6|5|4|3|2|1|0|  Typematic Rate/Delay Option Byte + |7|6|5|4|3|2|1|0|  Typematic Rate/Delay Option Byte 
-   | | | |-+-+-+-+---- typematic rate indicator (see INT 16,3)    +  | | | |-+-+-+-+---- typematic rate indicator (see INT 16,3) 
-   | | `------- A in period formula (see below)    +  | | | | | `------- A in period formula (see below) 
-   | | | `---------- B is period formula (see below) +  | | | `---------- B is period formula (see below) 
-   | `------------- typematic delay    +  | `------------- typematic delay      
-   `-------------- always zero   </code>\\ delay = (rate+1) * 250   (in milliseconds)\\ \\ rate = (8+A) * (2**B) * 4.17  (in seconds, +/- 20%)\\ \\ Defaults to 10.9 characters per second and a 500ms delay. If a command byte (byte with high bit set) is received instead of an option byte this command is cancelled. | +  `-------------- 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.| +</code>  \\ delay = (rate+1) * 250   (in milliseconds)\\ \\ rate = (8+A) * (2**B) * 4.17  (in seconds, +/- 20%)\\ \\ Defaults to 10.9 characters per second and a 500ms delay.\\ If a command byte (byte with high bit set) is received instead of an option byte this command is cancelled.  
-|  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/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.| +|  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). \\ Keyboard returns a one byte completion code then sets default Scan Code Set 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  
  
Ligne 54: Ligne 54:
  
  
-<WRAP rounded box>+<WRAP round box>
 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
 </WRAP> </WRAP>
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; look up "square wave harmonics" if you're interested.)  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; look up "square wave harmonics" if you're interested.) 
 ==== 8042 Status Register (port 64h read) ==== ==== 8042 Status Register (port 64h read) ====
- +{{tablelayout?rowsHeaderSource=Auto}} 
-^  Port  ^  Mode  ^ name ^Description^ +^  Port  ^  Mode   ^ name               ^ Description                                                                                                                                                                                                                                                                                                                                                                                                         
-|  60h  |  read   |output register  | (should only be read if Bit 0 of status port is set to 1)| +|  60h   |  read   | output register    | (should only be read if Bit 0 of status port is set to 1)                                                                                                                                                                                                                                                                                                                                                           
-|  60h  |  write  |data register.   | Data should only be written if Bit 1 of the status register is zero (register is empty). When this port is written Bit 3 of the status register is set to zero and the byte is treated as a data. The 8042 uses this byte if it's expecting data for a previous command, otherwise the data is written directly to the keyboard.See <A HREF="keyboard_commands.html">KEYBOARD COMMANDS</A> for information on programming the actual keyboard hardware.| +|  60h   |  write  | data register.     | Data should only be written if Bit 1 of the status register is zero (register is empty). When this port is written Bit 3 of the status register is set to zero and the byte is treated as a data.\\ The 8042 uses this byte if it's expecting data for a previous command, otherwise the data is written directly to the keyboard.See KEYBOARD COMMANDS for information on programming the actual keyboard hardware.  
-|  64h  |  read   |status register. | Can be read at any time.\\ See table above for more information.| +|  64h   |  read   | status register.   | Can be read at any time.\\ See table above for more information.                                                                                                                                                                                                                                                                                                                                                    
-|  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   |  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.                                                                                                                                                           |
  
 ^  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's internal 8048.+PC systems previous to the AT use the [[back2root:ibm-pc-ms-dos:hardware:8255|8255]] PPI as a keyboard controller and use the keyboard's internal 8048.
  
 the keyboard's internal controller buffers up to 16 bytes of make/break code information.This is common among all PC systems and shouldn't be confused with the (32 byte) keyboard buffer maintained by the BIOS. the keyboard's internal controller buffers up to 16 bytes of make/break code information.This is common among all PC systems and shouldn't be confused with the (32 byte) keyboard buffer maintained by the BIOS.
 </WRAP> </WRAP>
  
-see  <A HREF="keyboard_commands.html">KEYBOARD COMMANDS</A> for information on programming the keyboards internal microprocessor+see KEYBOARD COMMANDS for information on programming the keyboards internal microprocessor
  
back2root/ibm-pc-ms-dos/hardware/8042.1672331524.txt.gz · Dernière modification : 2022/12/29 17:32 de frater