1、HT82K629A Windows 2000 USB+PS/2 Keyboard Encoder Block Diagram Rev. 1.60 1 June 11, 2008 Features Operating voltage: 4.4V5.5V Operating frequency: f SYS =6M Design for Windows 95/98/NT/2000/XP Phantom key detection Low voltage reset function USB and PS2 modes supported Auto detect USB or PS2 interfa
2、ce USB 1.1 low speed function Supports PS2 code set 1 and code set 2 Supports multimedia key Supports ACPI key Supports mini-keyboard with Fn key Built-in Watchdog Timer HALT function and wake-up feature for USB mode to reduce power consumption 40-pin DIP, 48-pin SSOP packages General Description Th
3、e HT82K629A can function both in USB and PS2 in- terface environment. For PS2 interface, it supports IBM PC/AT, IBM PS/2 and all compatible machines and pro- vides a 16-character first-in-first-out buffer in which data is stored. For USB interface, it can support the USB standard request as well as
4、HID class request version 1.1. ! “ # $ % . 1 4 4 ; 8 4 4 3 8 4 ; . 8 - = 0 # 0 “ HT82K629A Rev. 1.60 5 June 11, 2008 The HT82K629A responds to the option byte with ACK, sets the indicators and if the HT82K629A was previously enabled, continues scanning. The status of the indica- tors will reflect th
5、e bits in the option byte and can be acti- vated or deactivated in any combination. If another command is received in place of the option byte, execu- tion of the Set/Reset Mode Indicators command is stopped, with no change to the indicator status, and the new command is processed. Immediately after
6、 power-on, the lights default to the off state. If the Set Default and Default Disable commands are received, the lamps remain in the state they were in before the command was received. EEH Echo Echo is a diagnostic aid. When the HT82K629A re- ceives this command, it issues a hex EE response and if
7、the HT82K629A was previously enabled, continues scanning. EFH and F1H Invalid Command EFH and F1H are invalid commands and are not sup- ported. If HT82K629A receives one of these and sends it, the HT82K629A will not acknowledge the command, but returns a Resend command and continues in its pre- viou
8、s scanning state. F0H Select Alternate Scan Codes This command instructs the HT82K629A to select one of the two sets of scan codes. The HT82K629A acknowl- edges receipt of this command with ACK, clears both the output buffer and the typematic key. The host then sends the option byte and the keyboard
9、 responds with another ACK. An option byte value of hex 01 selects scan code set 1, hex 02 selects set 2. An option byte value of hex 00 causes the HT82K629A to acknowledge with ACK and sends a byte telling the host which scan code set is currently in use. After establishing the new scan code set, t
10、he HT82K629A returns to the scanning state it was in be- fore receiving the Select Alternate Scan Codes com- mand. F2H Read ID This command requests identification information from the HT82K629A. The HT82K629A responds with ACK, discontinues scanning and sends the two keyboard ID bytes hex 83h and A
11、Bh. After the output of the second ID byte, the HT82K629A resumes scanning. F3H Set Typematic Rate/Delay The host issues the Set Typematic Rate/Delay com- mand to change the typematic rate and delay. The HT82K629A responds to the command with ACK, stops scanning and waits for the system to issue the
12、 rate/de- lay value byte. The HT82K629A responds to the value byte with another ACK, sets the rate and delay to the value indicated, and continues scanning (if it was previ- ously enabled). Bits 6 and 5 indicate the delay, and bits 4, 3, 2, 1 and 0 indicate the rate. Bit7 is always 0. The delay is e
13、qual to 1 plus the binary value bit 6 and 5, mul- tiplied by 250ms20%. The period (interval from one typematic output to the next) is determined by the following equation: Period = (8+A)*(2B)*0.00417 seconds. Where: A = binary value of bits 2, 1, and 0. B = binary value of bits 4, and 3. The typemat
14、ic rate is 1 for each period and are listed as follows: Bit Typematic Rate 20% Bit Typematic Rate 20% 00000 30.0 10000 7.5 00001 26.7 10001 6.7 00010 24.0 10010 6.0 00011 21.8 10011 5.5 00100 20.0 10100 5.0 00101 18.5 10101 4.6 00110 17.1 10110 4.3 00111 16.0 10111 4.0 01000 15.0 11000 3.7 01001 13.
15、3 11001 3.3 01010 12.0 11010 3.0 01011 10.9 11011 2.7 01100 10.0 11100 2.5 01101 9.2 11101 2.3 01110 8.0 11110 2.1 01111 8.0 11111 2.0 The default values for the HT82K629A are as follows: Typematic rate= 10.9 characters per second 20% Delay = 500ms20% The execution of this command stops without chan
16、ges to the existing rate if another command is received in- stead of the rate/delay value byte. F4H Enable Upon receipt of this command, the HT82K629A will re- spond with ACK, clears its output buffer, clears the last typematic key, and starts scanning.HT82K629A Rev. 1.60 6 June 11, 2008 F5H Default
17、 Disable The Default Disable command resets all conditions to the power on default states. The HT82K629A will respond with ACK, clears its output buffer, sets the de- fault typematic rate/delay, and clears the last typematic key. The HT82K629A then stops scanning and awaits further command. F6H Set
18、Default The Set Default command resets all conditions to the power on default states. The HT82K629A will respond with ACK, clears its output buffer, sets the default key typematic rate/delay, and clears the last typematic key then continues scanning. F7H, F8H, F9H, FAH Set All Keys Since HT82K629A d
19、o not support keyboard code set 3 format, so it will not acknowledge the command but re- turns a Resend command and continues in its previous scanning state. FBH, FCH, FDH Set Key Type Since HT82K629A do not support keyboard code set 3 format, so it will not acknowledge the command but re- turns a R
20、esend command and continues in its previous scanning state. FEH Resend The host sends this command when it detects an error in any transmission from the HT82K629A. It is sent only af- ter a data transmission and before the host allows the next data output. When a Resend is received, the HT82K629A se
21、nds the previous output again (unless the previous output was Resent, in which case the HT82K629A sends the last byte before the Resend command). Commands to the Host The following table shows the commands that the HT82K629A may send to the host and their hexadeci- mal values. Command Hex Value Key
22、Detection Error/Overrun 00 (Code Set 2) Keyboard ID 83AB Bat Completion Code AA Bat Failure Core FC Echo EE Acknowledge FA Resend FE Key Detection Error/Overrun FF (Code Set 1) 00H or FFH Key Detection Error The HT82K629A sends a key detection error character if conditions in the keyboard make it im
23、possible to identify a switch closure. If the HT82K629A is using scan code set 1, the code is FFH. For sets 2, the code is 00H. 00H or FFH Overrun An overrun character is placed in the HT82K629A buffer and replaces the last code when the buffer capacity has been exceeded. The code is sent to the hos
24、t when it reaches the top of the buffer queue. If the HT82K629A is using scan code set 1, the code is FFH . For sets 2, the code is 00H. 83AbH Keyboard ID The keyboard ID consists of 2 bytes, Hex 83AbH. The HT82K629A responds to the Read ID with ACK, discon- tinues scanning and sends 2 ID bytes. The
25、 low byte is sent first followed by the high byte. Following the output of Keyboard ID, the HT82K629A begins scanning. EEH Echo The HT82K629A sends this code in response to an Echo command. AAH BAT Completion Code Following a satisfactory completion of the BAT, the HT82K629A sends AAH. Any other cod
26、e indicates key- board failure. FCH BAT Failure Code If a BAT failure occurs, the HT82K629A sends this code, discontinues scanning and waits for a host response or reset. FEH Resend The HT82K629A issues a Resend command following receipt of an invalid input or any input with incorrect par- ity. If t
27、he host sends nothing to the HT82K629A, no re- sponse is required. Data Communications Data output If CLK=0, no transmission (keyboard is inhibited). If CLK=1, DATA=0, no transmission (system re- quest to send). If CLK=1, DATA=1, transmission permitted. Data will be valid before the trailing edge an
28、d be- yond the leading edge of the clock. The KB checks the clock line for an active level ev- ery 60ms. If line contention occurs (system brings the clock low before the tenth clock), set clock=data=high. Data input The system overrides the clock line for at least 60ms. The keyboard checks the clock line state at inter- vals of 10ms.