User Manual

Page 36 of 39
2. Query Digital Pin State
– This message is used to read the values of
the eight potential digital input signals. A bit mask for each digital
input/output signal is returned in a host message that gets sent back
from the FreeStar module. Only digital pins configured as 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 Pin Configuration – Inputs = PTC1, PTC5, PTD3, and
PTD4.
Digital Input PTC1 = 0
Digital Input PTC5 = 1
Digital Input PTD3 = 0
Digital Input PTD4 = 1
Host -> FreeStar Module – (Query Digital Pin State – Type 0x21)
< 0x01 0x05 0x21 0x27 0x04 >
FreeStar Module -> Host – (Respond With Digital Pin State – Type
0xA1)
3. Set Digital Pin State
– This message is used to write the values of
the eight potential digital output signals. A byte containing a bit mask
for each digital input/output signal is sent in a host message to the
FreeStar module. Only digital pins configured as outputs contain any
meaningful information. A zero indicates a low signal is applied to
the output, while a one indicates a high signal is applied.
Example:
Digital Pin Configuration – Outputs = PTA4, PTA5, PTA6,
and PTC0.
Digital Output PTA4 = 1
Digital Output PTA5 = 0
Digital Output PTA6 = 0
Digital Output PTC0 = 1
Host -> FreeStar Module – (Set Digital Pin State – Type 0x20)
< 0x01 0x06 0x20 0x24 0x4B 0x04 >
FreeStar Module -> Host – (Set Digital Pin State Acknowledged–
Type 0xA0)
< 0x01 0x05 0xA0 0xA6 0x04>