Table 5.2 LED Function Control Byte Bits
See also page 23. The LED pin can be used to indicate a variety of things in combination. The LED control byte controls which states make the LED pin active. The active state can
also be set either high or low by changing bit 7 in this byte. One purpose for these functions is to provide an FMEA-compliant mechanism for fault detection via an alternative path to
the serial comms path. Another is to provide an interrupt signal to a host controller to reduce the amount of required comms traffic. Another reason is to simply light an LED on a
sensing fault, a keypress, or a comms failure for diagnostic purposes.
Bit
1 =
0 =
Default
7
6
5
4
3
2
LED pin is active high polarity
Active on any key error: (cal, cal failed, low sig)
Active on any keypress
Active while in sleep
Active on eeprom error
LED pin is active low polarity
Key errors have no effect
Not active on any keypress
Inactive on Sleep
Inactive on eeprom error
Inactive on Mains sync error
0
1
1
0
1
1
Active on Mains sync error
Active on comms error (unrecognized command): LED pin is set active on error,
inactive again when ‘get last cmd’ is called, or part is reset.
1
Inactive on comms error
0
Host watchdog. Active if no host comms within any 2s period. Host reset pulse
length is 150ms. The host watchdog is not enabled until the first valid cmd
is received from the host.
Communications unmonitored
0
0
Table 5.3 Key Mapping
Some commands return bit fields related to keys. For example, command 0x07 (report all keys) returns 6 bytes containing flag bits, one per key, to indicate which keys are reporting
touches. The following table shows the byte and bit order of the keys. The table contains the key number reported in each bit.
The key number is related to the X and Y scan lines which address each particular key. Each byte in the return stream represents one set of keys along a Y line, i.e. up to 8 keys.
Thus, key 0 is at location X0,Y0 and key 29 is at location X5,Y3. .
Bit (X line)
7
6
5
4
3
2
1
1
0
0
7
6
5
4
3
2
0
1
2
3
4
5
15
23
31
39
47
14
22
30
38
46
13
21
29
37
45
12
20
28
36
44
11
19
27
35
43
10
18
26
34
42
9
8
17
25
33
41
16
24
32
40
Byte
(Y line)
Note: Byte 0 is returned first.
lQ
25
QT60486-AS R8.01/0105