Ver 1.00
4 page of 30
1.3 Command format and answer format
The commands and answers consist of command code (CC) , parameter codes (PC) and some control
codes. The commands are transmitted from the host to the device and answers are transmitted from
the device to the host. The host and device shall be designed to send and receive block check
characters ( BCC ) to check the completion of command transport.
Here are the formats.
Commands
:
<STX> <CC> <PC0> <PC1> <PC2> <-----> <PCn> <ETX> <BCCH><BCCL>
STX(Start of TeXt)
:
02h
CC(Command Code)
:
Command code
PC(Parameter Code)
:
Defined for each command
( contents and number of parameters )
ETX(End of TeXt)
:
03h
BCC(Block Check Character)
:
CC + PC0 + PC1 + PC2 + ----- + PCn + ETX = Xyh
(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 ( high-level byte ) = X as converted to an ASCII code
BCCL ( low-level byte ) = Y as converted to an ASCII code
Answers
:
<STX> <CC> <AC> <PC0> <PC1> <PC2> <-----> <PCn> <ETX><BCCH><BCCL>
STX(Start of TeXt)
:
02h
RC(Reply Code)
:
Reply code(=Command code)
AC(Answer Code)
:
Answer code
PC(Parameter Code)
:
Defined for each command
( contents and number of parameters )
ETX(End of TeXt)
:
03h
BCC(Block Check Character)
:
CC + PC0 + PC1 + PC2 + ----- + PCn + ETX = Xyh
(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 ( high-level byte ) = X as converted to an ASCII code
BCCL ( low-level byte ) = Y as converted to an ASCII code
1.4 Protocol for data transmission and reception
This device is based on half-duplex communication. The unit shall therefore transmit commands and
receive answers according to the following procedure.
1.4.1 Basic
procedure
a) The host shall select commands for this device and transmit them to this unit.0
b) After sending a command, the host shall receive an answer from this device, then send the next
command.
c) The host shall analyze the RC, AC, and PC in answers and decide whether command has been
executed.
d) To get more information after received an answer, the host can send a status request command.
e) The time from the start of command transmission to the end should be max 40 msec.
f) The time from the completion of command transmission to the start of answer-back is 5 sec max.