©Quantum Research Group Ltd.
Baud rate
Data length
Parity
Stop bits
Host command space, Tcm
Response delay to host, Tdr1
9,600 - 57,600
8 bits
None
1
m 50µs
Table 4-1,
also, Sec. 6
The host should not transmit a new command until the
last command has been processed and responded to
completion, plus 1ms.
Commands that are not recognized are ignored, and the host
should monitor for timeouts to detect these conditions. If this
occurs a new command should not be sent until the specified
timeout condition has expired.
Multi-byte return spacing, Tdr3 10µs to 2ms
The maximum timings shown in Table 4-1 and Section 6-5
are guaranteed provided that the part is operating within its
burst timing limitations described in Section 5.7. If the burst
timing is in violation, the response time to a command may
take considerably longer.
The actual baud rate is determined by Setup ^Q (page 25).
A UART command may consist of one or two bytes with a
m50us delay between command bytes. At the end of a full
command, the host must await a response from the sensor.
4.7 Parallel Scan Port
The sensor may take some time to process the host
command and respond. When it does so, it sends back 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 quickly for the host to accept it, the baud rate
should be lowered.
The parallel port can be used to directly replace an electro-
mechanical or membrane keyboard. The port is electrically
equivalent to a 4x4 switch matrix with the exception that the
response to a host scan requires up to 100µs. The XS inputs
(pins 19..22) are active high; only one XS line should ever be
driven high at a time (except for error scan, noted below); the
Figure 4-6 Filtering; SPI Slave-Only Connections
+5
+5
A typical UART communication sequence is as follows:
QT60161 Circuit
10K 10K
Host MCU
P_IN
1) Host sends a byte to the sensor.
X drives
(1 of 4
shown)
DRDY
SS
Xn
Ra
2) For 2-byte functions, a m50us delay is inserted by
the host and then the second byte is sent.
Ca
220
P_OUT1
SCK
47pF
Ra
Ra
Ra
Ra
3) If the sensor has a command echo or data to send
back, it does so. The delay from step 2 to step 3 is
shown in Table 4-1. The delay between successive
response bytes (if they occur) is parameter Tdr3
noted above.
Ca
Ca
SCK
MISO
MISO
Ca
Y Lines
(1 of 4
shown)
Yn
MOSI
MOSI
100
22pF
4) The sensor repeats (3) as necessary for multiple
byte responses.
Ca
P_OUT2
RESET
1K
(MS not
shown)
1nF
5) The sensor waits for the next command.
The host should wait for >1ms after a sequence before
initiating another transmission sequence to be sure
that the sensor has completed any residual activities
from the prior command. Commands that are sent to
the host prematurely will be ignored.
Figure 4-7 Filtering; SPI Master-Slave Connections
+5
QT60161 Circuit
10K
Host MCU
SS
X drives
(1 of 4
shown)
DRDY
SS
Xn
4.6 Sensor Echo and Data Response
The devices respond to each and every valid
command from the host with at least one return byte.
In the case of functions that do not send data back to
the host, the part returns the command itself as an
echo, but only after the function has been processed to
completion; this also holds for 2-byte functions where
the second byte is an operand: in these cases the
return byte is an echo of the command, not the
operand.
220
47pF
Ra
Ra
Ca
Ca
Ca
SCK
SCK
Ca
MISO
MISO
Y Lines
(1 of 4
shown)
Yn
MOSI
MOSI
100
22pF
Ra
1K
Ca
Ca
P_OUT
RESET
(MS not
shown)
One important exception to this is the recalibration
command ‘b’ which returns an acknowledgment
immediately rather than prior to the actual
recalibration.
1nF
Recommended Values of Ra & Ca for Figures 4-6 and 4-7
SPI Clock Rate
3MHz
750kHz
Ra
680
Ca
47pF
Commands that return data do not send back a
command echo. If desired, the command byte can be
verified via the 'l' (lowercase L) function; see page 25.
1,000
1,000
2,200
120pF
270pF
470pF
187.5kHz
93.75kHz
lQ
15
www.qprox.com QT60161B / R1.03