EM83049 EM83049 KEYBOARD KEYBOARD ENCODER ENCODER GENERAL DESCRIPTION The EM83049 microcontroller is dedicated to a keyboard encoder ,specially designed for IBM PC AT,XT and all compatible machines. The EM83049 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,XT and PS/2 keyboard . Low power CMOS device technology. Internal pull-up resistor. Tri-state outputs for easy board application. 40 Pin DIP package. Built-in 4K ROM. Support WINDOWSTM keys. 101/102/104 keys or other special application keyboard encoder. WINDOWS is registered trademarks of Microsoft corperation. APPLICATION • • • • IBM PC/AT,XT or compatible machine keyboard. IBM PS/2 model 30,50,60,80 or compatible machine keyboard. Japanese keyboard. Korean keyboard. PIN ASSIGNMENTS EM83049 VSS NC DATA CLK P90 P91 NC NC XT NC P50 P51 P52 P53 P54 P55 P56 P57 P80 P81 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 * This specification are subject to be changed without notice. 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 OSCO OSCR VDD CAPS NUM SCROLL P67 P66 P65 P64 P63 P62 P61 P60 P87 P86 P85 P84 P83 P82 5.2.1997 1 EM83049 KEYBOARD ENCODER PIN DESCRIPTIONS Symbol P50 P51 P52 P53 P54 P55 P56 P57 P80 P81 P82 P83 P84 P85 P86 P87 P90 P91 VSS SCROLL NUM CAPS P60 P61 P62 P63 P64 P65 P66 P67 CLK DATA VDD OSCO OSCR XT I/O Function O O O O O O O O O O O O O O O O O O I O O O I I I I I I I I I/O I/O I O I I Column 0 Low output scan line, 3-state Column 1 Low output scan line, 3-state Column 2 Low output scan line, 3-state Column 3 Low output scan line, 3-state Column 4 Low output scan line, 3-state Column 5 Low output scan line, 3-state Column 6 Low output scan line, 3-state Column 7 Low output scan line, 3-state Column 8 Low output scan line, 3-state Column 9 Low output scan line, 3-state Column 10 Low output scan line, 3-state Column 11 Low output scan line, 3-state Column 12 Low output scan line, 3-state Column 13 Low output scan line, 3-state Column 14 Low output scan line, 3-state Column 15 Low output scan line, 3-state Column 16 Low output scan line, 3-state Column 17 Low output scan line, 3-state Ground Scroll Lock Indicator NUM Lock Indicator Caps Lock Indicator Row 0 Input scan line, internal pull high ( 10KΩ ) Row 1 Input scan line, internal pull high ( 10KΩ ) Row 2 Input scan line, internal pull high ( 10KΩ ) Row 3 Input scan line, internal pull high ( 10KΩ ) Row 4 Input scan line, internal pull high ( 10KΩ ) Row 5 Input scan line, internal pull high ( 10KΩ ) Row 6 Input scan line, internal pull high ( 10KΩ ) Row 7 Input scan line, internal pull high ( 10KΩ ) CLOCK line for IBM communication , internal pull high ( 2.2KΩ ) DATA line for IBM communication , internal pull high ( 2.2KΩ ) +5V Power Supply CLOCK output Connect 51K OHM resistor for 1.8432 MHz oscillation "1" or Floating=AT, "0"=XT, internal pull high. * This specification are subject to be changed without notice. 5.2.1997 2 EM83049 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. 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. 5.2.1997 3 EM83049 KEYBOARD ENCODER - 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. 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. 5.2.1997 4 EM83049 KEYBOARD ENCODER 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 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 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. 5.2.1997 5 EM83049 KEYBOARD ENCODER - 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. 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. 5.2.1997 6 EM83049 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 Number 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 Make code 29 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 Break code A9 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 * This specification are subject to be changed without notice. Key Number 47 48 49 50 51 52 53 54 55 57 58 60 61 62 64 90 91 92 93 96 97 Make code 2D 2E 2F 30 31 32 33 34 35 36 1D 38 39 E0 38 E0 1D 45 47 4B 4F 48 4C Break code AD AE AF B0 B1 B2 B3 B4 B5 B6 9D B8 B9 E0 B8 E0 9D C5 C7 CB CF C8 CC 5.2.1997 7 EM83049 KEYBOARD ENCODER Key Number 23 24 25 26 27 28 29 @1 30 31 32 33 34 35 36 37 38 39 40 41 42 @2 43 44 45 @2 46 Key No. Make code 16 17 18 19 1A 1B 2B 3A 1E 1F 20 21 22 23 24 25 26 27 28 2B 1C 2A 56 2C Break code 96 97 98 99 9A 9B AB BA 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 AB 9C AA D6 AC 75 Base Case,or Shift + Nun Lock Make/Break E0 52 / E0 D2 76 E0 53 / E0 D3 79 E0 4B / E0 CB 80 E0 47 / E0 C7 81 E0 4F / E0 CF 83 E0 48 / E0 C8 84 E0 50 / E0 D0 85 E0 49 / E0 C9 86 E0 51 / E0 D1 89 E0 4D / ED CD * This specification are subject to be changed without notice. Key Number 98 99 100 101 102 103 104 105 106 108 110 112 113 114 115 116 117 118 119 120 121 122 123 125 Shift Case @3 Make/Break E0 AA E0 52 / E0 D2 E0 2A E0 AA E0 53 / E0 D3 E0 2A E0 AA E0 4B / E0 CB E0 2A E0 AA E0 47 / E0 C7 E0 2A E0 AA E0 4F / E0 CF E0 2A E0 AA E0 48 / E0 C8 E0 2A E0 AA E0 50 / E0 D0 E0 2A E0 AA E0 49 / E0 C9 E0 2A E0 AA E0 51 / E0 D1 E0 2A E0 AA E0 4D / E0 CD E0 2A Make code 50 52 37 49 4D 51 53 4A 4E E0 1C 01 3B 3C 3D 3E 3F 40 41 42 43 44 57 58 46 Break code D0 D2 B7 C9 CD D1 D3 CA CE E0 9C 81 BB BC BD BE BF C0 C1 C2 C3 C4 D7 D8 C6 Num Lock Make/Break 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 5.2.1997 8 EM83049 KEYBOARD ENCODER Key No. 95 Scan Code Make/Break E0 35 / E0 B5 Key No. Scan Code Make/Break E0 2A E0 37 / E0 B7 E0 AA 124 Key No. 126 @4 Shift Case Make/Break @3 E0 AA E0 35 / E0 B5 E0 2A Ctrl Case, Shift Case Make/ Break E0 37 / E0 B7 Make Code E1 1D 45 E1 9D C5 Alt Case Make/Break 54 / D4 Ctrl Key Pressed E0 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. scan code set 2 Key Number 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 @5 Make code 0E 16 1E 26 25 2E 36 3D 3E 46 45 4E 55 66 0D 15 1D 24 2D 2C 35 3C 43 44 4D 54 5B 5D Break code F0 0E F0 16 F0 1E F0 26 F0 25 F0 2E F0 36 F0 3D F0 3E F0 46 F0 45 F0 4E F0 55 F0 66 F0 0D F0 15 F0 1D F0 24 F0 2D F0 2C F0 35 F0 3C F0 43 F0 44 F0 4D F0 54 F0 5B F0 5D * This specification are subject to be changed without notice. Key Number 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 Make code 22 21 2A 32 31 3A 41 49 4A 59 14 11 29 E0 11 E0 14 77 6C 6B 69 75 73 72 70 7C 7D 74 7A 71 Break code F0 22 F0 21 F0 2A F0 32 F0 31 F0 3A F0 41 F0 49 F0 4A F0 59 F0 14 F0 11 F0 29 E0 F0 11 E0 F0 14 F0 77 F0 6C F0 6B F0 69 F0 75 F0 73 F0 72 F0 70 F0 7C F0 7D F0 74 F0 7A F0 71 5.2.1997 9 EM83049 KEYBOARD ENCODER Key Number 30 31 32 33 34 35 36 37 38 39 40 41 42 @6 43 44 45 @6 46 Key No. Make code 58 1C 1B 23 2B 34 33 3B 42 4B 4C 52 5D 5A 12 61 1A Break code F0 58 F0 1C F0 1B F0 23 F0 2B F0 34 F0 33 F0 3B F0 42 F0 4B F0 4C F0 52 F0 5D F0 5A F0 12 F0 61 F0 1A 75 Base Case,or Shift + Nun Lock Make/Break E0 70 / E0 F0 70 76 E0 71 / E0 F0 71 79 E0 6B / E0 F0 6B 80 E0 6C / E0 F0 6C 81 E0 69 / E0 F0 69 83 E0 75 / E0 F0 75 84 E0 72 / E0 F0 72 85 E0 7D / E0 F0 7D 86 E0 7A / E0 F0 7A 89 E0 74 / E0 F0 74 Key No. 95 Key No. 124 Key Number 105 106 108 110 112 113 114 115 116 117 118 119 120 121 122 123 125 * This specification are subject to be changed without notice. Break code F0 7B F0 79 E0 F0 5A F0 76 F0 05 F0 06 F0 04 F0 0C F0 03 F0 0B F0 83 F0 0A F0 01 F0 09 F0 78 F0 07 F0 7E Shift Case @7 Make/Break Num Lock Make/Break E0 F0 12 E0 70 / E0 F0 70 E0 12 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 7D E0 12 E0 F0 12 E0 7A / E0 F0 7A E0 12 E0 F0 12 E0 74 / E0 F0 74 E0 12 E0 12 E0 70 / E0 F0 70 E0 F0 12 E0 12 E0 71 / E0 F0 71 E0 F0 12 E0 12 E0 6B / E0 F0 6B E0 F0 12 E0 12 E0 6C / E0 F0 6C E0 F0 12 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 F0 12 E0 12 E0 7A / E0 F0 7A E0 F0 12 E0 12 E0 74 / E0 F0 74 E0 F0 12 Scan Code Make/Break E0 4A / E0 F0 4A Scan Code Make/Break E0 12 E0 7C / E0 F0 7C E0 F0 12 Make code 7B 79 E0 5A 76 05 06 04 0C 03 0B 83 0A 01 09 78 07 7E Shift Case Make/Break @7 E0 F0 12 E0 4A / E0 F0 4A E0 12 Ctrl Case, Shift Case Make/ Break E0 7C / E0 F0 7C Alt Case Make/Break 84 / F0 84 5.2.1997 10 EM83049 KEYBOARD ENCODER Key No. 126 @8 Make Code E1 14 77 E1 F0 14 F0 77 Ctrl Key Pressed E0 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. scan code set 3 Key number 1 2 3 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 @9 30 31 32 33 34 35 36 Make Code 0E 16 1E 26 25 2E 36 3D 3E 46 45 4E 55 66 0D 15 1D 24 2D 2C 35 3C 43 44 4D 54 5B 5C 14 1C 1B 23 2B 34 33 * This specification are subject to be changed without notice. Break Code F0 0E F0 16 F0 1E F0 26 F0 25 F0 2E F0 36 F0 3D F0 3E F0 46 F0 45 F0 4E F0 55 F0 66 F0 0D F0 15 F0 1D F0 24 F0 2D F0 2C F0 35 F0 3C F0 43 F0 44 F0 4D F0 54 F0 5B F0 5C F0 14 F0 1C F0 1B F0 23 F0 2B F0 34 F0 33 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 Make/Break Typematic Typematic Typematic Typematic Typematic Typematic 5.2.1997 11 EM83049 KEYBOARD ENCODER Key number 37 38 39 40 41 42 @10 43 44 45 @10 46 47 48 49 50 51 52 53 54 55 57 58 60 61 62 64 75 76 79 80 81 83 84 85 86 89 90 91 92 93 95 96 97 98 99 100 101 102 103 Make Code 3B 42 4B 4C 52 53 5A 12 13 1A 22 21 2A 32 31 3A 41 49 4A 59 11 19 29 39 58 67 64 61 6E 65 63 60 6F 6D 6A 76 6C 6B 69 77 75 73 72 70 7E 7D 74 7A * This specification are subject to be changed without notice. Break Code F0 3B F0 42 F0 4B F0 4C F0 52 F0 53 F0 5A F0 12 F0 13 F0 1A F0 22 F0 21 F0 2A F0 32 F0 31 F0 3A F0 41 F0 49 F0 4A F0 59 F0 11 F0 19 F0 29 F0 39 F0 58 F0 67 F0 64 F0 61 F0 6E F0 65 F0 63 F0 60 F0 6F F0 6D F0 6A F0 76 F0 6C F0 6B F0 69 F0 77 F0 75 F0 73 F0 72 F0 70 F0 7E F0 7D F0 74 F0 7A Default Key State Typematic Typematic Typematic Typematic Typematic Typematic Typematic Make/Break Typematic Typematic Typematic Typematic Typematic Typematic Typematic Typematic Typematic Typematic Typematic Make/Break Make/Break Make/Break Typematic Make only 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 5.2.1997 12 EM83049 KEYBOARD ENCODER Key number 104 105 106 108 110 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 Make Code 71 84 7C 79 08 07 0F 17 1F 27 2F 37 3F 47 4F 56 5E 57 5F 62 Break Code F0 71 F0 84 F0 7C F0 79 F0 08 F0 07 F0 0F F0 17 F0 1F F0 27 F0 2F F0 37 F0 3F F0 47 F0 4F F0 56 F0 5E F0 57 F0 5F F0 62 Default Key State 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 Make only Make only Note . @9 : 101-key keyboard only @10 : 102-key keyboard only New key codes for scan set 1: New key LWIN RWIN APP N-CHG (131) CHG (132) ROMA (133) 014 056 107 KL KR E0 E0 E0 * This specification are subject to be changed without notice. Make 5B 5C 5D 7B 79 70 7D 73 7E F1 F0 E0 E0 E0 Break DB DC DD FB F9 F0 FD F3 FE X X 5.2.1997 13 EM83049 KEYBOARD ENCODER New key codes for scan set 2: New key LWIN RWIN APP N-CHG (131) CHG (132) ROMA (133) 014 056 107 KL KR E0 E0 E0 Make 1F 27 2F 67 64 13 6A 51 6D F1 F2 E0 E0 E0 Break F0 1F F0 27 F0 2F F0 67 F0 64 F0 13 F0 6A F0 51 F0 6D X X New key codes for scan set 3: New key LWIN RWIN APP N-CHG (131) CHG (132) ROMA (133) 014 056 107 KL KR * This specification are subject to be changed without notice. Make 8B 8C 8D 85 86 87 5D 51 7B F1 F2 Break F0 8B F0 8C F0 8D F0 85 F0 86 F0 87 F0 5D F0 51 F0 7B X X 5.2.1997 14 EM83049 KEYBOARD ENCODER 110 112 1 2 3 17 16 114 113 4 18 115 6 5 19 21 20 116 117 118 119 7 8 9 10 22 23 120 26 122 123 15 13 12 11 25 24 121 29 28 27 124 125 126 75 80 85 90 95 100 76 81 86 91 96 101 92 97 102 93 98 103 105 106 32 31 30 46 44 33 47 34 48 36 35 49 37 51 50 39 38 53 52 40 43 41 55 54 83 57 108 61 60 58 64 62 104 79 84 89 99 124 125 126 75 80 85 90 95 100 76 81 86 91 96 101 92 97 102 93 98 103 Fig 1. The 101-key keyboard layout 110 112 2 1 3 17 16 114 113 4 18 115 5 19 6 20 21 116 117 118 119 7 8 9 10 22 23 120 12 11 25 24 121 26 122 123 15 13 27 28 43 32 31 30 46 44 33 47 34 48 36 35 49 50 37 51 39 38 53 52 40 54 106 42 41 55 105 83 57 108 61 60 58 64 62 79 84 89 99 104 124 125 126 75 80 85 90 95 100 76 81 86 91 96 101 92 97 102 93 98 103 Fig 2. The 102-key keyboard layout 110 112 2 1 3 17 16 114 113 4 18 115 5 19 6 20 21 116 117 118 119 7 8 9 10 22 23 24 120 12 11 25 121 26 122 15 13 27 123 28 43 30 31 32 46 44 33 47 34 48 35 49 36 50 37 51 38 52 39 53 40 54 41 55 106 42 57 105 APP 83 108 58 LWIN 60 61 62 RWIN 64 79 84 89 99 104 Fig 3. The 104-key keyboard layout * This specification are subject to be changed without notice. 5.2.1997 15 EM83049 KEYBOARD ENCODER ABSOLUTE MAXIMUM RATINGS Parameter Sym. Ratings Supply Voltage Input Voltage Output Voltage Temperature under bias Storage temperature VCC VIN VOUT TB TS -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 Parameter Sym. Operating voltage VCC Operating supply current Input leakage Input high voltage Input low voltage Output high voltage Output low voltage Output low voltage for LEDS Internal Pull-high resistance ( port 6,9 ) ICCI IIL VIH VIL VOH1 VOL1 VOL3 RPH1 Internal Pull-high resistance for DATA, CLK RPH2 Min. Typ. 4.5 5 Max. Unit 5.5 V 3 ±1 mA µA V V V V V KΩ KΩ 2.0 0.8 2.4 4.7 1.5 2.2 0.4 3.2 10 3 Condition Fosc=1.8432MHz VIN=VCC ,VSS I OH = - 6.0 mA I OL = 3.0 mA I OL = 10 mA AC ELECTRICAL CHARACTERISTICS Parameter Sym. Min. Typ. Max. Unit Time from DATA transition to falling edge of CLK T1 5 25 µS Time from rising edge of CLK to DATA transition Duration of CLK inactive Duration of CLK active Time to auxiliary device inhibit after clock 11 to ensure the auxiliary device does not start another transmission Time from inactive to active CLK transition, used to time when auxiliary device samples DATA System clock T2 T3 T4 T5 5 30 30 T4 - 5 50 50 50 µS µS µS µS T6 5 25 µS * This specification are subject to be changed without notice. FCLK 40 40 1.843 MHz 5.2.1997 16 EM83049 KEYBOARD ENCODER TIMING DIAGRAMS 1ST CLK CLK 10th CLK 2nd CLK T3 11th CLK T5 T4 T1 T2 Start Bit DATA Parity Bit Bit 0 Stop Bit Fig 3. Keyboard output data timings 1ST CLK I/O Inhibit 9th CLK 2nd CLK 11th CLK 10th CLK CLK T3 T4 T6 Start Bit DATA Bit 0 Parity Bit Stop Bit Fig 4. Keyboard input data timings APPLICATION CIRCUIT VCC R0 10µ DATA CLK C16 C17 XT C0 C1 C2 C3 3 4 5 6 7 8 9 10 11 12 13 14 C7 15 16 17 18 19 C8 20 C4 C5 C6 C9 P90 P91 NC NC XT OSCO 40 R-OSCI 39 VDD 38 CAPS 37 NUM 36 SCROLL 35 P67 34 P66 33 P65 32 NC P50 P51 P52 P53 P64 P63 P62 P61 P60 P54 P55 P87 26 P86 25 P85 24 P84 23 P83 22 VSS NC DATA CLK P56 P57 P80 P81 SCROLL 51K U1 1 2 31 30 29 28 27 P82 21 CAPS NUM R1 R2 R3 R4 R5 064 R6 R7 058 116 C0 126 C1 017 016 031 110 046 131 001 002 C2 018 030 032 045 047 132 112 003 C3 019 114 033 115 048 133 113 004 C4 020 021 034 035 049 050 006 005 C5 023 022 037 036 052 051 007 008 C6 024 028 038 117 053 056 013 009 C7 025 118 039 054 APP 119 010 C8 026 027 040 042 055 012 011 C9 125 C10 014 015 029 122 043 123 120 C11 091 092 093 061 090 084 076 C12 096 097 098 099 095 089 075 C13 101 102 103 104 100 105 085 086 C14 106 107 108 083 079 080 081 C15 044 057 C16 LWIN R7 R6 R5 R4 R3 R2 R1 R0 041 060 062 124 121 C15 C14 C13 C12 C11 C10 EM83049 C17 * This specification are subject to be changed without notice. KL KR RWIN 5.2.1997 17