LapCoder™ UR5HCFJ8
Low-Power Keyboard Encoder
for Portable Systems
HID & SYSTEM MANAGEMENT PRODUCTS, KEYCODER® FAMILY
DESCRIPTION
The LapCoder™ UR5HCFJ8 is a
low-power keyboard encoder for
portable systems. It provides two
bi-directional channels for
communication with a BIOS-
compatible system as well as any
optional keyboard-compatible
device, such as a 101/102/104
desktop keyboard.
The LapCoder™ fully supports the
IBM standard keyboard protocol;
each key press generates one of
the scan codes designated in the
IBM technical reference manuals.
The LapCoder™ scans,
debounces, and encodes keys in
an 8 x16 matrix and supports
embedded numeric keypad
functions as well as alternate scan
codes for specific keys, so that a
keyboard with only 82 keys can
emulate the functionality of a
101/102/104 keyboard.
The LapCoder™ provides a fully
functional PS/2 port that can be
used by a standard
82/101/102/104 keyboard or
another 8042-compatible device,
such as an external numeric
keypad, an OCR, or a bar-code
reader. Input from both the matrix
and the external device is
multiplexed and presented to the
system as if it were coming from a
single source.
The features of the LapCoder™
make it ideal for use in
PC / AT / PS/2 laptop/notebook
designs that utilize the Fujitsu
FKB7211, 7316, or 1406 low-
profile, full-travel membrane
keyboard.
FEATURES
• Interfaces the Fujitsu FKB7211,
7316, 1406, or similar laptop /
notebook keyboard to a BIOS-
compatible system
• AT / PS/2-compatible
• Scans, encodes, and debounces
an 8 x 16 keyboard matrix
• Provides a hot-pluggable external
PS/2 port for a keyboard
• Can implement all functions of a
101/102/104 keyboard with only
82 keys
• Available in PLCC and Quad Flat
(QFP) packages
PRELIMINARY
APPLICATIONS
• Laptop/notebook computers
• Portable equipment
• Industrial keyboards
PIN DESCRIPTIONS
NUMLK
VX
_IRQ
_RESET
NC
NC
VCC
OSCIN
OSCOUT
EKC1
R7
R6
NUMLK
VX
VXA
_IRQ
_RESET
VCC
OSCIN
OSCOUT
EKC1
R7A
6
• Point of sale (POS) terminals
• Public information kiosks
R6
RP
KD
KC
EKC
EKD
CAPSLK
C0
C1
C2
C3
QFP
SCRLLK
R5
R4
R3
R2
R1
R0
C8
C9
C10
C11
RP
KD
KC
EKC
EKD
CAPSLK
C0
C1
C2
C3
C4
7
1
40
39
12
PLCC
34
17
18
23
29
28
R7
SCRLLK
R5
R4
R3
R2
R1
R0
C8
C9
C10
Semtech and KeyCoder are registered trademarks
of Semtech Corporation. LapCoder and Self-
Power Management are trademarks of Semtech
Corporation. All other trademarks belong to their
respective companies.
Copyright ©1997-2002 Semtech Corporation
DOC5-FJ8-DS-110
1
C4
C5
C6
C7
NC
VSS
C15
C14
C13
C12
NC
www.semtech.com
C4A
C5
C6
C7
VSS
NC
C15
C14
C13
C12
C11
ORDERING CODE
Keyboard
FKB7211
FKB7211
FKB1406
FKB1406
FKB7316
FKB7316
Package options
44-pin, Plastic PLCC
44-pin, Plastic QFP
44-pin, Plastic PLCC
44-pin, Plastic QFP
44-pin, Plastic PLCC
44-pin, Plastic QFP
Pitch
1.27 mm
0.8 mm
1.27 mm
0.8 mm
1.27 mm
0.8 mm
TA =
-40°C to +85°C
UR5HCFJ8-FN
UR5HCFJ8-FB
UR5HCFJ8-06-FN
UR5HCFJ8-06-FB
UR5HCFJ8-16-FN
UR5HCFJ8-16-FB
BLOCK DIAGRAM
NUMLK/CAPSLK/SCRLLK
3
Data Buffer
Status LEDs
Row Data Inputs
EKC1
Interrupt Control
Column Select
Ouputs
16
Keyboard Encoder
KC
KD
PC
Communication
Channel
8
R0-
R7
C0-
C15
EKC
EKD
8042 Emulation
(External Keyboard)
Communication
Channel
Copyright ©1997-2002 Semtech Corporation
DOC5-FJ8-DS-110
2
www.semtech.com
FUNCTIONAL DESCRIPTION
The LapCoder™ consists
functionally of the following major
sections, as shown in the block
diagram on the previous page: the
Keyboard Encoder, the PC
Communication Channel, the Data
Buffer, the Interrupt Control and the
8042 Emulation Channel. All
sections communicate with each
other and operate concurrently.
KEYBOARD ENCODER
The LapCoder™ continuously
scans an 8 row by 16 column
keyboard matrix for a maximum of
128 keys. Smaller-size keyboards
are supported, provided all unused
row lines are pulled to Vcc.
The IC selects 1 of the 16 column
lines (C0-C15) every 512 ms and
then reads the row data lines (R0-
R7). A key closure is detected as
a 0 in the corresponding position
of the matrix. A complete scan
cycle for the entire keyboard takes
approximately 9.2 ms. Each key
found pressed is debounced for a
period of 20 ms. Once the key is
verified, the corresponding key
code(s) are loaded into the
transmit buffer of the PC
communication channel.
PIN DEFINITIONS
Mnemonic
VCC
VSS
VX
VXA
RP
_RESET
OSCIN
OSCOUT
_IRQ
KD
KC
EKD
EKC
EKC1
PLCC
44
22
4
3
7
1
43
42
2
8
9
11
10
41
QFP
38
17
43
2
41
37
36
42
3
4
6
5
35
Type
I
I
I
I
I
I
I
O
I
I/O
I/O
I/O
I/O
Name and Function
Power supply:
+5V
Ground
Tie to Vcc
Tie to Vcc
Reserved:
Ties to Vcc
Reset:
Apply 0V for orderly start-up
Oscillator input
Oscillator output
Interrupt line:
Reserved for low-power
applications
Keyboard data:
Connects to PC
keyboard port clock line
Keyboard clock:
Connects to PC
keyboard port clock line
External keyboard data:
Connects to
external keyboard data line
External keyboard clock:
Connects
to external keyboard clock line
External keyboard clock 1:
Connects
to external keyboard clock line and is used
to generate an interrupt for every clock line
transition
Row data inputs
R0-R5
R6
R7
R7A
C0-C4
C5-C7
C8-C11
C12-C15
C4A
CAPSLK
NUMLK
SCRLLK
NC
32-37
6
39
40
13-17
19-21
31-28
37-24
18
12
5
38
23
27-32
1
34
8-12
13-15
26-23
21-18
7
44
33
16,22
39,40
I
I
I
I
O
O
O
O
O
O
O
O
Tie to R7
Column select outputs:
Selects 1 of
16 columns
Tie to C4
Caps lock LED
Num lock LED
Scroll lock LED
No connects:
These pins are unused.
Note:
An underscore before a pin mnemonic denotes an active low signal.
Switch Matrix Encoding
Each matrix location is
programmed to represent either a
single key or a key combination of
the IBM 101/102/104 standard
keyboard.
Scan Code Sets
The LapCoder™ supports all three
scan code sets. Scan code sets 1
and 2 are the default sets for AT /
PS/2 systems. Scan code set 3
allows the user to program
individual key attributes such as
make/break, Typematic, or single-
touch action. For more
information, refer to the IBM
technical reference manuals.
Copyright ©1997-2002 Semtech Corporation
DOC5-FJ8-DS-110
3
www.semtech.com
KEYBOARD ENCODER (CONT’D)
N-KEY ROLLOVER
Embedded Numeric Keypad
The LapCoder™ implements an
embedded numeric keypad. The
Numeric Keypad Function is
invoked by pressing the Num Lock
Key.
N-Key Rollover
N-key rollover means the code(s) corresponding to each key press are
transmitted to the host system as soon as that key is debounced,
independently of the release of other keys. If a key is defined to be
Typematic, the corresponding code(s) are transmitted while that key is held
pressed. When the key is released, the corresponding break code(s) are
then transmitted to the host system. If the released key happens to be the
most recently pressed, then Typematic Action is terminated. Several keys
can be held pressed at the same time. However, if two or more key
closures occur within a time interval of less than 5 ms, an error flag is set
and those closures are not processed. This protects against the effects of
accidental key presses.
GHOST KEYS
FN Key
A special FN Key has been
implemented which has the
following effects while it is held
pressed.
For the FKB7211 only:
“Ghost” Keys
•
•
•
•
Function Key F1 becomes F11
Function Key F2 becomes F12
Ctrl Left Key becomes Ctrl Right
Alt Left Key becomes Alt Right
In any scanned contact switch matrix, whenever three keys defining a
rectangle on the switch matrix are held pressed at the same time, a fourth
key positioned on the fourth corner of the rectangle is sensed as being
pressed. This is known as the “ghost” or “phantom” key problem.
Although the problem cannot be totally eliminated without using external
hardware, there are methods to
Actual key presses
neutralize its negative effects for most
practical applications. Keys that are
intended to be used in combinations or
are likely to be pressed at the same
time by a fast typist (i.e., keys located
in adjacent positions on the keyboard)
“Ghost”
Key
should be placed in the same row or
column of the matrix, whenever
possible. A shift key (Shift, Alt, Ctrl,
Windows) should share its row and its
column with as few other keys as
possible, and not with any key likely to
Figure 1:
“Ghost” or “Phantom” Key
Problem
be pressed at the same time.
The LapCoder™ has built-in mechanisms to detect “ghost” keys.
If Num Lock is set:
• Embedded numeric keypad
keys become regular keys.
If Num Lock is not set:
• Embedded numeric keypad keys
provide the same codes as a
numeric keypad when the Num
Lock is not set (Arrow Keys, PgUp,
PgDn, etc.)
Status LED indicators
The controller provides interfacing
for three LED shift status
indicators. All three pins are active
low to indicate the status of the
host system (Num Lock, Caps
Lock and Scroll Lock). They are
set by the system (AT / PS/2
protocol).
Copyright ©1997-2002 Semtech Corporation
DOC5-FJ8-DS-110
4
www.semtech.com
SPECIAL HANDLING
PC COMMUNICATION
The LapCoder™ implements all the
standard functions of
communication with a BIOS-
compatible PC/XT or AT / PS/2 host
system. Two lines, KC and KD,
provide bi-directional clock and
data signals. In addition, the
LapCoder™ supports all
commands from and to the system,
as described in the IBM technical
reference manuals.
The following table shows the
commands that the system may
send and their values in
hexadecimal.
Command
Set/Reset Status
Indicators
Echo
Invalid Command
Select Alternate
Scan Codes
Invalid Command
Read ID
Set Typematic
Rate/Delay
Enable
Default Disable
Set Default
Set All Keys
Typematic
Make/Break
Make
Typematic/Make/Break
Set Key Type
Typematic
Make/Break
Make
Resend
Hex Value
0xED
0xEE
0xEF
0xF0
0xF1
0xF2
0xF3
0xF4
0xF5
0xF6
0xF7
0xF8
0xF9
0xFA
0xFB
0xFC
0xFD
0xFE
Hot Plug-In of External
Device
The LapCoder™ detects the
presence of an external device. If
an external keyboard or other
device was not connected during
power-on and is connected at a
later time, the encoder issues a
reset to initialize the external
keyboard properly. After
communication has been
established, the encoder continues
to check for the presence of the
external keyboard. While the
external device is connected, the
encoder does not enter sleep
mode. If the device is
disconnected, the encoder
becomes aware of it. If a
subsequent connection takes
place, the controller reinitiates a
reset sequence. This unique
feature allows the user to connect
or disconnect an external device at
any time without resetting the
system.
The following table shows the
commands that the keyboard may
send to the system.
Command
Key Detection
Error/Overrun
Keyboard ID
BAT Completion Code
BAT Failure Code
Echo
Acknowledge (Ack)
Resend
Key Detection
Error/Overrun
Hex Value
0x00*
0x83AB
0xAA
0xFC
0xEE
0xFA
0xFE
0xFF**
*Code Sets 2 and 3
**Code Set 1
Table 3:
Keyboard Commands to the
System (AT / PS/2 protocol)
8042 Emulation Channel
The LapCoder™ fully emulates a
system’s keyboard port, available
to a standard 82/101/102/104
external keyboard or other 8042-
compatible device.
Communication with a keyboard-
compatible device is
accomplished by clock and data
lines via EKC and EKD pins,
respectively. A third pin, EKC1,
connects to the clock line and
interrupts the controller whenever
the external device initiates a
communication session. When
power is first applied, the controller
proceeds with the standard reset
sequence with the external device.
Data and commands initiated from
the external device are buffered in
the controller’s FIFO along with
data from the scanned matrix, and
then are presented to the system
as if they were coming from a
single source. After they are
acknowledged, commands and
data from the system are
transmitted to the external device.
Shift Status LEDs
Shift Status LEDs (Num Lock, Caps
Lock and Scroll Lock) indicate the
status of the system and are
controlled by commands sent from
the system. Set/Reset Status
Indicator commands from the
system are executed both by the
external keyboard and the
scanned matrix. For example, if
the user presses the Caps Lock
Key on either keyboard, the Caps
Lock LED is affected in both
keyboards. The LED status
indicators are properly set after
every new connection of an
external keyboard.
Reset
0xFF
Table 2:
Keyboard Commands from the
System (AT / PS/2 protocol)
These commands are supported in
the AT / PS/2 protocol and can be
sent to the keyboard at any time.
Copyright ©1997-2002 Semtech Corporation
DOC5-FJ8-DS-110
5
www.semtech.com