ELAN EM83053BH, EM83053AH Datasheet

GENERAL DESCRIPTION
The EM83053A/BH microcontroller is dedicated to a keyboard encoder ,specially designed for IBM PC AT and all compatible machines. The EM83053A/BH 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
EM83053A/BH
KEYBOARD ENCODER
95, 98, 2000 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
6
P91
7
P92
8
P93
9
XT
10
P95
11
P50
12
P51
13
P52
14
P53
15
P54
R_OSCI
VDD
VDD
403938
CAPS
37
P90
CLK
543
DATA
OSCO
2
GND
1
EM83053AH
1617181920212223242526
R_OSCI
VDD
393837
CAPS
NUM
36
SCROLL
35
P67
34 33
P66
32
P65
31
P64
30
P63
29
P62
28
P61
27
P60
P90
CLK
DATA
OSCO
GND
543
2
1
NUM
36
SCROLL
35
P67
34 33
P66
32
P65
31
P64
30
P63
29
P62
28
P61
27
P60
P91 P92 P93 P94 P95 P50 P51 P52 P53 P54
6 7 8 9
10
EM83053BH
11 12 13 14 15
1617181920212223242526
P55
P56
P57
P80
P81
P82
P83
P84
P85
P86
P87
* This specification are subject to be changed without notice.
P55
P56
P57
P80
P81
P82
P83
P84
P85
P86
P87
6.9.2000
1
KEYBOARD ENCODER
PIN DESCRIPTIONS
Symbol I/O Function
P50 O Column 3 Low output scan line, 3-state P51 O Column 4 Low output scan line, 3-state
P52 O Column 5 Low output scan line, 3-state P53 O Column 6 Low output scan line, 3-state P54 O Column 7 Low output scan line, 3-state P55 O Column 14 Low output scan line, 3-state P56 O Column 13 Low output scan line, 3-state P57 O Column 12 Low output scan line, 3-state P80 O Column 11 Low output scan line, 3-state P81 O Column 15 Low output scan line, 3-state P82 O Column 10 Low output scan line, 3-state P83 O Column 8 Low output scan line, 3-state P84 O Column 9 Low output scan line, 3-state P85 O Column 0 Low output scan line, 3-state P86 O Column 16 Low output scan line, 3-state P87 O Column 17 Low output scan line, 3-state P90 O Column 1 Low output scan line, 3-state P91 O Column 2 Low output scan line, 3-state VSS I Ground SCROLL O Scroll Lock Indicator NUM O NUM Lock Indicator CAPS O Caps Lock Indicator P60 I Row 0 Input scan line, internal pull high ( 17K ) P61 I Row 1 Input scan line, internal pull high ( 17K ) P62 I Row 2 Input scan line, internal pull high ( 17K ) P63 I Row 3 Input scan line, internal pull high ( 17K ) P64 I Row 4 Input scan line, internal pull high ( 17K ) P65 I Row 5 Input scan line, internal pull high ( 17K ) P66 I Row 6 Input scan line, internal pull high ( 17K ) P67 I Row 7 Input scan line, internal pull high ( 17K ) CLK I/O CLOCK line for IBM communication , internal pull high ( 2.2K ) DATA I/O DATA line for IBM communication , internal pull high ( 2.2K ) V
DD
OSCO O CLOCK output R_OSCI I Connect 51K OHM resistor for 1.8432 MHz oscillation
I +5V Power Supply
EM83053A/BH
* This specification are subject to be changed without notice.
6.9.2000
2
EM83053A/BH
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 buffer­overrun 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.
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.
6.9.2000
3
- 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.
EM83053A/BH
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
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
C : binary value of bits 6 and 5. Bit 7 is always 0.
* This specification are subject to be changed without notice.
6.9.2000
4
EM83053A/BH
KEYBOARD ENCODER
bit 4~ bit 0 typematic rate ± 20% bit 4~ bit 0 typematic rate ± 20%
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.6 11110 2.1 01111 8.0 11111 2.0
3. Default rate = 10.9 chars/sec + 20%
Default delay = 500 mS ± 20%
Enable ( Hex F4 )
- Responds with ACK.
- Clears output buffer.
- Clears last typematic key.
- Start scanning.
Default Disable (Hex F5)
- 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.
- 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.
6.9.2000
5
- 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.
EM83053A/BH
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.
6.9.2000
6
EM83053A/BH
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.
scan code set 1
Key Make code Break code Key Make code Break code
`(~) 29 A9 X 2D AD
10282C2EAE 20383V2FAF 30484B30B0 40585N31B1 50686M32B2 6 07 87 ,(<) 33 B3 7 08 88 .(>) 34 B4 8 09 89 /(?) 35 B5 9 0A 8A SHIFT_R 36 B6 0 0B 8B CTRL_L 1D 9D
-(-) 0C 8C ALT_L 38 B8
=(+) 0D 8D SPACE 39 B9
BACK SPACE 0E 8E ALT_R E0 38 E0 B8
TAB 0F 8F CTRL_R E0 1D E0 9D
Q 10 90 NUM 45 C5
W 11 91 (7) 47 C7
E 1292 (4)4BCB R 13 93 (1) 4F CF T 14 94 (8) 48 C8 Y 15 95 (5) 4C CC
* This specification are subject to be changed without notice.
6.9.2000
7
EM83053A/BH
KEYBOARD ENCODER
Key Make code Break code Key Make code Break code
U 16 96 (2) 50 D0
I1797 (θ)52D2
O 18 98 (*) 37 B7
P 19 99 (9) 49 C9 [({) 1A 9A (6) 4D CD ](}) 1B 9B (3) 51 D1
\( )@1 2B AB (DEL) 53 D3 CAPS 3A BA (-) 4A CA
A 1E 9E (+) 4E CE
S 1F 9F (ENTER) E0 1C E0 9C
D 20 A0 ESC 01 81
F21A1F13BBB
G22A2F23CBC H23A3F33DBD
J24A4F43EBE
K25A5F53FBF
L26A6F640C0
;(:) 27 A7 F7 41 C1 '(") 28 A8 F8 42 C2
K42 @2 2B AB F9 43 C3
ENTER 1C 9C F10 44 C4
SHIFT_L 2A AA F11 57 D7
K45 @2 56 D6 F12 58 D8
Z 2C AC SCROLL 46 C6
Key Base Case,or Shift + Nun Lock Shift Case @3 Num Lock
Make/Break Make/Break Make/Break
INS E0 52 / E0 D2 E0 AA E0 52 E0 2A E0 52
/ E0 D2 E0 2A / E0 D2 E0 AA
DEL E0 53 / E0 D3 E0 AA E0 53 E0 2A E0 53
/ E0 D3 E0 2A / E0 D3 E0 AA
LEFT E0 4B / E0 CB E0 AA E0 4B E0 2A E0 4B
/ E0 CB E0 2A / E0 CB E0 AA
HOME E0 47 / E0 C7 E0 AA E0 47 E0 2A E0 47
/ E0 C7 E0 2A / E0 C7 E0 AA
END E0 4F / E0 CF E0 AA E0 4F E0 2A E0 4F
/ E0 CF E0 2A / E0 CF E0 AA
UP E0 48 / E0 C8 E0 AA E0 48 E0 2A E0 48
/ E0 C8 E0 2A / E0 C8 E0 AA
DOWN E0 50 / E0 D0 E0 AA E0 50 E0 2A E0 50
/ E0 D0 E0 2A / E0 D0 E0 AA
PAGE UP E0 49 / E0 C9 E0 AA E0 49 E0 2A E0 49
/ E0 C9 E0 2A / E0 C9 E0 AA
PAGE E0 51 / E0 D1 E0 AA E0 51 E0 2A E0 51 DOWN / E0 D1 E0 2A / E0 D1 E0 AA RIGHT E0 4D / ED CD E0 AA E0 4D E0 2A E0 4D
/ E0 CD E0 2A / E0 CD E0 AA
* This specification are subject to be changed without notice.
6.9.2000
8
Loading...
+ 16 hidden pages