HOLTEK HT82K629A User Manual

Windows 2000 USB+PS/2 Keyboard Encoder

Features

·
Operating voltage: 4.4V~5.5V
·
Operating frequency: f
·
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 interface
·
USB 1.1 low speed function

General Description

The 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

Block Diagram

=6M
HT82K629A
·
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 package
is stored. For USB interface, it can support the USB
­standard request as well as HID class request version
1.1.
-
U S B D + / P S 2 C L K
U S B D - / P S 2 D A T A
V 3 3 O
O S C 1
O S C 2
V D D
V S S
U S B
T r a n s c e i v e r
U S B
R e c e i v e r
U S B
T r a n s m i t t e r
V o l t a g e
R e g u l a t o r
C l o c k
G e n e r a t o r
R C R e s e t
R e g i s t e r S e t
U S B S e r i a l
I n t e r f a c e E n g i n e ( S I E )
& C o n t r o l L o g i c
M a i n
S t a t e M a c h i n e
S u s p e n d
C o n t r o l
H o l t e k 8 - b i t
M i c r o c o n t r o l l e r
F I F O s
Rev. 1.40 1 September 15, 2004
HT82K629A

Pin Assignment

C 1 7
1
C 1 6
2
R 3
3
R 2
4
R 1
5
R 0
N U M
C A P S
C 1 2
C 1 3
C 1 4
C 1 5
V D D
V 3 3 O
C 0
C 1
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
F n _ S e l
S C R O L L
U S B D + / C L K
U S B D - / D A T A
H T 8 2 K 6 2 9 A
4 0 D I P - A

Pin Description

Pin No. Pin Name I/O Description
1, 2, 11~14 19~26, 31~34 39, 40
3~6, 35~38 R0~R7 I Keyboard matrix scanning input pins
7 Fn_Sel I Mini-keyboard select, the function is enabled if connected to
8 NUM O Num lock indicator
9 CAPS O Caps lock indicator
10 SCROLL O Scroll lock indicator
15 VDD
16 V33O
17 USBD+/CLK I/O
18 USBD-/DATA I/O
27 VSS
28 RESET
29 30
C0~C19 O
OSCO OSCI
Keyboard matrix scanning output pins
Positive power supply
¾
3.3V regulator output
¾
USBD- or PS2 CLK I/O line USB or PS2 function is controlled by software control register.
USBD- or PS2 DATA I/O line USB or PS2 function is controlled by software control register.
¾
Negative power supply, ground
I Schmitt trigger input. Active low.
OIOSCO, OSCI are connected to a 6MHz or 12MHz crystal/resonator for
the internal system clock.
C 1 8
4 0
C 1 9
3 9
R 4
3 8
R 5
3 7
R 6
3 6
R 7
3 5
C 1 1
3 4
C 1 0
3 3
C 9
3 2
C 8
3 1
O S C I
3 0
O S C O
2 9
R E S E T
2 8
V S S
2 7
C 7
2 6
C 6
2 5
C 5
2 4
C 4
2 3
C 3
2 2
C 2
2 1
VSS
.

Absolute Maximum Ratings

Supply Voltage ..........................VSS-0.3V to VSS+6.0V
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.
Rev. 1.40 2 September 15, 2004
Storage Temperature ...........................-50°Cto125°C
Operating Temperature ..............................0°Cto70°C
-
HT82K629A

D.C. Characteristics

Symbol Parameter
V
f
I
I
V
R
V
V
V
V
I
I
I
I
I
I
DD
SYS
SB
OP
V330
ph
IL1
IH1
IL2
IH2
OL1
OL2
OL3
OL4
OH1
OH2
Operating Voltage 5V
Operating Frequency 5V f
Standby Current 5V No load,systemHALT
Operating Current 5V
3.3V Regulator Output 5V
Internal Pull-high Resistance (C0~C19, R0~R7)
Input Low Voltage for I/O Ports 5V
Input HighVoltageforI/OPorts 5V
Input Low Voltage (RESET)5V
Input High Voltage (RESET)5V
Sink Current (Fn_sel) 5V
Sink Current (R0~R7) 5V
Sink Current (C0~C19, NUM, CAPS, SCROLL)
Sink Current (C0~C19, NUM, CAPS, SCROLL)
Source Current (Fn_sel) 5V
Source Current (C0~C19, R0~R7, NUM,CAPS, SCROLL)
Test Conditions
V
DD
SYS
No load, f
I
V33O
5V
V
OL
V
OL
V
5V
OL
V
5V
OL
V
OH
V
5V
OH
Ta=25°C
Conditions
¾
Min. Typ. Max. Unit
4.4
¾
5.5 V
=6MHz 5.9747 6 6.0258 MHz
500
mA
12 mA
kW
0.8 V
5V
0.4V
V
¾
¾
¾
¾
DD
DD
V
V
mA
mA
mA
mA
mA
mA
=-5mA
=0.4V
=0.4V
=0.4V
=3.4V
=3.4V
=3.4V
SYS
¾
¾
¾
¾
¾
=6MHz
¾¾
¾¾
3 3.3 3.6 V
25 50 75
0
2
0
0.9V
DD
¾
¾
¾
¾
10 25
510
24
12 17
-8 -16 ¾
-2 -5 ¾

A.C. Characteristics

Symbol Parameter
f
WDT
Built-in 32kHz RC OSC for Watchdog Timer
Test Conditions
V
DD
Conditions
Min. Typ. Max. Unit
¾¾¾32¾
Ta=25°C
kHz
Rev. 1.40 3 September 15, 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
Set All Keys - Make/Break
Set All Keys - Make
Set All Keys - Typematic/Make/Break
Set Key Type - Typematic
Set Key Type - Make/Break
Set Key Type - Make
Resend FE
Reset FF
The commands may be sent to the HT82K629A at any time and the HT82K629A 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 HT82K629A 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 HT82K629A 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.
F7
F8
F9
FA
FB
FC
FD
HT82K629A
The HT82K629A responds to the option byte with ACK, sets theindicatorsandif the HT82K629Awas 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 HT82K629A re ceives this command, it issues a hex EE response and if 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­vious scanning state.
F0H - Select Alternate Scan Codes
This commandinstructstheHT82K629Ato 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 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, the 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 discontinues scanning and sends the two keyboard ID bytes hex 83h and ABh. After the output of the second ID byte, the HT82K629A resumes scanning.
ACK
-
-
-
-
-
-
-
,
Rev. 1.40 4 September 15, 2004
HT82K629A
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 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 equal to 1 plus the binary value bit 6 and 5, mul tiplied 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 HT82K629A are as follows:
Typematic rate= 10.9 characters per second ± 20%
Delay = 500ms±20%
The execution of this command stops without changes to the existing rate if another command is received in stead of the rate/delay value byte.
Typematic
Rate ± 20%
Bit
Typematic
Rate ± 20%
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.
-
F5H - Default Disable
The Default Disable command resets all conditions to the power on default states. The HT82K629A will
­respond with fault typematic rate/delay, and clears the last typematic key. The HT82K629A then stops scanning and awaits
­further command.
F6H - Set 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 do 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 Resend command and continues in its previous scanning state.
FEH - Resend
The hostsendsthiscommand when it detects an error in any transmissionfrom 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 sends the previous output again (unless the previous output was Resent, in which case the HT82K629A sends the last byte before the Resend command).
-
, clears its output buffer, sets the de
ACK
-
-
-
-
Rev. 1.40 5 September 15, 2004
HT82K629A
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 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 HT82K629Asends a key detection error character if conditions in the keyboard make it impossible 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 host when it reaches the top of the buffer queue. If the HT82K629Ais using scan code set 1, the code is
. For sets 2, the
FFH
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 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 code 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 the 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 and 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.
¨
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 isactive it is forced to be inactive, and counts one more bits.
Note: This action signals the system that the
keyboard has received its data. Upon
reception of thissignal, 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 error has 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.
Data Stream
Mode 1,2,3
B1 B2 B3 B4 B5 B6
-
B7 B8 B9 B10 B11
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)
Note: The parity bit is either 1or 0, and the 8 data bits,
plus the parity bit, always have an odd number of 1ms.
-
-
-
-
-
-
-
Rev. 1.40 6 September 15, 2004
HT82K629A
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 Keycode14 (*J) 7D/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 Keycode29 (*4) 2B/AB 105 - 4A/CA
30 Caps Lock 3A/BA 106 + 4E/CE
31 A 1E/9E 107 Keycode107 (*B) 7E/FE
32 S 1F/9F 108 Enter_R E0 1C/E0 9C
33 D 20/A0 110 ESC 01/81
34 F 21/A1 112 F1 3B/BB
35 G 22/A2 113 F2 3C/BC
36 H 23/A3 114 F3 3D/BD
37 J 24/A4 115 F4 3E/BE
38 K 25/A5 116 F5 3F/BF
39 L 26/A6 117 F6 40/C0
40 : ; 27/A7 118 F7 41/C1
41
²¢
Make/Break Code
28/A8 119 F8 42/C2
Key Number
and Symbol
Make/Break Code
¬
¯
®
4D/CD
4B/CB
48/C8
50/D0
Rev. 1.40 7 September 15, 2004
Loading...
+ 16 hidden pages