Holtek Semiconductor Inc HT82K628A Datasheet

HT82K628A
Preliminary
Windows 2000 Keyboard Encoder

Features

Design for Windows 95/98/2000/NT
·
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 de signed for IBM PC/AT, IBM PS/2 and all com patible machines.
The HT82K628A accepts keyboard inputs and provides a 16-character first-in-first-out buffer in which data is stored.
101/102/104/109 keys or other special
·
application keyboard encoder 8 external hot keys
·
Supports Mini-keyboard and Internet/Mul
·
timedia keyboard WINDOWS is a registered trademark of
·
Microsoft corporation 40-pin DIP/DICE form package
·
An inexpensive RC oscillator can be used for
­the system clock. Simple implementation of
­this device is an advantage for high perfor mance and low cost keyboard applications.
-
-
1 July 20, 2000

Pin Assignment

Preliminary
HT82K628A
R5
R4
C3
C2
C1
C0
R3
R2
R1
R0
R19
R18
R17
R16
VSS
SCR OLL
NUM
DATA
CLOCK
Fn Select
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
R6
40
R7
39
C4
38
C5
37
C6
36
C7
35
NC
34
OSC1
33
VDD
32
RESET
31
CAPS
30
R8
29
R9
28
R10
27
R11
26
R12
25
R13
24
R14
23
R15
22
M a cro K ey select
21
H T 82K 628A
4 0 D IP

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
20 Fn Select I
21 Macro Key Select I
30 CAPS O Caps Lock indicator
R0~R19 O
¾
Keyboard matrix scanning output pins
Negative power supply, ground
Synchronous clock signal. Used to clock the transmis sion data.
Mini-keyboard select, enables the function if connected to VSS.
Macro Key select, disables the function if connected to VSS.
-
2 July 20, 2000
Preliminary
Pin No. Pin Name I/O Description
Chip reset input. Active low. Built-in power-on reset
31 RESET
32 VDD
33 OSC1 I
34 NC

Absolute Maximum Ratings

I
circuit to reset the entire chip. Chip can also be exter nally reset via RESET
5.0V positive power supply
¾
pin.
System clock input; 110kW resistor connected for RC OSC
No connection
¾
HT82K628A
-
Supply Voltage .............................-0.3V to 5.5V
Input Voltage ................V
3V to VDD+0.3V
SS-0.
Storage Temperature ................-50°Cto125°C
Operating Temperature .............-25°Cto70°C
Note: These are stress ratings only. Stresses exceeding the range specified under ²Absolute Maxi
mum 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 expo sure to extreme conditions may affect device reliability.

Electrical Characteristics

Symbol Parameter
V
I
V
V
I
I
I
DD
DD
IL
IH
OL
LED
Operating Voltage
Operating Current (RC OSC)
Input Low Voltage 5V
Input High Voltage 5V
Sink Current 5V
Source Current 5V
LED Sink Current (Scroll, Num, Caps)
Test Conditions
V
DD
Conditions
¾¾
5V
No load, f
SYS
= 2MHz
¾ ¾
V
= 0.5V
OL
V
= 4.5V
=3.2V
V
5V
OL
Min. Typ. Max. Unit
4 5 5.5 V
¾
3.5
25mA
0
¾ ¾
712
-2.5 -4.5 ¾
10 14 18 mA
Ta=25°C
1.5 V
5V
mA
¾
mA
Internal Pull-high
R
ph
Resistance
5V
¾
51220
kW
(C0~C7, R0~R19) Internal Pull-high
R
ph1
Resistance
5V
¾
2 4.7 8
kW
(DATA, CLOCK)
R
f
ph2
SYS
Internal Pull-high Resistance (RESET
)
5V
System Clock (RC OSC) 5V
¾
25 50 75
¾¾2¾
kW
MHz
-
-
3 July 20, 2000
Preliminary

Functional Description

Command from the host
The following table shows the commands that the host may send and their hexadecimal val ues.
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
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 except when performing the inter nal diagnostics or executing a Reset command.
FA
HT82K628A
byte (hex ED). The HT82K628A responds to the command byte with ACK, discontinues scan ning, 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.
The HT82K628A responds to the option byte with ACK, sets the indicators and if the HT82K628A was previously enabled, continues scanning. The status of the indicators will re flect 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 op tion byte, execution of the Set/Reset Mode Indi cators 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 re­main in the state they were in before the com­mand was received.
EEH - Echo
Echo is a diagnostic aid. When the HT82K628A receives this command, it issues a hex EE re sponse and if the HT82K628A was previously
­enabled, continues scanning.
-
-
-
-
-
-
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 deac tivates these indicators when it receives a valid command-code sequence from the system. The command sequence begins with the command
EFH and F1H - Invalid command
EFh and F1h are invalid commands and are not supported. If HT82K628A receives one of these and sends it, the HT82K628Awill not acknowl
­edge the command, but returns a Resend com
mand and continues in its previous scanning state.
4 July 20, 2000
-
-
Preliminary
HT82K628A
F0H - Select alternate scan codes
This command instructs the HT82K628A to se lect one of the three sets of scan codes. The HT82K628A acknowledges receipt of this com mand with ACK, clears both the output buffer and the typematic key. The host then sends the option byte and the keyboard responds with an other ACK. An option byte value of hex 01 se lects 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 before receiving the Select Alternate Scan Codes command.
F2H - Read ID
This command requests identification informa tion from the HT82K628A. The HT82K628A re
sponds with ACK, discontinues scanning and sends the two keyboard ID bytes hex 83h and Abh. After the output of the second ID byte, the HT82K628A resumes scanning.
F3H - Set typematic Rate/Delay
The host issues the Set Typematic Rate/Delay command to change the typematic rate and de­lay. The HT82K628A responds to the command with ACK, stops scanning and waits for the sys­tem to issue the rate/delay 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 previously 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.
F4H - Enable
Upon receipt of this command, the HT82K628A will respond with ACK, clears its output buffer, clears the last typematic key, and starts scan ning.
Typematic Rate ± 20%
Bit
Typematic Rate ± 20%
-
5 July 20, 2000
Preliminary
HT82K628A
F5H - Default disable
The Default Disable command resets all condi tions 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 the last typematic key. The HT82K628A then 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 oper ation only) and typematic rate/delay, and clears the last typematic key then continues 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
The HT82K628A will respond with ACK, clears its output buffer, sets all keys to the type indi­cated by this command,and continues scanning (if it was previously enabled). Although these commands can be sent using any code set, they affect only scan code set 3 operation.
Set All Keys-Typematic /Make/Break
FBH, FCH, FDH - Set key type
These commands instruct the HT82K628A to
­set individual 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 HT82K628A will respond with ACK, clears its output buffer and prepares to receive key identification. Key identification is accom plished 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 identification. The type of each identified key is set to the value indicated by the command. Although these commands can be sent using any code set, they affect only scan code set 3 op eration.
FEH - Resend
The host sends this command when it detects an error in any transmission from the HT82K628A. It is sent only after a data trans­mission 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).
-
-
6 July 20, 2000
Preliminary
HT82K628A
Commands to the host
The following table shows the commands that the HT82K628A may send to the host, and their hexadecimal 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 HT82K628A sends a key detection error 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. For sets 2 and 3, the code 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 us­ing scan code 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, discontinues scanning and sends 2 ID bytes. The low byte is sent first followed by the high byte. Following the output ofKeyboard 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 in dicates keyboard failure.
FCH - BAT failure code
If a BAT failure occurs, the HT82K628A sends this code, discontinues scanning and waits for a host response or reset.
FEH - Resend
The HT82K628A issues a Resend command fol lowing receipt of an invalid input or any input with incorrect parity. If the host sends nothing to the HT82K628A, no response is required.
Data communications
·
Data output
¨
If CLK=0, no transmission (keyboard is in hibited).
¨
If CLK=1, DATA=0, no transmission (sys­tem request to send).
¨
If CLK=1, DATA=1, transmission permit­ted.
¨
Data will be valid before the trailing edge and beyond 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.
-
-
-
7 July 20, 2000
Preliminary
HT82K628A
·
Data input
¨
The system overrides the clock line for at least 60ms.
¨
The keyboard checks the clock line state at intervals of 10ms
¨
If a system request-to-send is detected, the keyboard 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 on the "data" line. If the line is active it is forced 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 following the 10th bit, a frame error has occurred, and the keyboard contin ues to count until the "data" line becomes ac tive. The keyboard then makes the "data" line inactive and sends a Resend.
Data stream
Mode 1,2,3
B1:
start bit
always 0
B2:
b3: b4: b5: B6 b7: b8: b9:
b10:
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)
b11:
stop bit
always 1
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.
-
-
8 July 20, 2000
Loading...
+ 17 hidden pages