Note:
Spaces are not used within the command structure.
MAC-SA5X User’s Guide
DS50002938A-page 30
2019 Microchip Technology Inc.
4.1.1
Sequence Number
The optional sequence number is used to match a response to an earlier command.
Commands issued with a sequence number between #01 and #FF will trigger a
response message that includes the same sequence number.
4.1.2
Arguments
The argument list follows the command name (or the sequence number, if included),
and always begins with a comma before each argument. Numbers and alphanumeric
arguments can be written as-is, but arguments that may contain punctuation should be
enclosed in double quotes to prevent ambiguity when parsing the command.
Within a quoted argument, the backslash character is a special escape character. It can
be used to escape the following sequences (Any other sequences result in the removal
of the backslash.):
TABLE 4-2:
ESCAPE SEQUENCES
Escape Sequence
Resulting Character
\r
Carriage return.
\n
New line/line feed.
\t
Horizontal tab.
\\
Backslash.
4.1.3
Command Checksum
An optional 8-bit checksum provides a measure of reliability to commands and
responses. If a checksum is included with a command, the response will also include
a checksum for verification purposes.
The checksum of a command is calculated as a running XOR of all the characters
between the opening ‘{‘ and the ‘|’ checksum delimiter. It is a two-byte ASCII represen-
tation (in hexadecimal) of the XOR.
{command#XX,argument1,”argument2”|CC}
For example, the hexadecimal checksum of the
{device?}
command would be
entered as:
{device?|27}
If the command is garbled in transmission, causing a mismatch between the contents
and the checksum, the C3 response will be
[!3]
indicating a bad checksum error (See
). The command should be re-sent.
4.2
RESPONSE STRUCTURE
The structure of a C3 response follows:
[#XX=value|XX]<CR><LF>
Where:
TABLE 4-3:
RESPONSE STRUCTURE
Field
Description
Usage
[
Indicates the start of a response.
Always
Summary of Contents for SA5 Series
Page 1: ...2019 Microchip Technology Inc DS50002938A Miniature Atomic Clock MAC SA5X User s Guide...
Page 28: ...MAC SA5X User s Guide DS50002938A page 28 2019 Microchip Technology Inc NOTES...
Page 46: ...MAC SA5X User s Guide DS50002938A page 46 2019 Microchip Technology Inc NOTES...
Page 60: ...MAC SA5X User s Guide DS50002938A page 60 2019 Microchip Technology Inc...
Page 62: ...MAC SA5X User s Guide DS50002938A page 62 2019 Microchip Technology Inc NOTES...