User Guide

Revision1.0 DN-C635 Serial Interface Specification
Date 2003-01-28 6 page of 39
2 Command format and answer format
The DN-C635 uses commands each of which consists of a data row (some commands no need PC)
composed of command codes (CC) and parameter codes (PC). The host shall be designed to send block
check characters (BCC) following ETX, with the data row enclosed in STX (text start: 0x02) and ETX (text
termination: 0x03). The DN-C635 shall complete command receive with correct BCC codes.
Here are the formats.
Commands <STX> <CC> <PC0> <PC1> <PC2> <………..> <PCn> <ETX> <BCCH><BCCL>
STX (Start of TeXt) 0x02
CC (Command Code) Command code
PC (Parameter Code) Numbers of parameters are defined for each command.
ETX (End of TeXt) 0x03
BCC (Block Check Character) CC + PC0 + PC1 + PC2 + + PCn + ETX = XY (hex)
Each of X and Y is 4 bit long, X, Y=0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F
BCCH is an ASCII code converted from X (higher 4 bits of sum) and BCCL is converted from Y (lower 4 bit
of sum).
BCCH and BCCL are ASCII coded data.
Answers<STX> <RC> <AC> <PC0> <PC1> <PC2> <> <PCn> <ETX><BCCH><BCCL>
STX (Start of TeXt) 0x02
RC (Reply Code) Reply code (=Command code)
AC (Answer Code) Answer code
PC (Parameter Code) Numbers of parameters are defined for each command.
ETX (End of TeXt) 0x03
BCC (Block Check Character) RC+AC + PC0 + PC1 + PC2 + + PCn + ETX = XY (hex)
Each of X and Y is 4 bit long, X, Y=0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F
BCCH is an ASCII code converted from X (higher 4 bits of sum) and BCCL is converted from Y (lower 4 bit
of sum).
BCCH and BCCL are ASCII coded data.
For BCC;
1) Add from command through STX.
2) Take two lowest digits in BCC sum. (“tens” & “ones” place)
3) Convert tens & ones place numbers in to hex.
Examples: BCC=337
Æ
BCCH=33, BCCL=37 (discard hundredths place 3)
BCC=107
Æ
BCCH=30, BCCL=37 (discard hundredths place 1)
BCC= 45
Æ
BCCH=34, BCCL=35 (convert directly)
BCC= AC
Æ
BCCH=41, BCCL=43 (convert directly)