HOLTEK HT82K628A User Manual

Windows 2000 PS/2 Keyboard Encoder

Features

·
Design for Windows 95/98/NT/2000/XP
·
Supports WindowsTMkeys
·
Supports PC/AT and PS/2 code set 1, 2, 3
·
Supports Japanese , Korean , Brazilian and European
·
RC oscillator
·
Phantom key detection
·
Low power consumption

General Description

The HT82K628A is a keyboard encoder designed for IBM PC/AT, IBM PS/2 and all compatible machines.
The HT82K628A accepts keyboard inputs and provides a 16-character first-in-first-out buffer in which data is stored.

Pin Assignment

HT82K628A
·
101/102/104/105/107/109 keys or other special ap plication keyboard encoder
·
8 external hot keys
·
Supports Mini-keyboard and Internet/Multimedia keyboard
·
WINDOWS is a registered trademark of Microsoft corporation
·
40-pin DIP package
An inexpensiveRC oscillator can beused for the system clock. Simple implementation of this device is an advan tage for high performance and low cost keyboard appli cations.
-
-
-
R 5
R 4
C 3
C 2
C 1
C 0
R 3
R 2
R 1
R 0
R 1 9
R 1 8
R 1 7
R 1 6
V S S
S C R O L L
N U M
D A T A
C L O C K
F n S e l e c t
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
2 0
4 0
3 9
3 8
3 7
3 6
3 5
3 4
3 3
3 2
3 1
3 0
2 9
2 8
2 7
2 6
2 5
2 4
2 3
2 2
2 1
H T 8 2 K 6 2 8 A
4 0 D I P - A
R 6
R 7
C 4
C 5
C 6
C 7
N C
O S C 1
V D D
R E S E T
C A P S
R 8
R 9
R 1 0
R 1 1
R 1 2
R 1 3
R 1 4
R 1 5
M a c r o K e y s e l e c t
Rev. 1.60 1 April 16, 2004
HT82K628A

Pin Description

Pin No. Pin Name I/O Description
10~7, 2~1, 40~39, 29~22, 14~11
6~3, 38~35 C0~C7 I Keyboard matrix scanning input pins
15 VSS
16 SCROLL O Scroll Lock indicator
17 NUM O Num Lock indicator
18 DATA I/O Bidirectional data transmission line
19 CLOCK I/O Synchronous clock signal. Used to clock the transmission data.
20 Fn Select I Mini-keyboard select, enables the function if connected to VSS.
21 Macro Key Select I Macro Key select, disables the function if connected to VSS.
30 CAPS O Caps Lock indicator
31 RESET
32 VDD
33 OSC1 I
34 NC
R0~R19 O
Keyboard matrix scanning output pins
¾
Negative power supply, ground
Chip reset input. Active low. Built-in power-on reset circuit to reset the en
I
tire chip. Chip can also be externally reset via RESET
5.0V positive power supply
¾
pin.
System clock input; 58.3kW resistor connected for RC OSC
No connection
¾
-

Absolute Maximum Ratings

Supply Voltage ..........................VSS-0.3V to VSS+5.5V
Input Voltage .............................V
3V to VDD+0.3V
SS-0.
Note: These are stress ratings only. Stresses exceeding the range specified under ²Absolute Maximum Ratings² may
cause substantial damage to the device. Functional operation of this device at other conditions beyond those listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliabil­ity.

Electrical Characteristics

Symbol Parameter
V
I
V
V
I
I
I
I
R
R
R
f
DD
DD
IL
IH
OL
OH1
OH2
LED
ph
ph1
ph2
SYS
Operating Voltage
Operating Current (RC OSC) 5V
Input Low Voltage 5V
Input High Voltage 5V
Sink Current (C0~C7, R0~R19, DATA, CLOCK) 5V
Source Current (C0~C7, R0~R19) 5V
Source Current (Scroll, Num, Caps) 5V
LED Sink Current (Scroll, Num, Caps) 5V VOL=3.4V 10 18 24 mA
Internal Pull-high Resistance (C0~C7, R0~R19) 5V
Internal Pull-high Resistance (DATA, CLOCK) 5V
Internal Pull-high Resistance (RESET)5V
System Clock (RC OSC) 5V
Storage Temperature ...........................-50°Cto125°C
Operating Temperature ..........................-25°Cto70°C
Ta=25°C
Test Conditions
V
DD
Conditions
¾¾
No load, f
SYS
= 4MHz
¾ ¾
= 0.5V
V
OL
= 4.5V
V
OH
= 4.5V
V
OH
¾ ¾ ¾ ¾¾4¾
Min. Typ. Max. Unit
3 5 5.25 V
2.5 5 mA
¾
0
3.5
16 25
-8 -16 ¾
-2.5 -4 ¾
51220
2 4.7 8
25 50 75
¾ ¾
1.5 V
5V
mA
¾
mA
mA
kW kW kW
MHz
Rev. 1.60 2 April 16, 2004

Functional Description

Command from the Host
The following table shows the commands that the host may send and their hexadecimal values.
Command Hex Value
Set/Reset Status Indicators ED
Echo EE
Invalid Command EF
Select Alternate Scan Codes F0
Invalid Command F1
Read ID F2
Set Typematic Rate/Delay F3
Enable F4
Default Disable F5
Set Default F6
Set All Keys - Typematic F7
Set All Keys - Make/Break F8
Set All Keys - Make F9
Set All Keys - Typematic/Make/Break FA
Set Key Type - Typematic FB
Set Key Type - Make/Break FC
Set Key Type - Make FD
Resend FE
Reset FF
The commands may be sent to the HT82K628A at any time and the HT82K628A will respond within 25ms ex­cept whenperforming the internal diagnostics or execut ing a Reset command.
EDH - Set/Reset Status Indicators
Three status indicators on the keyboard-Num Lock, Caps Lock, and Scroll Lock-are accessible by the host. The HT82K628A activates or deactivates these indica tors when it receives a valid command-code sequence from the system. The command sequence begins with the command byte (hex ED). The HT82K628A responds to the command byte with ACK, discontinues scanning, assignments for this option byte are as follow:
Bit Indicator
0 Scroll Lock Indicator
1 Num Lock Indicator
2 Caps Lock Indicator
3~7 Reserved (Must be 0)
If a bit for an indicator is set to 1, the indicator is turned on. If a bit is set to 0, the indicator is turned off.
HT82K628A
The HT82K628A responds to the option byte with ACK, sets theindicators and if the HT82K628Awas previously enabled, continues scanning. The status of the indica tors will reflect the 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 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 HT82K628A re ceives this command, it issues a hex EE response and if the HT82K628A was previously enabled, continues scanning.
EFH and F1H - Invalid Command
EFh and F1h are invalid commands and are not sup ported. If HT82K628A receives one of these and sends it, the HT82K628A will not acknowledge the command, but returns a Resend command and continues in its pre­vious scanning state.
F0H - Select Alternate Scan Codes
This commandinstructs the HT82K628A to select one of the three sets of scan codes. The HT82K628A 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 responds with
­another ACK. An option byte value of hex 01 selects
scan code set 1, hex 02 selects set 2 and hex 03 selects code set3.
An option byte value of hex 00 causes the HT82K628A 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, the HT82K628A 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 HT82K628A. The HT82K628A responds with ACK, discontinues scanning and sends the two keyboard ID bytes hex83h and Abh. After the output of the second ID byte, the HT82K628A resumes scanning.
-
-
-
-
-
-
-
Rev. 1.60 3 April 16, 2004
HT82K628A
F3H - Set Typematic Rate/Delay
The host issues the Set Typematic Rate/Delay com mand to change the typematic rate and delay. The HT82K628A responds to the command with ACK, stops scanning and waits for the system to issue the rate/de lay value byte. The HT82K628A 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). Bit6 and 5 indicate the delay, and bits 4, 3, 2,1 and 0 indicate the rate. Bit7 is always 0. The delay is equal to 1 plus the binary value bit 6 and 5, multiplied by 250ms±20%.
The period (interval from one typematic output to the next) is determined by the following equation:
Period = (8+A)*(2^B)*0.00417 seconds.
Where:
A = binary value of bits 2, 1, and 0.
B = binary value of bits 4, and 3.
The typematic rate is 1 for each period and are listed as follows:
Bit
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.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 HT82K628A are as follows: Typematic rate= 10.9 characters per second ± 20% Delay = 500ms±20%
The execution of this command stops without change to the existing rate if another command is received instead of the rate/delay value byte.
Typematic
Rate ± 20%
Bit
Typematic
Rate ± 20%
F4H - Enable
Upon receipt of this command, the HT82K628A will re
­spond with ACK, clears its output buffer, clears the last
typematic key, and starts scanning.
-
F5H - Default Disable
The Default Disable command resets all conditions to the power on default states. The HT82K628A will re
­spond with ACK, clears its output buffer, sets the default key types (scan code set 3 operation only) and typematic rate/delay, and clears the last typematic key. The HT82K628Athen stops scanning and awaits further command.
F6H - Set Default
The Set Default command resets all conditions to the power on default states. The HT82K628A will respond with ACK, clears its output buffer, sets the default key types (scan code set 3 operation only) and typematic rate/delay, and clears thelast typematic key then contin ues scanning.
F7H, F8H, F9H, FAH - Set All Keys
These commands instruct the HT82K628A to set all keys to the type listed below:
Hex Value Command
F7 Set All Keys-Typematic
F8 Set All Keys-Make/Break
F9 Set All Keys-Make
FA Set All Keys-Typematic/Make/Break
The HT82K628Awill respond withACK, clears its output buffer, sets all keys to the type indicated by this com­mand, and continues scanning (if it was previously en­abled). Although these commands can be sent using any code set, they affect only scan codeset 3 operation.
FBH, FCH, FDH - Set Key Type
These commands instruct the HT82K628A to set indi vidual keys to the type listed below:
Hex Value Command
FB Set Key Type-Typematic
FC Set Key Type-Make/Break
FD Set Key Type-Make
The HT82K628Awill respond withACK, clears its output buffer and prepares to receive key identification. Key identification is accomplished by the host identifying each key by its scan code value as defined in scan code set 3. Only scan code set 3 values are valid for key iden tification. The type of each identified key is set to the value indicated by the command. Although these com mands can be sent using any code set, they affect only scan code set 3 operation.
-
-
-
-
-
-
Rev. 1.60 4 April 16, 2004
HT82K628A
FEH - Resend
The hostsends this command when it detects an error in any transmissionfrom the HT82K628A. Itis sent only af ter a data transmission and before the host allows the next data output. When a Resend is received, the HT82K628A sends the previous output again (unless the previous output was Resend, in which case the HT82K628A sends the last byte before the Resend command).
Commands to the Host
The following table shows the commands that the HT82K628A may send to the host, and their hexadeci
mal values.
Command Hex Value
Key Detection Error/Overrun 00 (Code Set 2 and 3)
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 HT82K628Asends a key detectionerror character if conditions in the keyboard make it impossible to identify a switch closure. If the HT82K628A is using scan code set 1, the code is FFH. Forsets 2 and 3, thecode is 00H.
00H or FFH - Overrun
An overrun character is placed in the HT82K628A buffer and replaces the last code when the buffer capacity has been exceeded. The code is sent to the host when it reaches the top of the buffer queue. If the HT82K628A is using scancode set 1, the code is FFH. For sets 2 and 3, the code is 00H.
83AbH - Keyboard ID
The keyboard ID consists of 2 bytes, Hex 83AbH. The HT82K628A responds to the Read ID with ACK, discon tinues scanning and sends 2 ID bytes. The low byte is sent first followed by the high byte. Following the output of Keyboard ID, the HT82K628A begins scanning.
EEH - Echo
The HT82K628A sends this code in response to an Echo command.
AAH - BAT Completion Code
Following satisfactory completion of the BAT, the HT82K628A sends AAH. Any other code indicates key
­board failure.
FCH - BAT Failure Code
If a BAT failure occurs, the HT82K628Asends this code, discontinues scanning and waits for a host response or reset.
FEH - Resend
The HT82K628A issues a Resend command following
­receipt of an invalid input or any input with incorrect par
ity. If the host sends nothing to the HT82K628A, 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 and be yond the leading edge of the clock.
¨
The KB checks the clock line for an active level of at least every 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
¨
If a system request-to-send is detected, the key­board counts 11 data bits.
¨
Data will be valid before the rising edge and beyond the falling edge
¨
After the 10th bit, the keyboard checks for an active level onthe ²data² line. If the line is active it isforced to be inactive, and counts one more bit.
Note: This action signals the system that the
keyboard has received its data. Upon
reception of this signal, the system returns
to the ready state, in which it can accept
-
keyboard outputs or goes to the inhibit state until it is ready.
If the keyboard ²data² line is found to be at an inactive level followingthe 10th bit, a frame errorhas occurred, and the keyboard continues to count until the ²data² line becomes active. The keyboard then makes the ²data² line inactive and sends a Resend.
-
-
-
-
-
Rev. 1.60 5 April 16, 2004
HT82K628A
Data Stream
Mode 1,2,3
B1:
B2: b3: b4: b5:
B6 b7: b8: b9:
b10:
b11:
Note:
The parity bit is either 1 or 0, and the 8 data bits, plus the parity bit, always have an odd number of 1ms.
Key Code Set 1
Key Number
and Symbol
1 ~ ' 29/A9 47 X 2D/AD
2 ! 1 02/82 48 C 2E/AE
3 @ 2 03/83 49 V 2F/AF
4 # 3 04/84 50 B 30/B0
5 $ 4 05/85 51 N 31/B1
6 % 5 06/86 52 M 32/B2
7 ^ 6 07/87 53 < , 33/B3
8 & 7 08/88 54 > . 34/B4
9 * 8 09/89 55 ? / 35/B5
10 ( 9 0A/8A 57 Shift (R) 36/B6
11 ) 0 0B/8B 58 Ctrl (L) 1D/9D
12 _ - 0C/8C 60 Alt (L) 38/B8
13 + = 0D/8D 61 Space 39/B9
14 56 7D/D6 FD 62 Alt (R) E0 38/E0 B8
15 Back Space 0E/8E 64 Ctrl (R) E0 1D/E0 9D
16 Tab 0F/8F 90 Num Lock 45/C5
17 Q 10/90 91 7 Home 47/C7
18 W 11/91 92 4
19 E 12/92 93 1 End 4F/CF
20 R 13/93 96 8
21 T 14/94 97 5 4C/CC
22 Y 15/95 98 2
23 U 16/96 99 0 Ins 52/D2
24 I 17/97 100 * 37/B7
25 O 18/98 101 9 PgUp 49/C9
26 P 19/99 102 6
27 { [ 1A/9A 103 3 PgDn 51/D1
28 } ] 1B/9B 104 . Del 53/D3
*29
½
\ 2B/AB 105 - 4A/CA
Make/Break Code
Key Number and Symbol
start bit
always 0 data bit 0 data bit 1 data bit 2 data bit 3 data bit 4 data bit 5 data bit 6 data bit 7
parity bit (odd par)
stop bit
always 1
Make/Break Code
¬
¯
®
4B/CB
48/C8
50/D0
4D/CD
Rev. 1.60 6 April 16, 2004
Loading...
+ 12 hidden pages