Instruction Manual
QTI Page 5 of 13 Revision: A
Form #: 30Z0250 Effective Date: 16 December 2009
Section 3: Serial Interface
The MCDT defaults to a low-power shut down mode. Upon receiving an RF message, the MCDT will send
the message via the serial port and then return to shut-down immediately. The user may initiate serial
communication by sending the MCDT two ASCII characters. After 1 minute of inactivity on the serial port,
the MCDT returns to low-power shut down mode. If the user disables the PUSH setting and the MCDT has a
new message on hold in the buffer, the shut-down mode will be prevented because this condition pulls the
Wakeup [I/O] line low.
The MCDT communicates over RS-485. Send a command followed by a carriage return (<CR>). Settings are
retained only until power is turned off unless the SAV command is used to store them to the unit’s flash
memory. When sending commands and queries, a two-digit hexadecimal checksum (cs) can be used to check
data integrity. This is done by preceding the command with “#” and following the command with the
checksum value and a carriage return. If a checksum is not desired, simply do not include the # or checksum
(cs) value.
SETTINGS
38400 baud, fixed
No parity
8 bit
1 stop bit
No flow control
Checksum:
To use checksum begin the command with “#” and end the command with the calculated checksum (cs) value
followed by the carriage return <CR>. A command with an invalid checksum is ignored and no reply is sent.
The checksum is a 2 digit hexadecimal calculated as the 2’s compliment of the sum of the command string.
Using the checksum also allows and requires using the serial ID. The universal ID is X, so all units will
acknowledge these commands. The unit will respond with its specific ID
Example:
Sample syntax:
Action
With Checksum
Without Checksum
Get channels:
#XCHN04<CR>
CHN<CR>
Returns:
#AChnR 2 ChnX 456B0<CR>
CHNR 2 CHNX 456<CR>
Set channels to 2:
#XCHN 2B2<CR>
CHN 2<CR>
Returns:
#ACHNR 2 CHNX 21D<CR>
CHNR 2 CHNX 2<CR>
Note: “A” is just a sample serial ID, and may be different.
Example checksum calculator
char CRC2sComp( char *buffr, int end)
{//creates 2's complement
int c;
int calcSum = 0;
for( c = 0; c <= end; c ++ )
calcSum += buffr[c];
calcSum ^= 0xFF; //1's complement
calcSum += 1; //now 2's complement
return (char)(calcSum);
}