ETC UR5HCSPI-XX-FB

SPICoderTM UR5HCSPI
Extremely Low-Power Keyboard Encoder
& Power Management IC for H/PCs
HID & SYSTEM MANAGEMENT PRODUCTS, H/PC IC FAMILY
DESCRIPTION
FEATURES
The SPICoderTM UR5HCSPI
keyboard encoder and power
management IC is designed
specifically for handheld PCs
(H/PCs). The off-the-shelf
SPICoderTM will readily work with
CPUs designed for Windows® CE,
saving OEMs significant
development time and money as
well as minimizing time-to-market for
the new generations of handheld
products.
• SPI-compatible keyboard encoder
and power management IC
• Compatible with Windows® CE
keyboard specification
• Extremely low power consumption
— typically consuming less than
2 µA between 3-5V
• Offers overall system power
management capabilities
Three main design features of the
SPICoderTM make it the ideal
companion for the new generation
of Windows® CE-compatible,
single-chip computers: low-power
consumption; real estate-saving
size; and special keyboard modes.
• StrongARMTM handheld PCs
• Windows® CE platforms
• Web phones
• Personal digital assistants (PDAs)
• Wearable computers
• Internet appliances
_ATN
_SS
SCK
MOSI
MISO
XSW
SW0
C8
C9
C10/WUKO
C11/_LID
C6
C7
Vx
NC
_WKU
_RESET
Vcc
OSCI
OSCO
NC0
NC
PIN ASSIGNMENTS
_PWR_OK
NC0
OSCO
OSCI
Vcc
NC
NC
_RESET
_WKU
Vx
C7
33
34
6
23
22
UR5HCSPI-FB
QFP
44
1
12
11
NC
LED2
LED1
LED0
_IOTEST
Vss
NC
R7
R6
R5
R4
C5
C4
C3
C2
C1
C0
R0
R1
R2
R3
R4
1
40
39
UR5HCSPI-FN
PLCC
34
7
12
17
18
The SPICoderTM also offers
programmable features for wake-up
keys and general purpose I/O pins.
SPICoder is a trademark of Semtech Corporation.
All other trademarks belong to their respective
companies.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
23
29
28
NC
R5
R6
R7
Vss
NC
_IOTEST
LED0/GIO0
LED1/C13
LED2/C12
C11/_LID
Finally, special keyboard modes
and built-in power management
features allow the SPICoderTM to
operate in harmony with the power
management modes of
Windows® CE, resulting in more
user flexibility and longer battery
life.
APPLICATIONS
C6
C5
C4
C3
C2
C1
C0
R0
R1
R2
R3
Extremely low power consumption
(less than 2 µA at 3 Volts), a must
for H/PCs, provides the host system
with both power management and
I/O flexibility, with almost no battery
drainage.
• Compatible with “system-on silicon”
CPUs for H/PCs
• Special keyboard and power
management modes for H/PCs,
including programmable “wake-up”
keys
• Scans, debounces, and encodes
an 8 x 12 matrix and controls
discrete switches and LED
indicators
1
www.semtech.com
_PWR_OK
_ATN
_SS
SCK
MOSI
MISO
XSW
SW0
C8
C9
C10/WUKO
ORDERING CODE
Package Options
44-pin, Plastic PLCC
44-pin, Plastic QFP
Pitch in mm
1.27 mm
0.8 mm
TA = -20° C to +85° C
UR5HCSPI-XX-FN
UR5HCSPI-XX-FB
Other Materials
SPICoderTM Eval. Board
Type
Evaluation Board
Order number
ASY5-SPI-XXX
Note: XX = different model/feature set, XXX = revision number
BLOCK DIAGRAM
MISO
R0-R8
MOSI
SCK
SS
SPI
Communication
Channel
Keyboard
Scanner
LED0
LED1
LED2
Keyboard
Matrix
&
ATN
Keyboard
State
Control
C0-C11
LEDs
PWR_OK
WKUP
IOTEST
WKU
System
Monitor
Input
Signals
Power
Management
Unit
LID
WUKO
XSW
SWO
LID Latch Monitor
Wake-Up Keys Only Signal
Switch External to Case
Switch
UR5HCSPI
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
2
www.semtech.com
FUNCTIONAL DESCRIPTION
The SPICoder consists
functionally of five major sections
as shown in the the block diagram.
These are the Keyboard Scanner
and State control, the LEDs, the SPI
Communication Channel, the
System Monitor and the Power
Management unit. All sections
communicate with each other and
operate concurrently.
TM
PIN DEFINITIONS
Mnemonic
VCC
VSS
VX
OSCI
OSCO
_RESET
PLCC
44
22
4
43
42
1
QFP
38
17
43
37
36
41
MISO
MOSI
SCK
_SS
_IOTEST
_WKU
R0-R4
R5-R7
C0-C5
C6-C7
C8-C9
34
35
36
37
24
2
13-17
19-21
12-7
6-5
31-30
29
30
31
32
18
42
8-12
13-15
7-2
1,44
26-25
C10/WUKO
C11/_LID
29
28
24
23
LED2
LED1
LED0
XSW
SWO
27
26
25
33
32
21
20
19
28
27
38
39
3,18
23,40
41
33
34
39-40
16,22
35
_ATN
_PWR_OK
NC
NC0
Type Name and Function
Power Supply: 3-5V
I
Ground
I
Tie to VCC
I
Oscillator input
O Oscillator output
I
Reset: apply 0V for orderly start up
SPI Interface Signals
O Master In, Slave Out
I
Master Out, Slave In
I
SPI clock
I
Slave Select: If not used tie to VSS
O Wake-Up Control Signals
I
I
Row Data Inputs
I
Port provides internal pull-up resistors
O Column Select Outputs
O
O
Multi-function pins
I/O C10 & “Wake-Up Keys Only” imput
I/O C11 & lid close detect input
Miscellaneous functions
I/O LED2 output
I/O LED1 output
I/O LED0 output
I
External discrete switch
I
Discrete switch
Power Management Pins
O CPU Attention Output
I
Power OK Input
No Connects: these pins are unused
NC0 should be tied to VSS or GND
Note: An underscore before a pin mnemonic denotes an active low signal.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
3
www.semtech.com
PIN DESCRIPTIONS
VCC and VSS
_IOTEST and _WKU
C10 / WUKO
VCC and VSS are the power
supply and ground pins. The
SPICoderTM will operate from a 3-5
Volt power supply. To prevent
noise problems, provide bypass
capacitors and place them as
close as possible to the IC with the
power supply. VX, where available,
should be tied to Vcc.
“Input Output Test” and “Wake Up”
pins control the stop mode exit of
the device. The designer can
connect any number of active low
signals to these two pins through a
17K resistor, in order to force the
device to exit the stop mode. A
sample circuit is shown on page 15
of this document.
OSCI and OSCO
All the signals are “wire-anded.”
When any one of these signals is
not active, it should be floating (i.e.,
these signals should be driven from
“open-collector” or “open-drain”
outputs). Other configurations are
possible; contact Semtech.
The C10 / WUKO pin acts
alternatively as column scan output
and as an input. As an input, the
pin detects the “Wake-Up Keys
Only” signal, typically provided by
the host CPU to indicate that the
user has turned the unit off. When
the device detects an active high
state on this pin, it feeds this
information into the “Keyboard State
Control” unit, in order to disable the
keyboard and enable the
programmed wake-up keys.
OSCI and OSCO provide the input
and output connections for the onchip oscillator. The oscillator can
be driven by any of the following
circuits:
- Crystal
- Ceramic resonator
- External clock signal
The frequency of the on-chip
oscillator is 2.00 MHz.
R0 - R7
The R0-R7 pins are connected to
the rows of the scanned matrix.
Each pin provides an internal pullup resistor, eliminating the need for
external components.
_RESET
C0 - C9
A logic zero on the _RESET pin will
force the SPICoderTM into a known
start-up state. The reset signal can
be supplied by any of the following
circuits:
- RC
- Voltage monitor
- Master system reset
C0 to C9 are bi-directional pins
connected to the columns of the
scanned matrix. When a column is
selected, the pin outputs an active
low signal. When the column is deselected, the pin turns into highimpedance.
C11 / _LID
The C11 / _LID pin acts in a similar
manner to the C10 / WUKO. This
pin is typically connected to the LID
latch through a 150K resistor, in
order to detect physical closing of
the device cover. When the pin
detects an active low state in this
input, it feeds this information into
the “Keyboard State Control” unit, in
order to disable keys inside the
case and enable only switches
located physically on the outer
body of the H/PC unit.
LED0, LED1 and LED2
These three pins provide an active
low drive for LED indicators. The
programming of these pins is
explained in the LEDs section on
page 8 of this document.
MOSI, MISO, SCK, _SS, _ATN
These five signals implement the
SPI interface. The device acts as a
slave on the SPI bus. The _SS
(Slave Select) pin should be tied to
ground if not used by the SPI
master. The _ATN pin is asserted
low each time the SPICoderTM has a
packet ready for delivery. For a
more detailed description, refer to
the SPI Communication Channel
section of this document.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
4
www.semtech.com
PIN DESCRIPTIONS (CONT’D)
THE WINDOWS® CE KEYBOARD
XSW
The following illustration shows a typical implementation of a Windows® CE
keyboard.
The XSW pin is dedicated to an
external switch. This pin is
handled differently than the rest of
the switch matrix and is intended
to be connected to a switch
physically located on the outside of
the unit.
power
1!
2@
3#
4$
5%
6^
7&
8*
9(
0)
-
~
`
Q
W
E
R
T
Y
U
I
O
P
=+
SW0
tab
The SW0 pin is a dedicated input
pin for a switch.
shift
A
S
Z
D
X
F
C
G
V
alt
ctrl
PWR_OK
The PWR_OK is an active low pin
that monitors the battery status of
the unit. When the SPICoderTM
detects a transition from high to
low on this pin, it will immediately
enter the STOP mode, turn the LED
off and remain in this state until the
batteries of the unit are replaced
and the signal is deasserted.
_
esc
H
B
J
N
K
M
; :
L
, <
. >
[{
]}
\ |
' "
/ ?
shift
Windows® CE does not support the following keyboard keys typically
found on desktop and laptop keyboards:
INSERT
SCROLL LOCK
PAUSE
NUM LOCK
Function Keys (F1-F12)
PRINT SCREEN
If the keyboard implements the Windows key, the following key
combinations are supported in the Windows® CE environment:
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
enter
Key Combination
Result
Windows
Windows+K
Windows+I
Windows+C
Windows+E
Windows+R
Windows+H
Ctrl+Windows+A
Open Start Menu
Open Keyboard Tool
Open Stylus Tool
Open Control Panel
Explore the H/PC
Display the Run Dialog Box
Open Windows® CE Help
Select all on desktop
5
www.semtech.com
“GHOST” KEYS
KEYBOARD SCANNER
In any scanned contact switch
matrix, whenever three keys
defining a rectangle on the switch
matrix are 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.
The encoder scans a keyboard organized as an 8 row by 12 column matrix
for a maximum of 96 keys. Smaller size matrixes can also be
accommodated by simply leaving unused pins open. The SPICoderTM
provides internal pull-ups for the Row input pins. When active, the encoder
selects one of the column lines (C0-C11) every 512 µS and then reads the
row data lines (R0-R7). A key closure is detected as a zero in the
corresponding position of the matrix.
Actual key presses
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 SPI communication channel.
N-KEY ROLLOVER
“Ghost”
Key
Figure 1: “Ghost” or “Phantom” Key
Problem
Although the problem cannot be
totally eliminated without using
external hardware, there are
methods to neutralize its negative
effects for most practical
applications. Keys that are
intended to be used in
combinations should be placed in
the same row or column of the
matrix, whenever possible. Shift
keys (Shift, Alt, Ctrl, Window) should
not reside in the same row (or
column) as any other keys. The
SPICoderTM has built-in mechanisms
to detect the presence of “ghost”
keys.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
In this mode, the code(s) corresponding to each key press are transmitted
to the host system as soon as that key is debounced, independent of the
release of other keys.
When a key is released, the corresponding break code is transmitted to the
host system. There is no limitation to the number of keys that can be held
pressed at the same time. However, two or more key closures, occurring
within a time interval of less than 5 ms, will set an error flag and will not be
processed. This feature is to protect against the effects of accidental key
presses.
6
www.semtech.com
KEYBOARD STATES
These states of operation refer only
to the keyboard functionality and,
although they are related to power
states, they are also independent of
them.
(LID = 0) AND (WUK0=0)
AND Key Press
Send
XSW Key
Only
(LID = 1) AND (WUKO=0)
AND Key Press
"Send All Keys"
WUKO=1
AND Key Press
Entry Conditions: Power on reset,
soft reset, PWR_OK =1,
{(LID=1) AND (WUKO=0)}
Exit Conditions: PWR_OK = 0 ->
"Send No Keys"(WUKO=1) AND
(Key Press) -> "Send Wake-Up
Keys Only"(LID = 0) AND
(WUKO=0) AND (Key Press) ->
"Send XSW Key Only"
Description: This is the SPICoderTM’s
normal state of operation, accepting
and transmitting every key press to
the system. This state is entered
after the power-on and is sustained
while the unit is being used.
“Send Wake-Up Keys Only”
Entry Conditions:(WUKO=1) AND
(Key or Switch press)
Exit Conditions: Soft Reset -> “Send
All Keys”PWR_OK = 0 -> “Send No
Keys”
Description:This state is entered
when the user turns the unit off. A
signal line driven by the host will
notify the UR5HCSPI about this
state transition. While in this state,
the UR5HCSPI will transmit only
keys programmed to be wake-up
keys to the system. It is not
necessary for the UR5HCSPI to
detect this transition in real time,
since it does not effect any
operation besides buffering
keystrokes.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
Send All
Keys
WUKO =1
AND Key
Press
(PWR_OK =1)
AND (LID = 0)
AND (WUKO=0)
AND Key Press
Soft Reset
PWR_OK ↓
Send Wake
Up Keys
Only
PWR_OK ↓
(PWR_OK =1)
AND (WUKO=0)
AND (LID=1)
AND Key Press
PWR_OK = 0
PWR_OK ↓
(PWR_OK =1) AND Key Press
AND (WUKO = 1)
Send
No Keys
Figure 2: The UR5HCSPI implements four modes of keyboard and switch operation.
“Send No Keys"
Entry Conditions:PWR_OK
transition from high to low
Exit Conditions: (PWR_OK = 1)
AND (Matrix key pressed OR
Switch OR _WKUP)
Description: This state is entered
when a PWR_OK signal is asserted
(transition high to low), indicating a
critically low level of battery
voltage. The PWR_OK signal
causes an interrupt to the
SPICoderTM, which guarantees that
the transition is performed in real
time. In this state, the SPICoderTM
will perform as follows:
1. The LED is turned off.
Nevertheless, its state is saved and
restored after exiting the disabled
state (change of batteries).
2. The SPICoderTM enters the STOP
mode for maximum energy
conservation.
7
3. Stop mode time-out entry is
shortened to conserve energy
further.
4. While in this state all interrupts
are disabled. The SPICoderTM exits
this state on the next interrupt event
that detects the PWR_OK line is deasserted.e
“Send XSW Key Only"
Entry Condition: (LID=0) AND
(WUKO=0) AND (Key Press)
Exit Condition: (LID=1) AND
(WUKO=0) AND (Key Press) ->
“Send All Keys”PWR_OK = 0 ->
“Send No Keys”
(WUKO = 1) AND (Key Press) ->
“Send Wake Up Keys Only”
Description: This state is entered
upon closing the lid of the device.
While in this state, the encoder
transmits only the XSW key, which
is located outside the unit. This
feature is designed to
accommodate buttons on the
outside of the box, such as a
microphone button, that need to be
used while the lid is closed.
www.semtech.com
KEY CODES
LED MODES
Key codes range from 01H to 73H
and are arranged as follows:
Make code = column_number * 8 +
row_number + 1
XSW = 71H
SW0 = 72H
2
3
meta blink count
on
on
on
off
on
off
off
off interval
on interval
Break code = Make code OR 80H
Discrete Switches transmit the
following codes:
1
on
meta blink off
1 blinking cycle
Figure 3: The behavior of an LED using the settings 1: LED on; 0: LED off.
The SPICoderTM provides three LED pins. There are three LED modes: off,
on, and blinking. The LED can be individually set to one of these modes. In
the blinking mode, both the on-interval and the off-interval can be
individually set. Additionally, a meta blink count and meta blink interval may
be specified. This describes an interval of a different length which may be
inserted after each specified number of blinks. All the intervals are based
on a 1/16th of a second duration. When the LED is on or blinking, the
SPICoderTM does not enter the STOP Mode unless the PWR_OK signal is
asserted low. In this case, the device saves the status of the LED and turns
it off. The default LED mode is off.
The above timing chart describes the behavior of an LED using these
settings,1: LED on; 0: LED off.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
8
www.semtech.com
SPI COMMUNICATION CHANNEL
SPI data transfers can be performed at a maximum clock rate of 500 KHz. When the SPICoderTM asserts the _ATN
signal to the host master, the data is already loaded into the data register waiting for the clocks from the master.
The Slave Select (SS) line can be tied permanently to ground if the SPICoderTM is the only slave device in the SPI
network. One _ATN signal is used per each byte transfer. If the host fails to provide clock signals for successive
bytes in the data packet within 120 ms, the transmission is aborted and a new session is initiated by asserting a
new ATN signal. In this case, the whole packet is re-transmitted.
If the SPI transmission fails 20 times consecutively, the synchronization between the master and slave may be lost.
In this case, the SPICoderTM enters the reset state.
The SPICoderTM implements the SPI communication protocol according to the following diagram:
CPOL = 0 ---------- SCK line idles in low state
CPHA = 1 ---------- SS line is an output enable control
_ATN SIGNAL
SCK (CPOL=0)
_SS
SAMPLE INPUT
DATA OUTPUT
(CPHA=1)
?
MSB
BIT 6
BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
LSB
Figure 4: SPI Communication Protocol
When the host sends commands to the keyboard, the SPICoderTM requires that the minimum and maximum
intervals between two successive bytes be 200 µs and 5 ms respectively.
Figure 5: Transmitting Data Waveforms:
Figure 6: Receiving Data Waveforms
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
9
www.semtech.com
DATA / COMMAND BUFFER
POWER MANAGEMENT UNIT
The SPICoder implements a data
buffer that contains the key
code/command bytes waiting to be
transmitted to the host. If the data
buffer is full, the whole buffer is
cleared and an "Initialize" command
is sent to the host. At the same
time, the keyboard is disabled until
the "Initialize" or "Initialize Complete"
command from the host is received.
The SPICoderTM supports two modes of operation. The following table lists
the typical and maximum supply current (no DC loads) for each mode at
3.3 Volts (+/- 10%).
TM
Current
RUN
Typical
1.5 1
Max
3.0
Unit
mA
STOP
2.0
20
µA
Description
Entered only while data/commands
are in process and if the LEDs
are blinking
Entered after 125 ms of inactivity if
LEDs is low
Power consumption of the keyboard sub-system is determined primarily by
the use of the LEDs. While the SPICoderTM is in the STOP mode, an active
low Wake-Up output from the master must be connected to the edgesensitive _WKU pin of the SPICoderTM. This signal wakes up the
SPICoderTM in order to receive data from the master host. The master host
needs to wait a minimum of 5 ms prior to providing clocks to the
SPICoderTM. The SPICoderTM enters the STOP mode after a 125 ms period
of keypad and/or host communications inactivity, or anytime the PWR_OK
line is asserted low by the host. Note that while one or more keys are held
pressed, the SPICoderTM does not enter the STOP mode until every key is
released.
Figure 7: The power states of the
-
SPICoderTM
Keyboard
Switch
Input transaction
System wake-up
Stop
After Reset
or 125 ms of
inactivity
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
10
Run
While processing
current task
and/or LED(s)
are active
- After 125 ms of
inactivity and LEDs
are off
www.semtech.com
COMMUNICATION PROTOCOL
There are eight commands that may be sent from the SPICoderTM to the host, and ten commands that may be sent
from the host to the SPICoderTM.
Each command from SPICoderTM to the host is composed of a sequence of codes. All commands start with
<CONTROL> code (80H) and end with LRC code (see the description of the LRC calculation on page 12).
Command details are listed below.
Commands to the Host - Summary
Command Name
Code
Initialize Request
AOH
Initialize Complete
A1H
Heartbeat Response
A2H
Identification Response
F2H
LED Status Report
A3H
Resend Request
A5H
Description
Sent to the host when the data buffer is full
Issued upon completion of the “Initialize” command issued by the host
Response to “Heartbeat Request” issued by the host
Response to “Identification Request” issued by the host
Response to “LED Status Request”
Issued upon error during the reception of a packet
LRC CALCULATION
COMMANDS TO THE HOST ANALYTICALLY
The LRC is calculated for the
whole packet, including the
command code and the command
prefix. The LRC is calculated by
first taking the bitwise exclusive OR
of all bytes from the message. If
the most significant bit (MSB) of
the LRC is set, the LRC is modified
by clearing the MSB and changing
the state of the next most
significant bit. Thus, the packet
check byte will never consist of a
valid LRC with the most significant
bit set.
Initialize Request
<CONTROL>
<INIT>
<LRC>
80H
A0H
20H
The SPICoderTM sends the initialize request command to the host when its
data buffer is full.
Initialization Complete
<CONTROL>
<INIT COMPLETE>
<LRC>
80H
A1H
21H
The SPICoderTM sends the initialize complete report to the host when it
finishes the initialization caused by initialize command from the host.
Heartbeat Response
<CONTROL>
<ONLINE>
<LRC>
80H
A2H
22H
The SPICoderTM sends the heartbeat response to the host when it receives
the heartbeat request command from the host.
Identification Response
<CONTROL>
<ID>
<Vendor>
<Revision>
<Switch>
<LRC>
80H
F2H
02H
08H
00H
7EH
---Semtech
--- Rev 0.8A
.
The SPICoderTM sends the identification response to the host when it
receives the identification request command from the host.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
11
www.semtech.com
LRC CALCULATION (CONT’D)
COMMANDS FROM THE SPICODERTM TO THE HOST (CONT’D)
The following C language function
is an example of an LRC
calculation program. It accepts
two arguments: a pointer to a
buffer and a buffer length. Its
return value is the LRC value for
the specified buffer.
LED Status Report
<CONTROL>
<LED>
<Status 0>
80H
A3H
xxH
<Status 1>
xxH
<Status 2>
xxH
<LRC>
xxH
char Calculate LRC (char buffer,
size buffer)
{
char LRC;
size_t index;
/*
* Init the LRC using the first two
message bytes.
*/
LRC = buffer [0] ^ buffer [1];
/*
* Update the LRC using the
remainder of the buffer.
*/
for (index = 2; index < buffer; index
++)
LRC ^ = buffer[index];
/*
* If the MSB is set then clear the
MSB and change the next most
significant bit
*/
if (LRC & 0x80)
LRC ^ = 0xC0;
/* * Return the LRC value for the
buffer.*/}
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
LED0 status:( 0=OFF; 1=ON;
2=BLINKING; 3=NO LED MODE )
LED1 status:( 0=OFF; 1=ON;
2=BLINKING; 3=NO LED MODE )
LED2 status:( 0=OFF; 1=ON;
2=BLINKING; 3=NO LED MODE)
The SPICoderTM will send the LED status report to the host when it receives
the LED status request command from the host.
Resend Request
<CONTROL>
<RESEND>
<LRC>
80H
A5H
25H
The SPICoderTM will send this resend request command to the host when its
command buffer is full, or if it detects either a parity error or an unknown
command during a system command transmission.
12
www.semtech.com
COMMANDS FROM THE HOST TO THE SPICODERTM
Commands from the Host - Summary
Command Name
Code
Initialize
AOH
Initialization Complete
A1H
Heartbeat Request
A2H
Identification Request
F2H
LED Status Request
A3H
LED Modify
A6H
Resend Request
A5H
Input/Output Mode Modify
A7H
Output Data to I/O pin
A8H
Set Wake-Up Keys
A9H
Description
Causes the SPICoderTM to enter the power-on state
Issued as a response to the “Initialize Request”
The SPICoderTM will respond with “Heartbeat Response”
The SPICoderTM will respond with “Identification Response”
The SPICoderTM will respond with “LED Status Response”
The SPICoderTM will change the LED accordingly
Issued upon error during the reception of a packet
The SPICoderTM will modify or report the status of the GIO0 pin
The SPICoderTM will output a signal to the GIO0 pin
Defines which keys are “wake-up” keys
Each command to SPICoderTM is composed of a sequence of codes. All commands start with <ESC> code (1BH)
and end with the LRC code (bitwise exclusive OR of all bytes).
COMMANDS FROM THE HOST TO THE SPICODERTM ANALYTICALLY
Initialize
<ESC>
<INIT>
<LRC>
1BH
A0H
7BH
When the SPICoderTM receives this command, it clears all buffers and returns to the power-on state.
Initialization Complete
<ESC>
<INIT COMPLETE>
<LRC>
1BH
A1H
7AH
When the SPICoderTM receives this command, it enables transmission of keyboard data. Keyboard data
transmission is disabled if the TX output buffer is full (32 bytes). Note that if the transmit data buffer gets full, the
encoder issues an "Initialize Request" to the host.
Heartbeat Request
<ESC>
<ONLINE>
<LRC>
1BH
A2H
79H
When the SPICoderTM receives this command, it replies with the heartbeat response report.
Identification Request
<ESC>
<ID>
<LRC>
1BH
F2H
29H
The SPICoderTM replies to this command with the identification response report.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
13
www.semtech.com
COMMANDS FROM THE HOST TO THE SPICODERTM (CONT’D)
Set Wake-Up Keys
<ESC>
1BH
<SETMATRIX>
A9H
<COL0>
xxH
(xxH = bitmap for R7 R6 R5
R4 R3 R2 R1 R0: 0-enabled,
1-disabled)
<COL1>
xxH
<COL2>
xxH
<COL3>
xxH
<COL4>
xxH
<COL5>
xxH
<COL6>
xxH
<COL7>
xxH
<COL8>
xxH
<COL9>
xxH
<COL10>
xxH
<COL11>
xxH
<SWITCHES>
xxH
<LRC>
xxH
The "Set Wake-Up Keys" command
is used to disable specific keys
from waking up the host. Using this
command, the host can set only a
group of keys.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
LED Status Request
<ESC>
<LED>
<LRC>
1BH
A3H
78H
When the SPICoderTM receives this command, it replies with the LED Status
Report.
LED Modify
<ESC>
<MODLED>
<LED NUMBER>
<LED STATE>
1BH
A6H
xxH
xxH
<ON INTERVAL>
xxH
<OFF INTERVAL>
xxH
<META COUNT>
xxH
<META INTERVAL>
xxH
<LRC>
xxH
LED number (0)
(0=LED OFF; 1=LED ON; 2=LED
BLINKING)
Time in 1/16ths of a second for
LED to be on
Time in 1/16ths of a second for
LED to be off
Number of blinks after which to
apply meta blink interval
Time in 1/16ths of a second for
LED to be off after
<META COUNT> blinks
When the SPICoderTM receives this command, it changes the LED mode
accordingly.
14
www.semtech.com
Vin
MISO
29
MISO
MOSI
30
MOSI
31
SCK
21
LED2
20
LED1
LED0
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10/WUKO
C11/LID
7
6
5
4
3
2
1
44
26
25
24
23
COLUMN
OUTPUTS
17
VSS
35
NC0
XSW
SW0
28
27
DISCRETE
SWITCHES
Ceramic resonator circuit
with built in capacitors
Alternatively a 2MHz CMOS
signal can be tied directly
to OSC1
1MOhm
TO SWITCH
MATRIX
WKU
PWR_OK
IOTEST
34
ROW
INPUTS
42
150K
Power OK
Signal
www.semtech.com
Wake Up
Signal
15K
15
14
13
12
11
10
9
8
18
_WKUP
ATN
OSCO
Power OK Signal
PWR_OK
UR5HCSPI-FB
36
Attention Signal 33
_ATN
R7
R6
R5
R4
R3
R2
R1
R0
SS
Tied to Gnd
if not used
OSCI
Slave Select 32
37
SCK
19
43
38
Vpp
VDD
41
Alternatively an RC circuit
or Master Reset Signal
can be used
Vout
Telcom
TC54C4302ECB
GND
VCC
RESET
15
SUGGESTED SCHEMATIC FOR THE UR5HCSPI-FB
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
VCC
UR5HCSPI-FB
_LID
1.5M
WUKO
1.5M
2MHz
15K
15K
UR5HCSPI-FB V0.9
(c) 2000, USAR, A Semtech Co.
IMPLEMENTATION NOTES FOR THE SPICODERTM
The following notes pertain to the suggested schematic found on the
previous page.
The built-in oscillator on the SPICoderTM requires the attachment of a 2.00
MHz ceramic resonator with built-in load capacitors. You can use either an
AVX, part number PBRC-2.00 BR; or a Murata part number CSTCC2.00MG
ceramic resonator.
It may also be possible to operate with the 2.00 MHz crystal, albeit with
reduced performance. Due to their high Q, the crystal oscillator circuits
start-up slowly. Since the SPICoderTM constantly switches the clock on and
off, it is important that the ceramic resonator is used (it starts up much
quicker than the crystal). Resonators are also less expensive than crystals.
Also, if crystal is attached, two load capacitors (33 pF to 47pF) should be
added, a capacitor between each side of the crystal and ground.
In both cases, using ceramic resonator with built-in load capacitors, or
crystal with external load capacitors, a feedback resistor of 1 MegaOhm
should be connected between OSCI and OSCO.
Troubleshoot the circuit by looking at the output pin of the oscillator. If the
voltage is half-way between supply and ground (while the oscillator should
be running) --- the problem is with the load caps / crystal. If the voltage is
all the way at supply or ground (while the oscillator should be running) --there are shorts on the PCB.
Note: When the oscillator is intentionally turned OFF, the voltage on the
output pin of the oscillator is high (at the supply rail).
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
16
www.semtech.com
ELECTRICAL SPECIFICATIONS
Absolute Maximum Ratings
Ratings
Supply Voltage
Input Voltage
Current Drain per Pin
(not including Vss or Vdd)
Operating Temperature
UR5HCSPI
Storage Temperature Range
Thermal Characteristics
Characteristic
Thermal Resistance
Plastic
PLCC
Symbol
Vdd
Vin
I
Value
-0.3 to +7.0
Vss -0.3 to Vdd +0.3
25
Unit
V
V
mA
Ta
T low to T high
-40 to +85
-65 to +150
°C
Value
Unit
°C per W
Tstg -
Symbol
Tja
°C
60
70
DC Electrical Characteristics (Vdd=3.3 Vdc +/-10%, Vss=0 Vdc, Temperature range=T low to T high unless otherwise noted)
Characteristic
Symbol
Min
Typ
Max
Unit
Output Voltage (I load<10µA)
Vol
0.1
V
Voh
Vdd–0.1
Output High Voltage (I load=0.8mA)
Voh
Vdd–0.8
V
Output Low Voltage (I load=1.6mA)
Vol:
0.4
V
Input High Voltage
Vih
0.7xVdd
Vdd
V
Input Low Voltage
Vil
Vss
0.2xVdd
V
User Mode Current
Ipp
5
10
mA
Data Retention Mode (0 to 70°C)
Vrm
2.0
V
Supply Current (Run)
Idd
1.53
3.0
mA
(Wait)
0.711
1.0
mA
(Stop)
2.0
20
µA
I/O Ports Hi-Z Leakage Current
Iil
+/-10
µA
Input Current
Iin
+/- 1
µA
I/O Port Capacitance
Cio
8
12
pF
Control Timing (Vdd=3.3 Vdc +/-10%, Vss=0 Vdc, Temperature range=T low to T high unless otherwise noted)
Characteristic
Symbol
Min
Max
Frequency of Operation
fosc
Crystal Option
2.0
External Clock Option
dc
2.0
Cycle Time
tcyc
1000
Crystal Oscillator Startup Time
toxov
100
Stop Recovery Startup Time
tilch
100
RESET Pulse Width
trl
8
Interrupt Pulse Width Low
tlih
250
Interrupt Pulse Period
tilil
*
OSC1 Pulse Width
toh, tol
200
Unit
MHz
ns
ms
ms
tcyc
ns
tcyc
ns
*The minimum period tlil should not be less than the number of cycle times it takes to execute the interrupt service routine plus 21 tcyc.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
17
www.semtech.com
SPICODERTM BILL OF MATERIALS
UR5HCSPI-FB
Quantity
3
3
3
1
1
2
1
1
Manufacturer
Generic
Generic
Generic
Generic
Generic
Generic
TELCOM
AVX
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
Part#
330 Ohms
LED
15 K
150 K
1M
1.5 K
TC54VC4302ECB713
TC54VC2702ECB713
PBRC-2.00BR
18
Description
330 ohm resistor
LED used as LED0. LED1. LED2
15 K resistors
150 K resistors
1 M resistors
1.5 K resistors
IC volt detector CMOS 4.3V SOT23, for 5V operation
IC volt detector CMOS 2.7V SOT23, for 3.3V operation
2.00 MHZ ceramic resonator with built in capacitors, SMT
www.semtech.com
This Page Left Intentionally Blank
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
19
www.semtech.com
For sales information
and product literature,
contact:
HID & System Mgmt Division
Semtech Corporation
652 Mitchell Road
Newbury Park, CA 91320
[email protected]
http://www.semtech.com/
805 498 2111 Telephone
805 498 3804 Telefax
Semtech Western Regional Sales
805-498-2111 Telephone
805-498-3804 Telefax
Semtech Central Regional Sales
972-437-0380 Telephone
972-437-0381 Telefax
Semtech Eastern Regional Sales
203-964-1766 Telephone
203-964-1755 Telefax
Semtech Asia-Pacific Sales Office
+886-2-2748-3380 Telephone
+886-2-2748-3390 Telefax
Semtech Japan Sales Office
+81-45-948-5925 Telephone
+81-45-948-5930 Telefax
Semtech Korea Sales Sales
+82-2-527-4377 Telephone
+82-2-527-4376 Telefax
Northern European Sales Office
+44 (0)2380-769008 Telephone
+44 (0)2380-768612 Telefax
Southern European Sales Office
+33 (0)1 69-28-22-00 Telephone
+33 (0)1 69-28-12-98 Telefax
Central European Sales Office
+49 (0)8161 140 123 Telephone
+49 (0)8161 140 124 Telefax
Copyright ©1997-2001 Semtech Corporation. All rights reserved.
SPICoder and Self-Power Management are trademarks of Semtech
Corporation. Semtech is a registered trademark of Semtech
Corporation. All other trademarks belong to their respective
companies.
INTELLECTUAL PROPERTY DISCLAIMER
This specification is provided "as is" with no warranties whatsoever
including any warranty of merchantability, fitness for any particular
purpose, or any warranty otherwise arising out of any proposal,
specification or sample. A license is hereby granted to reproduce
and distribute this specification for internal use only. No other
license, expressed or implied to any other intellectual property
rights is granted or intended hereby. Authors of this specification
disclaim any liability, including liability for infringement of proprietary
rights, relating to the implementation of information in this
specification. Authors of this specification also do not warrant or
represent that such implementation(s) will not infringe such rights.
Copyright ©1997-2001 Semtech Corporation
DOC5-SPI-DS-118
20
www.semtech.com