ETC EC3648

PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„FEATURE
zLow cost - eliminate need external components.
zPhantom key detects.
zSupport scan code set 1 ,2 and 3.
zSupport PC AT and PS/2 keyboard .
zLow power CMOS device technology.
zInternal pull-up resistor.
zTri-state outputs for easy board application.
zBuilt-in 8-bit’s CPU.
z5K bytes of ROM.
z128 bytes of RAM.
zSupport WINDOWS TM 95, 98, 2000, ME, XP keys.
zNormal operation frequency is 4 MHz.
zBuilt-in RC type oscillator with external resister
zOn chip general 8 bit preload timer
„DESCRIPTION
The EC3648 is a single chip CMOS micro-controller for keyboard application,
specially for IBM PC AT and all compatible machines. It incorporate a 8-bit’s CPU
core, 5K bytes of ROM, and 128 bytes of RAM used as working RAM and stack area.
The EC3648 control all scan codes, scan timing and communications between the
keyboard and PC. It is easy to implement a high performance, low cost keyboard with
the minimal external components.
„APPLICATION
• IBM PC AT or compatible machine keyboard.
• IBM PS/2 model 30,50,60,80 or compatible machine keyboard.
• Japanese keyboard.
• Korean keyboard.
• Brazilian keyboard.
• European keyboard.
Rev 01
Page 1 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
PC1
6
PA1
7
PC3
RIN
VDD
1
41
40
39
38
Scroll
TMODE
2
GND
3
ROUT
4
37
36
CAPS
35
NUM
34
PD7
33
PD0
32
PD1
31
PD2
30
PD6
29
PD4
28
PD3
27
PD5
8
PB6
14
PB5
15
16
17
18
19
20
21
22
23
24
25
26
PB1
13
PC2
PA4
PB7
12
PA0
PA3
PB2
11
PA5
PA2
C O B -0 2 0 9 -1 E
PA6
10
PA7
N/C
PB0
9
PB3
N/C
PB4
N/C
DATA
5
CLK
PC0
„PIN ASSIGNMENT
Rev 01
Page 2 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„PIN DESCRIPTION
Pin Name
Pad No.
FUNCTION
I/O
KEYBOARD MATRIX DRIVE AND SENSE INTERFACE
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB7
PC0
PC1
PC2
PC3
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
23
7
11
12
13
21
20
19
18
26
22
17
16
15
14
24
5
6
25
40
33
32
31
28
29
27
30
34
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
I
I
I
I
I
I
I
I
Column 1 Low output scan line
Column 2 Low output scan line
Column 3 Low output scan line
Column 4 Low output scan line
Column 5 Low output scan line
Column 6 Low output scan line
Column 7 Low output scan line
Column 8 Low output scan line
Column 9 Low output scan line
Column 10 Low output scan line
Column 11 Low output scan line
Column 12 Low output scan line
Column 13 Low output scan line
Column 14 Low output scan line
Column 15 Low output scan line
Column 16 Low output scan line
Column 17 Low output scan line
Column 18 Low output scan line
Column 19 Low output scan line
Reserved for Column 20 Low output scan line
Row 0 Input scan line, internal pull high (18K)
Row 1 Input scan line, internal pull high (18K)
Row 2 Input scan line, internal pull high (18K)
Row 3 Input scan line, internal pull high (18K)
Row 4 Input scan line, internal pull high (18K)
Row 5 Input scan line, internal pull high (18K)
Row 6 Input scan line, internal pull high (18K)
Row 7 Input scan line, internal pull high (18K)
KEYBOARD PS2 INTERFACE (2 PINS)
CLK
4
I/O
DATA
3
I/O
CLOCK line for IBM communication, internal pull
high (5K)
DATA line for IBM communication, internal pull high
(5K)
KEYBOARD LED INTERFACE( 3 PINS )
SCROLL
NUM
CAPS
37
35
36
O
O
O
Scroll Lock Indicator
NUM Lock Indicator
Caps Lock Indicator
SYSTEM CLOCK AND POWER SUPPLY( 4 PINS )
VDD
VSS
Rout
Rin
38
1
2
39
I
I
O
I
+5V Power Supply
Ground
CLOCK output
Connect 47K OHM resistor for 4 MHz oscillation
Rev 01
Page 3 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„FUNCTION DESCRIPTION
Command from the system
The system can send commands to the controller at any time. The controller needs to respond
within 20 milliseconds, unless the system prevents controller output, when doing self test or
executing a RESET. The following are the controller input commands and he actions that controller
needs to take.
Set/Reset Status indicators (Hex ED)
-
Responds ACK.
Receives option byte.
Responds ACK.
Updates status indicators.
Return to previous scanning state.
Echo (Hex EE)
-
Responds with EE hex.
Returns to previous scanning state.
Invalid commands (Hex EF and F1)
-
Responds with EE hex.
Returns to previous scanning state.
Select Alternate Scan Code (Hex F0)
-
Responds ACK.
Clears output buffer.
Sets the default typematic rate/delay.
Clears last typematic key.
Receives options key.
Responds ACK.
Option byte =
01: selects scan code set 1
02: selects scan code set 2
03: selects scan code set 3
- Returns to previous scanning state.
Read ID (Hex F2)
-
Responds with ACK.
Discontinues scanning.
Sends two ID Bytes. The second byte will be sent within 500 μS after first byte.
Resumes scanning.
Set Typematic Rate/Delay (Hex F3)
- Responds ACK.
- Receives rate/delay value byte.
- Responds ACK.
- Set rate/delay (* Note1)
- Returns to previous scanning state.
*Note 1
1. Repeat period = (8+A) x (2B) x 0.00417 seconds
A: binary value of bits 2, 1, and 0.
B: binary value of bits 4 and 3.
2. Delay = (C+1) x 250 milliseconds
Rev 01
Page 4 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
C: binary value of bits 6 and 5. Bit 7 is always 0.
Bit 4 ~ bit 0
00000
00001
00010
00011
00100
00101
00110
00111
01000
01001
01010
01011
01100
01101
01110
01111
Typematic rate ± 20%
30.0
26.7
24.0
21.8
20.0
18.5
17.1
16.0
15.0
13.3
12.0
10.9
10.0
9.2
8.6
8.0
bit 4 ~ bit 0
10000
10001
10010
10011
10100
10101
10110
10111
11000
11001
11010
11011
11100
11101
11110
11111
3. default rate = 10.9 chars/sec ± 20%
Default delay = 500 mS ± 20%
Typematic rate ± 20%
7.5
6.7
6.0
5.5
5.0
4.6
4.3
4.0
3.7
3.3
3.0
2.7
2.5
2.3
2.1
2.0
Enable (Hex F4)
-
Responds with ACK.
Clears output buffer.
Clears last typematic key.
Start scanning.
Default Disable ( Hex F5)
-
Responds with ACK.
Reset all conditions to power-on state.
Clears output buffer.
Sets the default key type( scan code set 3 only)
Set the default typematic rate/delay.
Clears last typematic key.
Stops scanning.
Set Default (Hex F6)
-
Responds with ACK.
Resets all conditions to power-on state.
Clears output buffer.
Sets the default key type (scan code set 3 only)
Set the default typematic rate/delay.
Clears last typematic key.
Continues scanning.
Set All Keys (Hex F7, F8, F9, FA)
-
-
Responds ACK.
Clear output buffer.
Set all key type (affect only code set 3 operation).
F7 : Typematic
F8 : Make/Break
F9 : Make
FA : Typematic/Make/Break
Returns to previous scanning rate.
Rev 01
Page 5 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
Set Key Type ( Hex FB,FC,FD )
-
-
Responds ACK.
Clears output buffer.
Receives key ID byte
Responds ACK.
Sets key ID type (affect only scan code set 3 operation).
FB : Typematic
FC : Make/Break
FD : Make
Returns to previous scanning rate.
Resend ( Hex FE )
- Sends the previous output again. If the previous byte is RESEND, the last byte before RESEND
shall be sent.
Reset ( Hex FF )
- Responds ACK.
- Checks clock and data lines in the high state for at least 500 microseconds or receives another
command.
- Default to scan code set 2 .
Command to the system
The following are the keyboard output commands.
Acknowledge ( Hex FA )
The keyboard sends an acknowledge in response to any valid command from the system except for
RESEND and ECHO.
BAT Completion Code ( Hex AA )
This command is issued after successful completion of keyboard self test.
BAT Failure Code ( Hex FC )
If a BAT failure occurs, the keyboard sends this code , discontinues scanning, and waits for a
system response or reset.
Echo ( Hex EE )
The keyboard sends this code in response to an ECHO command.
Keyboards ID ( Hex 83AB )
The 2 byte ID is issued to respond to READ ID command. The low byte is sent first, followed
by the high byte.
Rev 01
Page 6 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
Keyboard buffer Overrun ( Hex 00 or FF )
If keyboard buffer overflows, the overrun code will replace the last byte in the buffer. If the
keyboard is using scan code set 1 , the code is hex FF. For sets 2 and 3, the code is hex 00.
Resend ( Hex FE )
When the keyboard receives an invalid input or any input with incorrect parity, the RESEND
command is sent.
„FUNCTION DESCRIPTION
Keyboard Scan Code Table
The keyboard contains 3 scan code sets. The system defaults to scan set 2. It’s can be
switched to set 1 or set 3 . The following tables show the key and three scan code sets in
hexadecimal values. All the keys are typematics except for the pause key. When a controller
receive the make key frame from RF receiver, the make scan code is sent to the system.
When receive the break key frame, its break code is sent. If receives two or more keys frame,
only the last key pressed repeats at the typematic rate. Typematic operation stops when
receives the break frame, even if other keys are being released or some other keys are still
held down.
Rev 01
Page 7 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
The following table shows three scan code sets used in the keyboard.
scan code set 1
Key Number
And
Symbol
Make/Break code
1
~
`
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*29
30
31
32
33
34
35
36
37
38
39
!
@
#
$
%
^
&
*
(
)
_
+
1
2
3
4
5
6
7
8
9
0
=
Back Space
Tab
Q
W
E
R
T
Y
U
I
O
P
{
[
}
]
|
\
Caps Lock
A
S
D
F
G
H
J
K
L
29/A9
02/82
03/83
04/84
05/85
06/86
07/87
08/88
09/89
0A/8A
0B/8B
0C/8C
0D/8D
56 7D/D6 FD
0E/8E
0F/8F
10/90
11/91
12/92
13/93
14/94
15/95
16/96
17/97
18/98
19/99
1A/9A
1B/9B
2B/AB
3A/BA
1E/9E
1F/9F
20/A0
21/A1
22/A2
23/A3
24/A4
25/A5
26/A6
Key Number
and
Symbol
47
X
48
C
49
V
50
B
51
N
52
M
53 <
,
54 >
.
55
?
/
57
Shift(R)
58
Ctrl(L)
60
Alt(L)
61
Space
62
Alt(R)
64
Ctrl(R)
90
Num Lock
91
7
Home
92
4
←
93
1
End
96
8
↑
97
5
98
2
↓
99
0
Ins
100
*
101
9
PgUp
102
6
→
103
3
PgDn
104
.
Del
105
106
+
107
108
Enter
110
ESC
112
F1
113
F2
114
F3
115
F4
116
F5
117
F6
Make/Break code
2D/AD
2E/AE
2F/AF
30/B0
31/B1
32/B2
33/B3
34/B4
35/B5
36/B6
1D/9D
38/B8
39/B9
E0 38/E0 B8
E0 1D/E0 9D
45/C5
47/C7
4B/CB
4F/CF
48/C8
4C/CC
50/D0
52/D2
37/B7
49/C9
4D/CD
51/D1
53/D3
4A/CA
4E/CE
7E/FE
E0 1C/E0 9C
01/81
3B/BB
3C/BC
3D/BD
3E/BE
3F/BF
40/C0
Rev 01
Page 8 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
40
:
;
41
“
‘
**42
|
\
43
Enter
44
Shift(L)
**45
Macro
46
Z
*101-Key Keyboard Only
**102-Key Keyboard Only
Key Number
And
Symbol
75
Insert
Base case
Shift+Num
E0 52
/E0 D2
76 Delete
E0 53
/E0 D3
79
E0 4B
←
/E0 CB
80
Home
E0 47
/E0 C7
81
End
E0 4F
/E0 CF
83
E0 48
↑
/E0 C8
84
E0 50
↓
/E0 D0
85
PgUp
E0 49
/E0 C9
86
PgDn
E0 51
/E0 D1
89
E0 4D
→
/E0 CD
59 L-WIN
E0 5B
/E0 DB
63 R-WIN
E0 5C
/E0 DC
127
APP
E0 5D
/E0 DD
When both shift keys are held
down Key number :
75
27/A7
28/A8
2B/AB
1C/9C
2A/AA
56/D6
2C/AC
118
119
120
121
122
123
125
Left-Shift
F7
F8
F9
F10
F11
F12
Scroll Lock
Right-Shift
E0 AA E0 52
E0 B6 E0 52
/E0 D2 E0 2A
/E0 D2 E0 36
E0 AA E0 53
E0 B6 E0 53
/E0 D3 E0 2A
/E0 D3 E0 36
E0 AA E0 4B
E0 B6 E0 4B
/E0 CB E0 2A
/E0 CB E0 36
E0 AA E0 47
E0 B6 E0 47
/E0 C7 E0 2A
/E0 C7 E0 36
E0 AA E0 4F
E0 B6 E0 4F
/E0 CF E0 2A
/E0 CF E0 36
E0 AA E0 48
E0 B6 E0 48
/E0 C8 E0 2A
/E0 C8 E0 36
E0 AA E0 50
E0 B6 E0 50
/E0 D0 E0 2A
/E0 D0 E0 36
E0 AA E0 49
E0 B6 E0 49
/E0 C9 E0 2A
/E0 C9 E0 36
E0 AA E0 51
E0 B6 E0 51
/E0 D1 E0 2A
/E0 D1 E0 36
E0 AA E0 4D
E0 B6 E0 4D
/E0 CD E0 2A
/E0 CD E0 36
E0 AA E0 5B
E0 B6 E0 5B
/E0 DB E0 2A
/E0 DB E0 36
E0 AA E0 5C
E0 B6 E0 5C
/E0 DC E0 2A
/E0 DC E0 36
E0 AA E0 5D
E0 B6 E0 5D
/E0 DD E0 2A
/E0 DD E0 36
Both Shift
E0 AA E0 B6 E0 52
/E0 D2 E0 2A E0 36
41/C1
42/C2
43/C3
44/C4
57/D7
58/D8
46/C6
Num Lock
E0 2A E0 52
/E0 D2 E0 AA
E0 2A E0 53
/E0 D3 E0 AA
E0 2A E0 4B
/E0 CB E0 AA
E0 2A E0 47
/E0 C7 E0 AA
E0 2A E0 4F
/E0 CF E0 AA
E0 2A E0 48
/E0 C8 E0 AA
E0 2A E0 50
/E0 D0 E0 AA
E0 2A E0 49
/E0 C9 E0 AA
E0 2A E0 51
/E0 D1 E0 AA
E0 2A E0 4D
/E0 CD E0 AA
E0 2A E0 5B
/E0 DB E0 AA
E0 2A E0 5C
/E0 DC E0 AA
E0 2A E0 5D
/E0 DD E0 AA
Rev 01
Page 9 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
Key Number
And Symbol
95
/
Base
E0 35
/E0 B5
When both shift keys are held down
Key number:
95
Key Number
And Symbol
124
Print Screen
Right-Shift
E0 B6 E0 35
/E0 B5 E0 36
Both Shift
E0 AA E0 B6 E0 35
/E0 B5 E0 2A E0 36
Base
E0 2A E0 37
/E0 B7 E0 AA
Key Number
And Symbol
126
Left-Shift
E0 AA E0 35
/E0 B5 E0 2A
Shift/Ctrl
E0 37
/E0 B7
Base
Alt
54
/D4
Ctrl
Pause
E1 1D 45 E1 9D C5
E0 46 E0 C6
This key is not typematic,all associated scan codes occur on the make code.
Key Number
Make/Break code
And
Default
Function
ACPI
ACPI
ACPI
Power
Sleep
Wake up
E0 5E/E0 DE
E0 5F/E0 DF
E0 63/E0 E3
Make/Break
Make/Break
Make/Break
Make/Break code
Default
Korea KOR0
Korea KOR1
Brazil BA0
F1/F0/73/F3
MAKE
MAKE
TYPEMATIC
Brazil BA1
7E/FE
TYPEMATIC
Key Number
Rev 01
Page 10 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
scan code set 2
Key Number
And Symbol
1
~
Make/Break code
`
2
!
1
3
@
2
4
#
3
5
$
4
6
%
5
7
^
6
8
&
7
9
*
8
10
(
9
11
)
0
12
_
13
+
=
14
15 Back Space
16
Tab
17
Q
18
W
19
E
20
R
21
T
22
Y
23
U
24
I
25
O
26
P
27
{
[
28
}
]
*29
|
\
30
Caps Lock
31
A
32
S
33
D
34
F
35
G
36
H
37
J
38
K
39
L
40
:
;
41
“
‘
**42
|
\
0E/F0 0E
16/F0 16
1E/F0 1E
26/F0 26
25/F0 25
2E/F0 2E
36/F0 36
3D/F0 3D
3E/F0 3E
46/F0 46
45/F0 45
4E/F0 4E
55/F0 55
6A/F0 6A
66/F0 66
0D/F0 0D
15/F0 15
1D/F0 1D
24/F0 24
2D/F0 2D
2C/F0 2C
35/F0 35
3C/F0 3C
43/F0 43
44/F0 44
4D/F0 4D
54/F0 54
5B/F0 5B
5D/F0 5D
58/F0 58
1C/F0 1C
1B/F0 1B
23/F0 23
2B/F0 2B
34/F0 34
33/F0 33
3B/F0 3B
42/F0 42
4B/F0 4B
4C/F0 4C
52/F0 52
5D/F0 5D
Key Number
and Symbol
47
48
49
50
51
52
53
54
55
57
58
60
61
62
64
90
91
92
93
96
97
98
99
100
101
102
103
104
105
106
107
108
110
112
113
114
115
116
117
118
119
120
X
C
V
B
N
M
<
>
?
,
.
/
Shift(R)
Ctrl(L)
Alt(L)
Space
Alt(R)
Ctrl(R)
Num Lock
7
Home
4
←
1
End
8
↑
5
2
↓
0
Ins
*
9
PgUp
6
→
3
PgDn
.
Del
+
Enter
ESC
F1
F2
F3
F4
F5
F6
F7
F8
F9
Make/Break code
22/F0 22
21/F0 21
2A/F0 2A
32/F0 32
31/F0 31
3A/F0 3A
41/F0 41
49/F0 49
4A/F0 4A
59/F0 59
14/F0 14
11/F0 11
29/F0 29
E0 11/E0 F0 11
E0 14/E0 F0 14
77/F0 77
6C/F0 6C
6B/F0 6B
69/F0 69
75/F0 75
73/F0 73
72/F0 72
70/F0 70
7C/F0 7C
7D/F0 7D
74/F0 74
7A/F0 7A
71/F0 71
7B/F0 7B
79/F0 79
6D/F0 6D
E0 5A/E0 F0 5A
76/F0 76
05/F0 05
06/F0 06
04/F0 04
0C/F0 0C
03/F0 03
0B/F0 0B
83/F0 83
0A/F0 0A
01/F0 01
Rev 01
Page 11 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
43
Enter
5A/F0 5A
44
Shift(L)
12/F0 12
**45
Macro
61/F0 61
46
Z
1A/F0 1A
*101-Key Keyboard Only
**102-Key Keyboard Only
121
122
123
125
F10
F11
F12
Scroll Lock
09/F0 09
78/F0 78
07/F0 07
7E/F0 7E
Key Number
And
Symbol
75
Insert
Base case
Shift+Num
E0 70
/E0 F0 70
E0 F0 12 E0 70 E0 F0 59 E0 70
/E0 F0 70 E0 12 /E0 F0 70 E0 59
E0 12 E0 70
/E0 F0 70 E0 F0 12
76
Delete
79
←
Home
E0 F0 12 E0 71
/E0 F0 71 E0 12
E0 F0 12 E0 6B
/E0 F0 6B E0 12
E0 F0 12 E0 6C
/E0 F0 6C E0 12
E0 F0 12 E0 69
/E0 F0 69 E0 12
E0 F0 12 E0 75
/E0 F0 75 E0 12
E0 F0 12 E0 72
/E0 F0 72 E0 12
E0 F0 12 E0 7D
E0 F0 59 E0 71
/E0 F0 71 E0 59
E0 F0 59 E0 6B
/E0 F0 6B E0 59
E0 F0 59 E0 6C
/E0 F0 6C E0 59
E0 F0 59 E0 69
/E0 F0 69 E0 59
E0 F0 59 E0 75
/E0 F0 75 E0 59
E0 F0 59 E0 72
/E0 F0 72 E0 59
E0 F0 59 E0 7D
E0 12 E0 71
/E0 F0 71 E0 F0 12
E0 12 E0 6B
80
E0 71
/E0 F0 71
E0 6B
/E0 F0 6B
E0 6C
/E0 F0 6C
E0 69
/E0 F0 69
E0 75
/E0 F0 75
E0 72
/E0 F0 72
E0 7D
/E0 F0 7D
E0 7A
/E0 F0 7A
E0 74
/E0 F0 74
E0 1F
/E0 F0 1F
E0 27
/E0 F0 27
E0 2F
/E0 F0 2F
E0 12 E0 69
/E0 F0 69 E0 F0 12
E0 12 E0 75
/E0 F0 75 E0 F0 12
E0 12 E0 72
/E0 F0 72 E0 F0 12
E0 12 E0 7D
/E0 F0 7D E0 12
/E0 F0 7D E0 59
/E0 F0 7D E0 F0 12
E0 F0 12 E0 7A
E0 F0 59 E0 7A
E0 12 E0 7A
/E0 F0 7A E0 12
/E0 F0 7A E0 59
/E0 F0 7A E0 F0 12
E0 F0 12 E0 74 E0 F0 59 E0 74
/E0 F0 74 E0 12 /E0 F0 74 E0 59
E0 F0 12 E0 1F E0 F0 59 E0 1F
/E0 F0 1F E0 12 /E0 F0 1F E0 59
E0 F0 12 E0 27 E0 F0 59 E0 27
/E0 F0 27 E0 12 /E0 F0 27 E0 59
E0 F0 12 E0 2F E0 F0 59 E0 2F
/E0 F0 2F E0 12 /E0 F0 2F E0 59
Both Shift
E0 F0 12 E0 F0 59 E0 70
/E0 F0 70 E0 12 E0 59
E0 12 E0 74
/E0 F0 74 E0 F0 12
E0 12 E0 1F
/E0 F0 1F E0 F0 12
E0 12 E0 27
/E0 F0 27 E0 F0 12
E0 12 E0 2F
/E0 F0 2F E0 F0 12
81
End
83
↑
84
↓
85
PgUp
86
PgDn
89
→
59
L-WIN
63
R-WIN
127
APP
When both shift keys are
held down
key number :75
Left-Shift
Right-Shift
Num Lock
/E0 F0 6B E0 F012
E0 12 E0 6C
/E0 F0 6C E0 F0 12
Rev 01
Page 12 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
Key Number And
Symbol
95
/
Base
Left-Shift
E0 4A
/E0 F0 4A
When both shift keys are held down
Key number:
95
Key Number
And Symbol
124
Print Screen
Right-Shift
E0 F0 12 E0 4A
E0 F0 59 E0 4A
/E0 F0 4A E0 12
/E0 F0 4A E0 59
Both Shift
E0 F0 12 E0 F0 59 E0 4A
/E0 F0 4A E0 12 E0 59
Base
E0 12 E0 7C
/E0 F0 7C E0 F0 12
Shift/Ctrl
E0 7C
/E0 F0 7C
Alt
84
/F0 84
Key Number
And Symbol
Base
Ctrl
126
Pause
E1 14 77 E1 F0 14 F0 77
E0 7E E0 F0 7E
This key is not typematic , all associated scan codes occur on the make code.
Key Number
Make/Break code
Default
And Function
ACPI
ACPI
ACPI
Power
Sleep
Wake up
E0 37/E0 F0 37
E0 3F/E0 F0 3F
E0 5E/E0 F0 5E
Make/Break code
Make/Break
Make/Break
Make/Break
Default
Key Number
Korea KOR0
Korea KOR1
Brazil BA0
Brazil BA1
F1/F2/51/F0 51
6D/F0 6D
MAKE
MAKE
TYPEMATIC
TYPEMATIC
Rev 01
Page 13 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
scan code set 3
Key
Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*29
30
31
32
33
34
35
36
37
38
39
40
41
**42
43
Make
/Break code
0E/F0 0E
16/F0 16
1E/F0 1E
26/F0 26
25/F0 25
2E/F0 2E
36/F0 36
3D/F0 3D
3E/F0 3E
46/F0 46
45/F0 45
4E/F0 4E
55/F0 55
5D/F0 5D
66/F0 66
0D/F0 0D
15/F0 15
1D/F0 1D
24/F0 24
2D/F0 2D
2C/F0 2C
35/F0 35
3C/F0 3C
43/F0 43
44/F0 44
4D/F0 4D
54/F0 54
5B/F0 5B
5C/F0 5C
14/F0 14
1C/F0 1C
1B/F0 1B
23/F0 23
2B/F0 2B
34/F0 34
33/F0 33
3B/F0 3B
42/F0 42
4B/F0 4B
4C/F0 4C
52/F0 52
53/F0 53
5A/F0 5A
Default
Key State
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Make/Break
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Key
Number
55
57
58
59
60
61
62
63
64
75
76
79
80
81
83
84
85
86
89
90
91
92
93
95
96
97
98
99
100
101
102
103
104
105
106
107
108
110
112
113
114
115
116
Make
/Break code
4A/F0 4A
59/F0 59
11/F0 11
8B/F0 8B
19/F0 19
29/F0 29
39/F0 39
8C/F0 8C
58/F0 58
67/F0 67
64/F0 64
61/F0 61
6E/F0 6E
65/F0 65
63/F0 63
60/F0 60
6F/F0 6F
6D/F0 6D
6A/F0 6A
76/F0 76
6C/F0 6C
6B/F0 6B
69/F0 69
77/F0 77
75/F0 75
73/F0 73
72/F0 72
70/F0 70
7E/F0 7E
7D/F0 7D
74/F0 74
7A/F0 7A
71/F0 71
84/F0 84
7C/F0 7C
7B/F0 7B
79/F0 79
08/F0 08
07/F0 07
0F/F0 0F
17/F0 17
1F/F0 1F
27/F0 27
Default
Key State
Typematic
Make/Break
Make/Break
Make/Break
Make/Break
Typematic
Make Only
Make/Break
Make Only
Make Only
Typematic
Typematic
Make Only
Make Only
Typematic
Typematic
Make Only
Make Only
Typematic
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Typematic
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Rev 01
Page 14 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
44
12/F0 12
**45
13/F0 13
46
1A/F0 1A
47
22/F0 22
48
21/F0 21
49
2A/F0 2A
50
32/F0 32
51
31/F0 31
52
3A/F0 3A
53
41/F0 41
54
49/F0 49
*101-Key Keyboard Only
**102-Key Keyboard Only
Make/Break
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
Typematic
117
118
119
120
121
122
123
124
125
126
127
Make/Break code
2F/F0 2F
37/F0 37
3F/F0 3F
47/F0 47
4F/F0 4F
56/F0 56
5E/F0 5E
57/F0 57
5F/F0 5F
62/F0 62
8D/F0 8D
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make Only
Make/Break
Default
Key Number
Korea KOR0
Korea KOR1
Brazil BA0
F1/F2/51/F0 51
MAKE
MAKE
TYPEMATIC
Brazil BA1
7B/F0 7B
TYPEMATIC
KEY CODE
Key mark and
Key no
Code Set 2
Code Set 3
Make/Break
Make/Break
DEFAULT
Code Set 1
Make/Break
Japannese J14
56 7D/D6 FD
6A/F0 6A
5D/F0 5D
TYPEMATIC
Japannese J56
73/F3
51/F0 51
51/F0 51
TYPEMATIC
Japannese J131
7B/FB
67/F0 67
85/F0 85
MAKE
Japannese J132
79/F9
64/F0 64
86/F0 86
MAKE
Japannese J133
70/F0
13/F0 13
87/F0 87
MAKE
Rev 01
Page 15 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
WIN 2K MEDIA CODES
Item
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Extra Key Function Set1
Name
MAKE
BACK
FORWARD
STOP
REFRESH
SEARCH
FAVORITES
HOME
MAIL
MUTE
VOLUMEVOLUME+
PREVIOUS
STOP
PLAY
NEXT
MEDIA
CALCULATOR
MY COMPUTOR
E0 6A
E0 69
E0 68
E0 67
E0 65
E0 66
E0 32
E0 6C
E0 20
E0 2E
E0 30
E0 10
E0 24
E0 22
E0 19
E0 6D
E0 21
E0 6B
Set 2,3
BREAK
E0 EA
E0 E9
E0 E8
E0 E7
E0 E5
E0 E6
E0 B2
E0 EC
E0 A0
E0 AE
E0 B0
E0 90
E0 A4
E0 A2
E0 99
E0 ED
E0 A1
E0 EB
MAKE
E0 38
E0 30
E0 28
E0 20
E0 10
E0 18
E0 3A
E0 48
E0 23
E0 21
E0 32
E0 15
E0 3B
E0 34
E0 4D
E0 50
E0 2B
E0 40
BREAK
E0 F0 38
E0 F0 30
E0 F0 28
E0 F0 20
E0 F0 10
E0 F0 18
E0 F0 3A
E0 F0 48
E0 F0 23
E0 F0 21
E0 F0 32
E0 F0 15
E0 F0 3B
E0 F0 34
E0 F0 4D
E0 F0 50
E0 F0 2B
E0 F0 40
New key codes for scan set 1
New Key
WIN_L
WIN_R
APP
N-CHG (131)
CHG (132)
ROMA (133)
K14
K56
K107
KL
KR
POWER
SLEEP
WAKE UP
Make
E0 5B
E0 5C
E0 5D
7B
79
70
7D
73
7E
F1
F0
E0 5E
E0 5F
E0 63
Break
E0 DB
E0 DC
E0 DD
FB
F9
F0
FD
F3
FE
X
X
E0 DE
E0 DF
E0 E3
Rev 01
Page 16 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
New key codes for scan set 2
New Key
WIN_L
WIN_R
APP
N-CHG (131)
CHG (132)
ROMA (133)
K14
K56
K107
KL
KR
POWER
SLEEP
WAKE UP
Make
E0 1F
E0 27
E0 2F
67
64
13
6A
51
6D
F1
F2
E0 37
E0 3F
E0 5E
Break
E0 F0 1F
E0 F0 27
E0 F0 2F
E0 67
E0 64
E0 13
E0 6A
E0 51
E0 6D
X
X
E0 F0 37
E0 F0 3F
E0 F0 5E
New Key codes for scan set 3
New Key
WIN_L
WIN_R
APP
N-CHG (131)
CHG (132)
ROMA (133)
K14
K56
K107
KL
KR
POWER
SLEEP
WAKE UP
Make
Break
F0 8B
F0 8C
F0 8D
F0 85
F0 86
F0 87
F0 5D
F0 51
F0 7B
X
X
X
X
X
8B
8C
8D
85
86
87
5D
51
7B
F1
F2
X
X
X
Key Type
Make/break
Make/break
Make/break
Make
Make
Make
Typematic
Typematic
Typematic
Rev 01
Page 17 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„ABSOLTE MAXIMUM RATING
Parameter
Input Voltage
Output Voltage
Temperature under bias
Storage temperature
Sym.
VIN
VOUT
TB
TS
Ratings
-0.3V to +6V
-0.3V to +6V
0℃ to 70℃
-65℃ to 150℃
DC ELECTRICAL CHARACTERISTICS
Parameter
Sym. Min. Typ. Max. Unit
Operating voltage
VCC
Operating Supply current
4.5
5.5
V
ICC1
2.2
mA
Input Leakage Current
IIN
±1
μA
Input high voltage (Ports 6)
VIH
Input low voltage (Ports 6)
VIL
Output high voltage (Ports 5)
VOH
Output low voltage (Ports 5)
VOL1
Output low voltage for LEDs
VOL2
Internal Pull-high resistance for
DATA, CLK
Output low voltage for DATA CLK
RPH
2.0
VIN=VCC, VSS
V
0.8
2.4
3.5
Condition
5
VOL3
V
V
IOH=-10.0mA
0.4
V
IOL1=9.0mA
0.4
V
IOL2=14.0mA
7
KΩ
VPH=0V
0.4
V
IOL=5mA
AC ELECTRICAL CHARACTERISTICS
Parameter
Sym.
Min.
Time from DATA transition to falling edge of CLK
T1
Time from rising of CLK to DATA transition
Duration of CLK inactive
Max.
Unit.
5
25
μS
T2
5
T4-5
μS
T3
30
40
50
μS
30
40
50
μS
50
μS
25
μS
Duration of CLK active
T4
Time to auxiliary device inhibit after clock 11 to ensure T5
the auxiliary device does not start another transmission
Time from inactive to active CLK transition, used to time T6
when auxiliary device sample DATA
System clock
FCLK
Typ.
5
4.00
MHz
Rev 01
Page 18 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„KEY MATRIX
R0
R1
R2
S0
PAUSE
S1
Q
TAB
A
S2
W
CAPS
S
R3
R4
R5
CTRL (R)
ESC
R6
R7
CTRL (L)
F5
Z
K131
~
`
!
1
X
K132
F1
@
2
K45
S3
E
F3
D
F4
C
K133
F2
#
3
S4
R
T
F
G
V
B
%
5
$
4
S5
U
K92
Y
J
K93
H
M
K99
N
^
6
&
7
}
]
K
K98
F6
<
, K107
BA0
+
=
*
8
K96
O
K102
F7
L
K103
>
.
APP
(
9
K101
P
K105
{
[
)
0
K100
S6
S7
S8
S9
K97
:
;
"
K106
K42
ALT(L)
SCROLL
NEXT
S10
S11
K14
7
HOME
(WWW)
SEARCH
S12
S13
9
PgUp
S14
+
S15
K95
PRINT
ALT(R)
ENTER (L) F12
PREV
|
\
1
END
F11
Delete
KOR0
5
2
0
Ins
/
Insert
KOR1
3
PgDn
.
Del
*
Page
Up
Page
Down
Home
End
(WWW)
HOME
VOL+
6
BA1
ENTER(R)
SHIFT (L)
SHIFT (R)
SLEEP
S16
?
/
BACK
SPACE
4
WIN(L)
PLAY
POWER
S17
CAL
WIN(R)
S18
WAKE
STOP
F9
F10
NUM
LOCK
SPACE
8
F8
K104
K 91
(WWW)
BACK
(WWW)
FAVORITE
(WWW)
STOP
(WWW)
(WWW)
FORWARD REFRESH
(WWW)
MAIL
MEDIA
MY COM
MUTE
VOL-
Rev 01
Page 19 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„TIMING DIAGRAMS
Keyboard to Host
1ST
CLK
CLK
2nd
CLK
10th
CLK
11th
CLK
T4
T3
T5
Tl
T2
DATA
Start Bit
Bit 0
Parity Bit
Stop Bit
Host to Keyboard
CLK
I/O
Inhidit
1ST
CLK
9th
CLK
2nd
CLK
11th
CLK
10th
CLK
T4
T3
T6
DATA
Start Bit
Bit 0
Parity Bit
Stop Bit
Rev 01
Page 20 of 21
PS2 KEYBOARD CONTROLLER
EC3648
Preliminary
„APPLICATION CIRCUIT
„ORDERING INFORMATION
E-CMOS CORPORATION IC DATASHEET
ADDRESS: No.1, Creation RD. 2nd, science-based industrial park, Hsin-Chu 300,
Taiwan, R.O.C.
website: http://www.ecmos.com.tw
E-mail : [email protected]
TEL: 886-3-5783622
FAX:886-3-5783630
Rev 01
Page 21 of 21