Code Mercenaries KeyWarrior24 User manual

Code Mercenaries
1
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
1. Features
• USB low speed interface
• Full USB V1.1/2.0 compliance
• Full USB HID 1.1 compliance
• 64 keys in 8x8 matrix or three incremental encoders and 9 keys
• Media control and application keys supported
• Two function shift keys to switch to a second and third key table
• Up to 34 macros with up to 31 keys each
• Factory programmed keyboard layout
• Custom chips for volume production
• Support for Caps lock, Num lock and Scroll lock LEDs on matrix chips
• Single +5V power supply
• Low power consumption: 40mA max.
• Available in 24 pin DIL and SOIC
1.1 Variants
KeyWarrior24 are available in three factory programmed versions with a fixed keyboard layout. KeyWarrior24-8 and KeyWarrior24-8M support a 8x8 key matrix. KeyWarrior24-8 is preprogrammed with general keyboard layouts. KeyWarrior24-8M is preprogrammed with media control keys like "Mute", "Play/Pause" etc. and general keyboard layouts. KeyWarrior24-S3 supports nine direct connected keys and three incremental encoders to produce key strokes from jog wheels and similar devices. KeyWarrior24-S3 is preprogammed with media controls and other keys typically used for jog wheels. Custom variants are available for production volumes.
KeyWarrior24-8
• Supports up to 64 keys in 8x8 matrix
• Preprogrammed with three layouts for general use, POS, and gaming
• Support for Caps lock, Num lock and Scroll lock LEDs
• Supports diodes in the key matrix
KeyWarrior24-8M
• Supports up to 64 keys in 8x8 matrix
• Preprogrammed with three layouts for media control and general use
• Supports Mute, Eject, Play/Pause, Forward, Backward,
• Support for Caps lock, Num lock and Scroll lock LEDs
• Supports diodes in the key matrix
KeyWarrior24-S3
• Supports three incremental encoders
• Encoder pulses turned into key strokes
• Supports nine direct connected keys
• Supports Mute, Eject, Play/Pause, Forward, Backward,
• Preprogrammed for media control and general use
2. Functional Overview
KeyWarrior24 is a low cost variant of the KeyWarrior family. It is primarily designed to reduce hardware requirements and costs for smaller keyboard designs that don't need the complexity of the main KeyWarrior family line. KeyWarrior24 supports USB only and uses a factory programmed keyboard layout. This reduces the external circuitry to almost zero. The standard KeyWarrior24 chips are available as off the shelf standard parts with a fixed keyboard layout. For production volumes (>100) it is possible to order KeyWarrior24 with a custom key layout, including up to 34 macros. KeyWarrior24 implements the KeyWarrior Commander macro function, restricting the number of macros to 34 (instead of 48), while retaining all the other options, like using up to 31 keycodes per macro and assigning each of the macros to any of the 64 keys or three encoders and nine keys and any of the three FN-levels.
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
FFFFiiiixxxxeeeedddd PPPPrrrrooooggggrrrraaaammmm UUUUSSSSBBBB KKKKeeeeyyyybbbbooooaaaarrrrdddd CCCCoooonnnnttttrrrroooolllllllleeeerrrr FFFFaaaammmmiiiillllyy
yy
SSSSuuuupppppppplllleeeemmmmee
ee
nnnntttt ttttoooo tttthhhheeee KKKKeeeeyyyyWWWWaaaarrrrrrrriiiioooorrrr DDDDaaaattttaaaa SSSShhhheeeeeeeett
tt
Code Mercenaries
2
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
3. Pin Configuration
KeyWarrior24-8-P
KeyWarrior24-8M-P
DIL24
KeyWarrior24-8-S
KeyWarrior24-8M-S
SOIC24
KeyWarrior24-S3-P
DIL24
KeyWarrior24-S3-S
SOIC24
TOP VIEW!
1 2 3 4 5 6 7 8 9 10 11 12 13
14
15
16
17
18
19
20
YYYY00
00
YYYY11
11
YYYY22
22
YYYY66
66
YYYY33
33
XXXX0000////SSSSccccrrrroooollllll
ll
XXXX44
44
XXXX1111////NN
NN
uuuumm
mm
XXXX2222////CCCCaaaappppss
ss
XXXX33
33
GGGGNNNNDD
DD
DDDD++
++
PPPPuuuullllllllTTTTooooGGGGNNNNDD
DD
DD
D
D----
VVVVrrrreeeegg
gg
VVVVcccccc
cc
NNNNCC
CC
NNNNCC
CC
YYYY55
55
YYYY44
44
21
22
23
24
XXXX66
66
XXXX77
77
YYYY77
77
XXXX55
55
1 2 3 4 5 6 7 8 9 10 11 12 13
14
15
16
17
18
19
20
AAAA00
00
BBBB00
00
AAAA11
11
SSSSwwww88
88
BBBB11
11
SSSSwwww00
00
SSSSwwww44
44
SSSSwwww11
11
SSSSwwww22
22
SSSSww
ww3333
GGGGNNNNDD
DD
DDDD++
++
PPPPuuuullllllllTTTTooooGGGGNNNNDD
DD
DDDD--
--
VVVVrrrreeeegg
gg
VVVVcccccc
cc
FFFFu
uuullllll
ll
NNNNCC
CC
BBBB22
22
AAAA22
22
21
22
23
24
SSSSwwww66
66
SSSSwwww77
77
////EEEEnn
nn
SSSSwwww55
55
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
Code Mercenaries
3
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
4. Pin Descriptions KeyWarrior24-8/KeyWarrior24-8M
4.1 Pin Functions KeyWarrior24-8/8M D+, D-
Differential data lines of USB. Connect these signals direct to the USB cable or type B plug.
Vreg
Regulated 3V output, to be used only for the purpose of powering the USB D- pull up resistor. Do not use this pin as a supply for any other circuit than the pull up resistor.
X0/Scroll, X1/Num, X2/Caps, X[3:7]
Matrix horizontal inputs. These eight lines are read by KeyWarrior to detect pressed keys. X0, X1, X2 are also used to drive the Scroll, Num, and Caps Lock LEDs. An external driver transistor is required for each LED (see application circuit). The LEDs will glow faintly when a key on the same row is pressed. Internal pull up resistors are activated on device reset.
Y[0:7]
Vertical matrix outputs. These open drain outputs are periodically pulled low to detect pressed keys. No internal or external pull up resistors.
Pull to GND
This pin is used during production of the KeyWarrior chips, connect to GND.
GND
Power supply ground.
Vcc
Supply voltage.
Name
I/O
Type
Pins
Description
D+, D-
Y0, Y1, Y2, Y3, Y4, Y5, Y6, Y7 I/OOspecial
open drain outputs
16, 15
1, 2, 3, 4, 24, 23, 22, 21
USB differential data lines
Y lines for key matrix. These lines are periodically pulled low, between matrix scan they are high impedance.
X0/Scroll, X1/Num, X2/Caps, X3, X4, X5, X6, X7
PullToGND
GND
Vcc
I/OIinputs with internal pull ups, X0, X1, X2 open drain I/O
Power supply
Power supply
5, 20, 6, 19, 7, 18, 8, 17
10
X lines for key matrix. Between matrix scan X0, X1, X2 are used as outputs for the keyboard LEDs
Used during manufacturing, connect to GND
914Ground
Supply voltage
Vre gNCO-Regulated 3V out
11
12, 13
Power for D- pullup resistor
do not connect
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
Code Mercenaries
4
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
4 Pin Descriptions KeyWarrior24-8/KeyWarrior24-8M
V 1.1.0, May xxx 2011, for chip revision 1.1.1.4 DRAFT!
Code Mercenaries
4
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
4.2 Pin Descriptions KeyWarrior24-S3
4.3 Pin Functions KeyWarrior24-S3
D+, D-
Differential data lines of USB. Connect these signals direct to the USB cable or type B plug.
Vreg
Regulated 3V output, to be used only for the purpose of powering the USB D- pull up resistor. Do not use this pin as a supply for any other circuit than the pull up resistor.
A0, B0, A1, B1, A2, B2
Encoder inputs. Up to three incremental encoders with quadrature signals may be connected here. Key generation is triggered on the rising edge of A, the status of B is then used to determine which one of two codes is generated. The assigned keys are pressed and released immediately. Macros can be assigned to encoders. Internal pull up resistors are activated on device reset.
Sw[0:8]
Inputs for the nine keys. Switches closing to ground should be connected here. Internal pull up resistors are activated on device reset.
/En
Enable output for the power supply to the encoders. To meet USB standby power specifications it is necessary to disable the power supply to the encoders during USB suspend status. Power to the encoders must be supplied only when this pin is low.
Full
Pulling this pin high reduces the encoder resolution to full pulses, i.e. a key stroke is generated only after a full encoder step with four edges on the A/B lines did happen. Internal weak pull down resistor.
Pull to GND
This pin is used during production of the KeyWarrior chips, connect to GND.
GND
Power supply ground.
Vcc
Supply voltage.
Name
I/O
Type
Pins
Description
D+, D-
A0, B0, A1, B1, A2, B2
I/OIspecial
inputs with internal pull ups
16, 15
1, 2, 3, 4, 24, 23, 22, 21
USB differential data lines
A, B inputs for three encoders
Sw0..Sw8
/En
Full PullToGND
IOinputs with internal pull ups
open drain output with internal pull up
I
input, internal weak pull down
5, 20, 6, 19, 7, 18, 8, 17
Inputs for the nine direct connected keys. Switches should close to ground
Enable output to control power to the encoders, encoders actie when low
1210Pull high to reduce encoder resolution to full pulses Used during manufacturing, connect to GND
GND
Vcc
Vre gNCPower supply
Power supply
O-Regulated 3V out
914Ground
Supply voltage
1113Power for D- pullup resistor
do not connect
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
Code Mercenaries
5
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
5. Device Operation
KeyWarrior24 registers as a standard HID keyboard and supports boot protocol. It does not need any special drivers to be installed, standard system drivers are sufficient. The country code is 0 for not localized hardware, which allows to use a single version of the chip for all international keyboard layouts. Usage codes are defined for 0 to 164, which include the Power key and the = sign in the keypad, as well as the compose keys for Asian languages and several special keys that may or may not be supported by individual operating systems. In addition the media control keys Mute, Play/ Pause, Eject, Fast Forward, Fast Backward,
5.1 Power Up
Every time the supply voltage is applied KeyWarrior24 executes an internal reset sequence. All internal pull up resistors are disabled upon power up and will be activated during the internal reset sequence.
5.2 Keyboard Scanning
KeyWarrior24 scans the keyboard matrix every t
scan
by sequentially pulling one of the Y lines low and then reading the status at the X lines. When the scan matrix changes status and then remains stable for t
debounce
KeyWarrior24 decodes the changes and generates scancodes. On KeyWarrior24-S3 the nine direct connected keys are checked every t
scan
and are decoded after
remaining stable for t
debounce
.
5.2.1 Encoder scanning
KeyWarrior24-S3 scans the encoder inputs at the highest rate possible. The actual rate depends on several parameters and is not static. The encoder inputs are not debounced. It is not recommended to use mechanical encoders without an external debouncing circuit. Key strokes are generated immediately upon detecting the rising edge on the A signal from an encoder when in Full mode, in quadrant mode a key is generated on every edge on A or B.
5.3 Key Rollover
KeyWarrior supports true n-key rollover. All keys in the matrix may be pressed at the same time without KeyWarrior missing any code. However due to the phantom key effect it can not be guaranteed that combinations of many keys are properly reported (see 5.3.1). USB has a limitation on how many keys can be reported at the same time. On USB any six keys plus all eight modifiers (GUI, Ctrl, Alt, Shift) may be pressed at the same time. If more than six ordinary keys are pressed an error state is reported. So USB has a 6-key plus modifiers rollover.
5.3.1 Phantom Keys
Phantom keys do occur when three or more keys in a keyboard matrix are pressed in a combination that leads to the matrix reading like a fourth key has been pressed. To avoid phantom keys diodes may be added to the keys. If diodes are used they have to be put in series with the key switches. The kathodes have to be connected to the Y lines and anodes to X lines. It is highly recommended to place all modifier keys on a single row or column and put diodes on all of them.
5.4 Custom Scancode Tables
The standard KeyWarrior24 has a fixed key table that is factory programmed. For production volumes it is possible to order KeyWarrior24 with an individual key layout. KeyWarrior uses a single table to translate the matrix coordinates to USB usage codes. This table is called the "Master Translation Table". For information on generating the Master Translation Table please refer to the document "Creating Custom KeyWarrior Scancode Tables".
5.5 Function Shift Keys
KeyWarrior24 allows the definition of two function shift keys. If one of these keys is pressed KeyWarrior uses a second or third translation table to convert matrix coordinates to USB usage codes. This allows a small keyboard to generate all functions of a full sized keyboard. The function shift key may be on any coordinate in the matrix, it is assigned by placing a special code in the corresponding table position.
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
Code Mercenaries
6
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
5.6 Macros
KeyWarrior24 supports the KeyWarrior Commander type macros. Up to 34 macros can be defined for custom controllers. Each macro can contain up to 31 key codes and can work either in a typing mode or stable mode. For more information on the macros please refer to the document "Creating Custom KeyWarrior Scancode Tables".
5.7 Media Control and Application Keys
KeyWarrior24 supports the most commonly used subset of the USB HID class usage page $0C (Consumer Controls). These keys are reported via a second interface that specifies usage $01 for General Consumer Device. The following keys are suppoted: $00B3 Fast forward $00B4 Rewind $00B5 Skip to next Ttrack $00B6 Skip to previous track $00B7 Stop $00B8 Eject $00CD Play/Pause $00E2 Audio mute $00E9 Volume increase $00EA Volume decrease $018A Launch email reader $0196 Launch internet browser Availability of these key functions may vary depending on the operating system used. KeyWarrior24-8M and KeyWarrior24-S3 use these keys in their standard layouts. The functions may be placed on any key including the rotary encoders on KW24-S3. Other consumer control keys can be made available for custom versions.
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
Code Mercenaries
7
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up
6. Key Tables of the Standard KeyWarrior24 Chips
The standard layouts of the KeyWarrior24 chips are intended to be used as fixed selections set by hard wiring the corresponding FN key coordinate, not as optional layouts to be selected by an actual FN key.
6.1 KeyWarrior24-8 Table with no FN key pressed
Generic layout with all main keyboard keys
US keyboard layout
X0 X1 X2 X3 X4 X5 X6 X7
Y0
Y1
7&
4$
8*
5%
9(
6^
A
F
B
G
C
H
D
I
E
J
Y2
Y3
Y4
Y5
1!
-_
2@
0)
, <
]}
. >
up
3#
=+
K
P
/?
\|
U
Z
L
Q
M
R
V
space
W
`~
N
S
O
T
X
l-alt
Y
r-alt
Y6
Y7
left
FN1
down
FN2
right
tab
[{
del
; :
caps
' "
esc
l-ctrl
l-shft`~return
Code Mercenaries
8
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44----
88
88
V 1.1.0, May xxx 2011, for chip revision 1.1.1.4 DRAFT!
6.1.1 KeyWarrior24-8 Table with no FN key pressed / USB Usage Codes
X0 X1 X2 X3 X4 X5 X6 X7
Y0
Y1
$24
$21
$25
$22
$26
$23
$04
$09
$05
$0A
$06
$0B
$07
$0C
$08
$0D
Y2
Y3
Y4
Y5
$1E
$2D
$1F
$27
$36
$30
$37
$52
$20
$2E
$0E
$13
$38
$31
$18
$1D
$0F
$14
$10
$15
$19
$2C
$1A
$35
$11
$16
$12
$17
$1B
$E2
$1C
$E6
Y6
Y7
$50
FN1
$51
FN2
$4F
$2B
$2F
$2A
$33
$39
$34
$29
$E0
$E1
$64
$28
Code Mercenaries
9
KK
KK
eeeeyyyyWW
WWaaaarrrrrrrriiii
oooorrrr22
22
44
44----
88
88
V 1.1.0, May xxx 2011, for chip revision 1.1.1.4 DRAFT!
6.1.2 KeyWarrior24-8 Table with FN1 key pressed
Layout for hex, special function, or POS keyboard.
US keyboard layout
X0
X1
X2
X3
X4
X5
X6
X7
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
X0 X1 X2 X3 X4 X5 X6 X7
Y0
Y1
num
num7
num/
num8
num*
num9
num-
num+
A
B
F1
F4
F2
F5
F3
F6
Y2
Y3
Y4
Y5
num4
num1
num5
num2
num0
num=
space
up
num6
num3
Enter
num=
num.
num00Falt-F4
C
D
F7
F10
E
alt-F5
alt-F1
alt-F6
F8
F11
F9
F12
alt-F2
l-alt
alt-F3
r-alt
Y6
Y7
left
FN1
down
FN2
right
tab
alt-F7
del
alt-F8
alt-F11
alt-F9
esc
l-ctrl
l-shft
alt-F10
return
Loading...
+ 19 hidden pages