User Manual

46
configured as digital inputs contain any meaningful information. A zero
indicates a low signal is applied to the input, while a one indicates a high
signal is applied.
Example:
Digital Inputs = P0_6, P0_5, P1_7, and P1_1.
Digital Input P0_6 = 0
Digital Input P0_5 = 1
Digital Input P1_7 = 0
Digital Input P1_1 = 1
Host -> Matrix Module – (Query Digital Pin Input State – Type 0x21)
< 0x05 0x01 0x05 0x21 0x27 0x04 >
Matrix Module -> Host – (Respond With Digital Pin Input State – Type 0xA1)
< 0x07 0x01 0x07 0xA1 0x40 0x02 0xEB 0x04 >
3. Query Analog Pin Values
– This message is used to read the values of the
analog input signals. The result is returned in a host message that gets sent
back from the Matrix module containing a two byte value (LSB to MSB), for
each of the eight potential analog inputs, with the 8, 10, 12, or 14 (depending
on ADC conversion resolution) least significant bits representing the voltage
applied to the inputs. Prior to reading the analog inputs the ADC conversion
settings need to be set as described in Section 4.2.7. Note that the most
significant bit of the conversion result is the sign bit.
Example:
ADC Settings: 1.25v Reference
10 Bit Resolution
Average 1 Reading
Analog Input P0_7 = 0.42v (10 bit value => 172 = 0x00AC)
Analog Input P0_6 = 1.07v (10 bit value => 438 = 0x01B6)
Host -> Matrix Module – (Query Analog Pin Values – Type 0x22)
< 0x05 0x01 0x05 0x22 0x28 0x04 >
Matrix Module -> Host – (Respond With Analog Pin Values – Type 0xA2)
< 0x15 0x01 0x15 0xA2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0xB6 0x01 0xAC 0x00 0x1B 0x04>