No.18S075-00
27/48
STC-OSB250CL
Product Specifications
and User’s Guide
12.3
Communication format
A. The sending data format from PC to camera is as follows:
SOF
(8bits)
Device code
(6bits)
Read / write
(1bit)
Page selection
(1bit)
Command code
(8bits)
Data length
(8bits)
Data
(Write: Data length )
(Read: 1 byte)
EOF
(8bits)
B. The receiving data format from camera is as follows:
a. After sent the read command
SOF
(8bits)
Data length
(8bits)
Data
(Data length byte)
EOF
(8bits)
b. After sent the write command
SOF
(8bits)
Data length
(00H) (8bits)
Receiving code
(8bits)
EOF
(8bits)
C. Descriptions of the format
SOF
Start of the frame.
Sets (or obtains) the value is as
“02H” always.
Device code
Sets the device code of camera.
Sets the value is as
“000000” always.
Read / Write
Sets
“0” when sending read command.
Sets
“1” when sending write command.
Page
selection
Sets
“0” when accessing to register of camera.
Obtains the current data from register when sending read command.
Replaces the data in register by sending data when sending write command.
The data in EEPROM does not replace.
Sets
“1” when accessing to EEPROM of camera.
Obtains the data from EEPROM when sending read command.
Replaces the data in EEPROM by sending data when sending write command.
The camera uses data in EEPROM when power on camera.
The camera sends receiving code as
“01H” to PC after data in EEPROM is replaced.
The camera rejects any commands while data in EEPROM is replacing. (Approximately 5 mseconds / byte)
Command
code
Sets the command code.
Please refer
“The camera control commands” for more details.
Data length
Sets (or obtains) the data length. (unit: byte)
For receiving data:
The data length is based on command after sent read command.
The data length is
“00H” after sent write command.
For sending data:
The data length is 1 byte when sending read command.
The data length is based on command when sending write command.
Data
Sets (or obtains) the data based on command.
EOF
End of the frame
Sets (or obtains) the value is as
“03H” always.
Receiving
code
Obtains the result of sending command.
01H: The command proceeded correctly (ACK)
10H: The command could not process correctly (NAC)
11H: The communication issue
14H: Timeout error
D. Command example
Send the read command to read 00H address data of register
02, 00, 00, 01, 00, 03
SOF, (Device code / Read / Register), Command code, Data length, Data, EOF
The return command
02, 01, 00, 03