qt60161b Quantum Research Group, qt60161b Datasheet - Page 13

no-image

qt60161b

Manufacturer Part Number
qt60161b
Description
16 Key Qmatrix Keypanel Sensor Ic
Manufacturer
Quantum Research Group
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
qt60161b-AS
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
qt60161b-ASG
Manufacturer:
FREESCALE
Quantity:
21 956
Part Number:
qt60161b-ASG
Manufacturer:
Atmel
Quantity:
10 000
See Section 3.15, page 10, for a description of the Alert pin
which can be used to reduce communication traffic.
4.4 SPI Master-Slave Mode
Refer to Figures 4-1, 4-2, and 4-4. In Master-Slave mode the
host and the sensor take turns being Master, with the host
always leading off in Master mode during an exchange. The
current Master always controls all 3 signal lines. The sensor
takes a variable amount of time to respond to the host,
depending on the nature of the function and its current and
pending tasks. The host, like the sensor, must idle in slave
mode when not sending a command.
Master/Slave requires 3 signals to operate:
MOSI - Master out / Slave in data pin - bidirectional - an input
SCK - SPI clock - bidirectional - an input pin when receiving
SS’ - Slave select - bidirectional framing control. When the
Internal pullup resistor note: The internal pullup resistor on
SS’ can range from 35k to 120k ohms. If RC filtering is used
on the SPI lines per Figure 4-7, this pullup resistance may not
be low enough to ensure adequate signal risetime and may
need to be augmented with external 10k pullups.
A command may consist of one or two bytes with a m50us
delay between command bytes. At the end of a full command,
the Master must go into Slave mode to await a response from
the sensor.
The sensor may take some time to process the host
command and respond. When it does so, it asserts SS’ low
and begins clocking its data. For multi-byte responses, the
bytes will be sent at intervals which may be somewhat
irregular depending on the request and the processing
load of the sensor. The host must be prepared to accept
the sensor data as it comes or there can be a data
overrun in the host. If the data returns too fast for the host
to accept it, the SPI clock rate should be lowered.
A typical Master-Slave function sequence is as follows:
lQ
1) Host enters Master mode. The sensor is already in
pin while the host is transmitting data; an output when the
sensor is transmitting data. The MOSI of the host and
slave should be tied together. The MISO lines are not used
on either part and should be left open.
data; an output pin when sending. The host must shift out
data on the falling edge of SCK; the QT60161B clocks data
in on the rising edge of SCK. Important note: SCK from
the host must be low before asserting SS’ low or high at
either end of a byte or the transmission will fail. SCK
should idle low; if in doubt, a 10K pulldown resistor should
be used. When the sensor returns data it becomes the
Master; data is shifted out by it on the falling edge of SCK
and should be clocked in by the host on the rising edge.
sensor is in slave mode, this pin accepts the SS’ control
signal from the host. In either data direction, SS' must go
low before and any during data transfer; it should not go
high again until SCK has returned low at the end of a byte.
In Master mode the sensor asserts control over this line, to
make the host a slave and to frame the data. This line
must idle high; the part includes an internal pullup resistor
and should be floated during idle times.
Slave mode.
©Quantum Research Group Ltd.
Host MCU
P_OUT
13
MISO
MOSI
P_IN
SCK
After the transmission sequence, the SPI lines float high or
are left to float in an indeterminate state (MOSI) until the next
transmission sequence is initiated by the host. The host
should wait for >1ms after a sequence before initiating
another transmission sequence.
See Section 3.15, page 10, for a description of the Alert pin
which can be used to reduce communication traffic.
SS
2) The host pulls SS’ low, then transfers one byte of
3) For 2-byte functions, (2) is repeated with m50us spacings
4) The host immediately places its SPI port into Slave mode,
5) When the sensor has a command echo or data to send
6) The sensor pulls SS’ low, then clocks out its response
7) The sensor repeats (6) as necessary for multiple byte
8) The sensor returns to slave mode.
command to the sensor via MOSI, then releases SS’ to
float high again.
between bytes.
floating SCK and MOSI’; SS’ stays floating.
back, it puts its SPI register in Master mode, taking control
over MOSI and SCK. SS' remains floating.
byte to the host, then floats SS’ high again.
responses.
X0OPA (Pin 13)
Slave-Only
Figure 4-1 Communications Option Jumpers
Vdd
High
High
Low
Low
Figure 4-2 SPI Connections
QT60xx5
DRDY
SS
SCK
MISO
MOSI
www.qprox.com QT60161B / R1.03
X0
X1
13
14
X0OPB (Pin 14)
L
High
High
Opt A
Low
Low
Host MCU
MISO
MOSI
10K
SCK
H
Vcc
SS
H
Opt B
Master-Slave
10K
L
To Matrix
SPI, Master/Slave
SPI, Slave only
Interface Type
Parallel
UART
QT60xx5
DRDY
SS
SCK
MISO
MOSI

Related parts for qt60161b