The EM83055H microcontroller is dedicated to a keyboard encoder ,specially designed for IBM PC AT and
all compatible machines. The EM83055H controll all scan codes, three LEDs status, 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.
FEATURES
• Low cost - eliminate need external components.
• Phantom key detects.
• RC oscillator ( 1.8432MHz ).
• Support scan code set 1 ,2 and 3.
• Support PC AT and PS/2 keyboard .
• Low power CMOS device technology.
• Internal pull-up resistor.
• Tri-state outputs for easy board application.
• Built-in 4K ROM.
• Support WINDOWS
• 104/107 keys with multi-media or other special application keyboard encoder.
• WINDOWS is registered trademarks of Microsoft corperation.
TM
EM83055H
KEYBOARD ENCODER
95, 98, 2000, ME keys.
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.
PIN ASSIGNMENTS
P91
P92
P93
P94
P95
P50
P51
P52
P53
P54
P90
CLK
DATA
OSCO
GND
543
2
1
6
7
8
9
10
EM83055H
11
12
13
14
15
1617181920212223242526
P55
P56
P57
P80
P81
P82
P83
R_OSCI
VDD
393837
P84
P85
CAPS
P86
36
35
34
33
32
31
30
29
28
27
P87
NUM
SCROLL
P67
P66
P65
P64
P63
P62
P61
P60
* This specification are subject to be changed without notice.
OSCOOCLOCK output
R_OSCIIConnect 51K OHM resistor for 1.8432 MHz oscillation
I+5V Power Supply
EM83055H
* This specification are subject to be changed without notice.
9.25.2001
2
Page 3
KEYBOARD ENCODER
FUNCTION DESCRIPTIONS
Keyboard buffer
The keyboard will buffer 16 bytes in a first-in-first-out order when the system is able to receive scan codes
from the keyboard. The response codes and repeated codes will not be buffered. If keystrokes generate a
multiple-byte sequence, the entire sequence must fit into the buffer or the keystroke is discarded and a bufferoverrun condition occurs.
Power-on Reset and self test
The duration of the keyboard Power-on-Reset(POR) should be within 150 milliseconds and 2 seconds after
the power is applied to the keyboard.
After executing POR , the keyboard executes a self test. The LEDs are turned on at the beginning and off at
the end of the self test. The self test takes a minimum 300 milliseconds and a maximum 500 milliseconds.
If the self test is successful, a completion code AA hex is sent to the system and the keyboard starts scanning.
If the self test fails, and error code is sent, the keyboard is disabled and waits for a command from the system.
The completion codes are sent between 450 milliseconds and 2.5 seconds after POR, and between 300 and
500 milliseconds after a RESET command is acknowledged.
EM83055H
Keyboard data output
When the keyboard is ready to send data to the system, it first checks clock and data lines. If either one is in
the low state, data is stored in the keyboard buffer. If both are in the high state, keyboard starts clocking data
out. Data will be valid before the trailing edge and after the leading edge of the clock pulse. During the
transmission the keyboard checks the clock line at least every 60 microseconds . If the system lowers the clock
lines before the leading edge of the 10th clock, the keyboard should stop sending, then buffer the data and
return clock and data lines to high state.
Keyboard data input
When the system is ready to send data to the keyboard, it first checks clock line to see if keyboard is sending
data. If keyboard is not sending data or it is sending data but has not reached the 10th clock, the system can
inhibit the interface by forcing the clock line low for more than 60 microseconds and prepares to send data.
The keyboard checks clock line status at least every 5 milliseconds. If a system Request to Send(RTS) is
detected, the keyboard clocks 11 bits in. After the 10th bit, the keyboard checks for a high state in data line
then pulls it low and clocks one more bit to signal the system that data has been received. If data is low after
the 10th bit, it indicates a frame error. The keyboard should continue to count until data line goes high, then
pulls it low and issues a RESEND to the system.
Command from the system
The system can send commands to the keyboard at any time. The keyboard needs to respond within 20
milliseconds, unless the system prevents keyboard output, when doing self test or executing a RESET.
The following are the keyboard input commands and the actions that keyboard needs to take.
Set /Reset Status indicators ( Hex ED )
- Responds ACK.
- Receives option byte.
* This specification are subject to be changed without notice.
9.25.2001
3
Page 4
- Responds ACK.
- Updates status indicators.
- Returns to previous scanning state.
Echo ( Hex EEH )
- Responds with EE hex.
- Returns to previous scanning state.
Invalid commands ( Hex EF and F1 )
- Returns a RESEND command.
- Returns to previous scanning state.
Select Alternate Scan Codes ( Hex F0 )
- Responds ACK.
- Clears output buffer.
- Sets the default typematic rate/delay.
- Clears last typematic key.
- Receives option byte.
- 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 rate.
EM83055H
KEYBOARD ENCODER
Read ID (F2)
- Responds with ACK.
- Discontinues scanning.
- Sends two ID bytes. The second byte will be sent within 500 uS after first byte.
- Resumes scanning.
Set Typematic Rate/Delay ( Hex F3 )
- Responds ACK.
- Receives rate/delay value byte
- Responds ACK.
- Set rate/delay (* Note 1)
- Returns to previous scanning state.
* Note 1
B
1. Repeat period = ( 8+A ) x ( 2
) 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
C : binary value of bits 6 and 5. Bit 7 is always 0.
* This specification are subject to be changed without notice.
9.25.2001
4
Page 5
KEYBOARD ENCODER
bit 4~ bit 0typematic rate ± 20%bit 4~ bit 0typematic rate ± 20%
- 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 )
* This specification are subject to be changed without notice.
9.25.2001
5
Page 6
- Responds ACK.
- Clears output buffer.
- Sets all key type (affect only scan code set 3 operation).
F7 : Typematic
F8 : Make/Break
F9 : Make
FA : Typematic/Make/Break
- Returns to previous scanning rate.
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.
EM83055H
KEYBOARD ENCODER
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 - Reset 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.
Echo ( Hex EE )
The keyboard sends this code in response to an ECHO command.
* This specification are subject to be changed without notice.
9.25.2001
6
Page 7
EM83055H
KEYBOARD ENCODER
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.
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.
Keyboard Scan Code Table
The keyboard contains 3 scan code sets. The system defaults to scan code set 2, but can be switched to set 1 or
set 3 . The following tables show the key numbers and three scan code sets in hexadecimal values. All the keys
are typematics except for the pause key. When a key is pressed down, the make scan code is sent to the
system. When the key is released, its break code is sent. If two or more keys are held down, only the last key
pressed repeats at the typematic rate. Typematic operation stops when the last pressed key is released, even if
other keys are being released or some other keys are still held down.
The following table shows three scan code sets used in the keyboard.
E 1292 (4)4BCB
R1393(1)4FCF
T 1494 (8)48C8
Y1595(5)4CCC
* This specification are subject to be changed without notice.
9.25.2001
7
Page 8
EM83055H
KEYBOARD ENCODER
KeyMake codeBreak codeKeyMake codeBreak code
U1696 (2)50D0
I1797 (θ)52D2
O1898(*)37B7
P1999(9)49C9
[({)1A9A(6)4DCD
](})1B9B(3)51D1
\( )@12BAB(DEL)53D3
CAPS3ABA(-)4ACA
A1E9E(+)4ECE
S1F9F(ENTER)E0 1CE0 9C
D20A0ESC0181
F21A1F13BBB
G22A2F23CBC
H23A3F33DBD
J24A4F43EBE
K25A5F53FBF
L26A6F640C0
;(:)27A7F741C1
'(")28A8F842C2
K42 @22BABF943C3
ENTER1C9CF1044C4
SHIFT_L2AAAF1157D7
K45 @256D6F1258D8
Z2CACSCROLL46C6
KeyBase Case,or Shift + Nun LockShift Case @3Num Lock
Make/BreakMake/BreakMake/Break
INSE0 52 / E0 D2E0 AA E0 52E0 2A E0 52
/ E0 D2 E0 2A/ E0 D2 E0 AA
DELE0 53 / E0 D3E0 AA E0 53E0 2A E0 53
/ E0 D3 E0 2A/ E0 D3 E0 AA
LEFTE0 4B / E0 CBE0 AA E0 4BE0 2A E0 4B
/ E0 CB E0 2A/ E0 CB E0 AA
HOMEE0 47 / E0 C7E0 AA E0 47E0 2A E0 47
/ E0 C7 E0 2A/ E0 C7 E0 AA
ENDE0 4F / E0 CFE0 AA E0 4FE0 2A E0 4F
/ E0 CF E0 2A/ E0 CF E0 AA
UPE0 48 / E0 C8E0 AA E0 48E0 2A E0 48
/ E0 C8 E0 2A/ E0 C8 E0 AA
DOWNE0 50 / E0 D0E0 AA E0 50E0 2A E0 50
/ E0 D0 E0 2A/ E0 D0 E0 AA
PAGE UPE0 49 / E0 C9E0 AA E0 49E0 2A E0 49
/ E0 C9 E0 2A/ E0 C9 E0 AA
PAGEE0 51 / E0 D1E0 AA E0 51E0 2A E0 51
DOWN/ E0 D1 E0 2A/ E0 D1 E0 AA
RIGHTE0 4D / ED CDE0 AA E0 4DE0 2A E0 4D
/ E0 CD E0 2A/ E0 CD E0 AA
* This specification are subject to be changed without notice.
9.25.2001
8
Page 9
KeyScan Code Make/BreakShift Case Make/Break @3
(/)E0 35 / E0 B5E0 AA E0 35 / E0 B5 E0 2A
KeyScan CodeCtrl Case, Shift CaseAlt Case
Make/BreakMake/ BreakMake/Break
PRINTE0 2A E0 37E0 37 / E0 B754 / D4
/ E0 B7 E0 AA
KeyMake CodeCtrl Key Pressed
PAUSE @4E1 1D 45 E1 9D C5E0 46 E0 C6
Note .
@1 : 101-key keyboard only.
@2 : 102-key keyboard only.
@3 : If the left Shift key is held down, the AA/2A shift make and break is sent with the other scan codes.
If the right Shift key is held down, B6/36 is sent. If both Shift keys are down, both sets of codes are
sent with the other scan code.
@4 : This key is not typematic. All associated scan codes occur on the make of the key.
EM83055H
KEYBOARD ENCODER
scan code set 2
KeyMake codeBreak codeKeyMake codeBreak code
`(~)0EF0 0E X22F0 22
116F0 16 C21F0 21
21EF0 1E V2AF0 2A
326F0 26 B32F0 32
425F0 25 N31F0 31
52EF0 2E M3AF0 3A
636F0 36 ,(<)41F0 41
73DF0 3D .(>)49F0 49
83EF0 3E /(?)4AF0 4A
946F0 46 SHIFT_R59F0 59
045F0 45 CTRL_L14F0 14
* This specification are subject to be changed without notice.
9.25.2001
10
Page 11
PAUSE @8E1 14 77 E1 F0 14 F0 77E0 7E E0 F0 7E
Note .
@5 : 101-key keyboard only.
@6 : 102-key keyboard only.
@7 : If the left Shift key is held down, the F0 12/12 shift make and break is sent with the other scan codes.
If the right Shift key is held down, F0 59/59 is sent. If both Shift keys are down, both sets of codes
are sent with the other scan code.
@8 : This key is not typematic. All associated scan codes occur on the make of the key.
ALT_L19F0 19Make/Break
SPACE29F0 29Typematic
ALT_R39 F0 39Make only
CTRL_R58 F0 58Make only
INS67F0 67Make only
DEL64F0 64Typematic
LEFT61F0 61Typematic
HOME6EF0 6EMake only
END65F0 65Make only
UP63F0 63Typematic
DOWN60F0 60Typematic
PAGE UP6FF0 6FMake only
PAGE DOWN6DF0 6DMake only
RIGHT6AF0 6ATypematic
NUM76F0 76Make only
(7)6CF0 6CMake only
(4)6BF0 6BMake only
(1)69F0 69Make only
(/)77F0 77Make only
(8)75F0 75Make only
(5)73F0 73Make only
(2)72F0 72Make only
(0)70F0 70Make only
(*)7EF0 7EMake only
(9)7DF0 7DMake only
(6)74F0 74Make only
(3)7AF0 7AMake only
EM83055H
* This specification are subject to be changed without notice.
9.25.2001
12
Page 13
KeyMake CodeBreak CodeDefault Key State
(DEL)71F0 71Make only
(-)84F0 84Make only
(+)7CF0 7CTypematic
(ENTER)79F0 79Make only
ESC08F0 08Make only
F107F0 07Make only
F20FF0 0FMake only
F317F0 17Make only
F41FF0 1FMake only
F527F0 27Make only
F62FF0 2FMake only
F737F0 37Make only
F83FF0 3FMake only
F947F0 47Make only
F104FF0 4FMake only
F1156F0 56Make only
F125EF0 5EMake only
PRINT57F0 57Make only
SCROLL5FF0 5FMake only
PAUSE62F0 62Make only
Note .
@9 : 101-key keyboard only
@10 : 102-key keyboard only
EM83055H
KEYBOARD ENCODER
New key codes for scan set 1:
New keyMakeBreak
LWINE05BE0DB
RWINE05CE0DC
APPE05DE0DD
N-CHG (131)7BFB
CHG (132)79F9
ROMA (133)70F0
K147DFD
K5673F3
K1077EFE
KLF1X
KRF0X
POWERE05EE0DE
SLEEPE05FE0DF
WAKE UPE063E0E3
* This specification are subject to be changed without notice.
9.25.2001
13
Page 14
New key codes for scan set 2:
New keyMakeBreak
LWINE01FE0F01F
RWINE027E0F027
APPE02FE0F02F
N-CHG (131)67F067
CHG (132)64F064
ROMA (133)13F013
K146AF06A
K5651F051
K1076DF06D
KLF1X
KRF2X
POWERE037E0F037
SLEEPE03FE0F03F
WAKE UPE05EE0F05E
New key codes for scan set 3:
EM83055H
KEYBOARD ENCODER
New keyMakeBreak
LWIN8BF08BMAKE/BREAK
RWIN8CF08CMAKE/BREAK
APP8DF08DMAKE/BREAK
N-CHG (131)85F085MAKE
CHG (132)86F086MAKE
ROMA (133)87F087MAKE
K145DF05DTYPEMATIC
K5651F051TYPEMATIC
K1077BF07BTYPEMATIC
KLF1X
KRF2X
POWERXX
SLEEPXX
WAKE UPXX
* This specification are subject to be changed without notice.
9.25.2001
16
Page 17
ABSOLUTE MAXIMUM RATINGS
ParameterSym.Ratings
EM83055H
KEYBOARD ENCODER
Supply VoltageV
Input VoltageV
Output VoltageV
Temperature under biasT
Storage temperatureT
CC
IN
OUT
B
S
-0.5V to +7V
-0.3V to +6V
-0.3V to +6V
0°C to 70°C
-65°C to 150°C
DC ELECTRICAL CHARACTERISTICS
ParameterSym.Min. Typ.Max.UnitCondition
Operating voltageV
Operating supply currentI
Input leakageI
Input high voltageV
Input low voltageV
Output low voltageV
Output low voltage for LEDSV
Internal Pull-high resistance ( port 6,9 )R
Internal Pull-high resistance forR
DATA, CLK
Output low voltage for DATA CLKV
CC
CCI
IN
IH
IL
OL1
OL2
PH1
PH2
OL3
4.555.5V
3mAFosc=1.8432MHz
±1µAVIN=VCC ,V
2.0V
0.8V
0.4VI
3.2VI
1223KΩV
1.52.23KΩV
0.4VI
= 3.0 mA
OL1
= 10 mA
OL2
= 0V
PH1
= 0V
PH2
= 5 mA
OL3
SS
AC ELECTRICAL CHARACTERISTICS
ParameterSym.Min.Typ.Max.Unit
Time from DATA transition to falling edge of CLKT1525µS
Time from rising edge of CLK to DATA transitionT25T4 - 5µS
Duration of CLK inactiveT3304050µS
Duration of CLK activeT4304050µS
Time to auxiliary device inhibit after clock 11 to ensureT550µS
the auxiliary device does not start another transmission
Time from inactive to active CLK transition, used to timeT6525µS
when auxiliary device samples DATA
System clockFCLK1.843MHz
* This specification are subject to be changed without notice.
9.25.2001
17
Page 18
TIMING DIAGRAMS
EM83055H
KEYBOARD ENCODER
CLK
DATA
CLK
DATA
I/O
Inhibit
T1
Start Bit
Start Bit
1ST
CLK
T3
T2
2nd
CLK
T4
Bit 0
Fig 3. Keyboard output data timings
1ST
CLK
T3
Bit 0
2nd
CLK
T4
T6
Fig 4. Keyboard input data timings
10th
CLK
Parity Bit
9th
CLK
11th
CLK
T5
Parity Bit
Stop Bit
10th
CLK
11th
CLK
Stop Bit
* This specification are subject to be changed without notice.
9.25.2001
18
Page 19
APPLICATION CIRCUIT
EM83055H
KEYBOARD ENCODER
VCC
Turbo func.
VCC
InternalMulti Func. 2
InternalMulti Func. 1
NUM
LED
SCROLL
LED
CAPS
LED
OSCO
GND
2
51K
R_OSCI
VDD
CAPS
1
393837
36
35
34
33
32
31
30
29
28
27
NUM
SCROLL
P67
P66
P65
P64
P63
P62
P61
P60
R7
R6
R5
R4
R3
R2
R1
R0
DATA
CLK
C1
P90
CLK
DATA
543
P91
P92
P93
P94
P95
P50
P51
P52
P53
P54
6
7
8
9
10
11
EM83055H
12
13
14
15
C2
R3
R
LED
C3
C4
C5
C6
C7
1617181920212223242526
P55
P56
P57
P80
P81
P82
P83
P84
P85
P86
P87
C14
C13
C12
C11
C15
C8
C10
C17
C16
C0
C9
* This specification are subject to be changed without notice.
9.25.2001
19
Page 20
EM83055H
KEYBOARD ENCODER
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
C11
C12
C13
C14
C15
C16
C17
R0
PAUSE
126
Q
017
W
018
E
019
R
020
U
023
I
024
O
025
P
026
SCROLL
125
K14
014
7
(K)
091
8
(K)
096
9
(K)
101
+
(K)
106
wake up
Mail
K150
(KC-L)
R1
POWER
TAB
016
CAP
030
F3
114
T
021
Y
022
](})
028
F7
118
[({)
027
BACK
015
4
(K)
092
5
(K)
097
6
(K)
102
K107
SHIFT-L
044
WIN-L
WWWFavorite
R2
A
031
S
032
D
033
F
034
J
037
K
038
L
039
;(:)
040
FnM/Mode
\(|)
029
1
(K)
093
2
(K)
098
3
(K)
103
ENTER
(K)
108
SHIFT-R
057
WWWForward
WIN-R
R3
SLEEP
ESC
110
K45
045
F4
115
G
035
H
036
F6
117
’(")
041
ALT-L
060
F11
122
SPACE
061
0
(K)
099
¥
(K)
104
↑
083
Volume-
WWWstop
MyCpmputer
R4
CTRL-R
064
Z
046
X
047
C
048
V
049
M
052
,(<)
053
.(>)
054
K42
042
ENTER
043
NUM
090
/
(K)
095
*
(K)
100
Play/Pause
Volume+
WWWBack
Stop
R5
WAKE UP
N-CHG
131
CHG
132
ROMA
133
B
050
N
051
K56
056
APP
APP
/(?)
055
ALT-R
062
F12
123
↓
084
→
089
105
←
079
NextTrack
WWWRefresh
Calculator
R6
CTRL-L
058
‘(~)
001
F1
112
F2
113
5(%)
006
6(^)
007
+‘(=)
013
F8
119
_(-)
012
F9
120
DEL
076
INS
075
PAGE UP
085
HOME
080
PrevTrack
Mute
Web/Home
R7
F5
116
1(!)
002
2(@)
003
3(#)
004
4($)
005
7(&)
008
8(*)
009
9(’)’)
010
0(’)’)
011
PRINT
124
F10
121
POWER
SLEEP
PAGE
DOWN
086
END
081
Media
WWWSearch
K151
(KC-R)
* This specification are subject to be changed without notice.