
Yb is used to gate another analog switch to ground, and if
the switches used do not have a break-before-make
characteristic, they should be guard-banded as shown to
prevent cross conduction from Cs to ground.
3 SERIAL INTERFACE
The QT60320D uses a serial interface to a host. This port
uses a simple ASCII protocol described in this section.
3.1 SERIAL PORT SPECIFICATIONS
The QT60320D uses a full-duplex asynchronous serial
interface with the following specifications:
Baud Rate:
Parity:
Length:
Stop bits:
9600
None
8 bits
1
These specifications hold if the device is operated from an
8MHz crystal or resonator.
The port can be directly connected to a like port of a host
MCU, or transmitted over a length of cable on a standard
RS232C interface to a PC or other device, with the aid of a
MAX232 type driver/receiver circuit.
3.2 COMMAND SET
The 60320 requires ASCII commands over the serial port in
order to send result data. The commands must be one of
those listed in Table 3-1. None of the commands should ever
be terminated with a CR or LF code. Each command is
self-contained and requires no terminator.
3.2.1 's' C
OMMAND
- B
UTTON
S
TATE
(Hex code 0x73) After an ‘s’ character is received, the E6S3
reports back the touch-state of the buttons; it responds by
transmitting back 4 bytes of data containing a total of 32 data
bits, where each bit represents the state of one button (Table
3-2).
Each byte holds the state of the buttons contained in a Y
column. The first byte corresponds to column Y1 while the
4th byte corresponds to column Y4. Bit 0 of each byte holds
the state of the button corresponding to X1; bit 7 holds the
state corresponding to X8.
Multiple key presses will show as
multiple bits being set in the data stream. The device
supports n-key rollover to a limit of all 32 keys.
Example:
The key at intersection X5/Y2 appears at bit 4 in
the second byte; if key X5/Y2 is touched the bit is set. All
untouched bits register as a ‘0'.
3.2.2 'S' C
OMMAND
- I
DENTIFICATION
R
EPORTING
(Hex code 0x53) The E6S3 board responds with the 7-byte
ASCII signature "32000xx" where x is the code revision.
3.2.3 'e' C
OMMAND
- E
RROR
R
EPORTING
(Hex code 0x65) This command allows the host to retrieve
the error status bits for all buttons, in 4 consecutive bytes
(Table 3-3). The byte and bit sequences are identical to that
described in conjunction with the 's' command (see prior).
The appropriate bits are set high when errors are detected.
The error may be caused either by a short across the button
or an open circuit at the button.
3.2.4 '/dXY' C
OMMAND
- D
ATA
S
IGNAL
R
EPORTING
(Hex codes 0x2F 0x64 X Y) This sequence reports back the
signal level and reference value for the key chosen. X and Y
are zero-referenced binary (not ASCII) values in the range
0..7 for X and 0..3 for Y to indicate the button for which data
is requested. If X=0 and Y=0, the device reports back with
the data for key X1 Y1. If X=3 and Y=1, the key selected is
X4 Y2. The last key is X8 Y4, so the highest /dXY command
is /d73 where '7' and '3' are in binary.
The device reports back with two bytes: the first is the
reference level, the second is the signal level. Both are
binary bytes of range 0..255.
3.2.5 '/DXY' C
OMMAND
- O
FFSET
&
C
OARSE
R
EPORTING
(Hex codes 0x2F 0x44 X Y) This
sequence reports back the fine offset
(R2R DAC) and coarse (Cz1, Cz2
bucking caps) values for the key
chosen. X and Y are zero- referenced
binary (not ASCII) values in the range
0..7 for X and 0..3 for Y to indicate the
button for which data is requested.
L
Q
7
QT60320D R1.11/12.07.03
Table 3-1 ASCII Command Set
Port Read.
Reads back the 4 bits of user port
pins I1..I4
0x49
I
Port Write.
Writes byte value
v
to the user
output pins O1..O8
0x4F v
Ov
Settings Write.
Writes the Gain or Threshold
value
v
for the chosen key at
A
0x2F 0x45 A v
/EAv
Settings Reporting.
Returns Gain and Threshold
levels for chosen key at
A
0x2F 0x65 A
/eA
Offset,Coarse Cal Reporting.
Returns coarse and offset values
for the key at location
X Y
0x2F 0x44 X Y
/DXY
Data Signal Reporting.
Returns signal and reference for
the key at location
X Y
0x2F 0x64 X Y
/dXY
Error reporting.
Returns 4 bytes corresponding to
error bits for each key
0x65
e
Identification command.
QT60320D responds with
signature "32000xx" where xx is
the code revision
0x53
S
Button State.
Returns 4 bytes of on/off status
for all buttons
0x73
s
Purpose
Hex
Code
ASCII
Code
Table 3-2 's' Command button state responses
X1/Y4
X2/Y4
X3/Y4
X4/Y4
X5/Y4
X6/Y4
X7/Y4
X8/Y4
4
X1/Y3
X2/Y3
X3/Y3
X4/Y3
X5/Y3
X6/Y3
X7/Y3
X8/Y3
3
X1/Y2
X2/Y2
X3/Y2
X4/Y2
X5/Y2
X6/Y2
X7/Y2
X8/Y2
2
X1/Y1
X2/Y1
X3/Y1
X4/Y1
X5/Y1
X6/Y1
X7/Y1
X8/Y1
1
BYTE #
0
1
2
3
4
5
6
7
BIT #