8I20 26
REFERENCE INFORMATION
CRC
LBP on the 8I20 uses CRC checking of all commands and data to insure validity.
The CRC used is a 8 bit CRC using the same polynomial as the Dallas/Maxim one wire
devices (X^8+X^5++X^4+X^0). The CRC must be appended to all LBP commands and all
returned data will have a CRC byte appended. Commands with no returned data (writes
or RPCs with no reads) will still cause a CRC byte to be returned, this CRC byte will always
be 00H.
FRAMING
Since LBP is a binary protocol with no special sync characters, the packet framing
must be determined by other methods. The 8I20s LBP implementation uses two different
framing models depending on whether it is in setup mode or operate mode.
In setup mode, framing is done by determining the end of the command by pre-
parsing the data stream. This is done so that relaxed interface timing is acceptable. Non-
realtime systems such as Windows and Linux cannot guarantee exact serial data timing
so timing based framing cannot be used. Timing based framing is still used to maintain
synchronization in case of aborted packets or noise but the timeout is set to the maximum
time (25.5 character times) or ~2.2 mS at 115200 baud. Because normal communication
will be framed by pre-parsing, this timeout delay need not be inserted between subsequent
commands.
When running in operate mode, the 8I20 uses timing based framing exclusively.
Timing based framing is more robust in noisy environments where bad packets may be
present, but it requires strict timing of the serial data stream. Packets sent to the 8I20 in
real time mode must be sent in a single packet with less than the LBP command timeout
between characters. The command timeout is set by SSLBP to be 4 character times (16
uSec at 2.5M baud). In operate mode, a delay of 16 uSec must always be inserted
between packets.