Sharp IV-S20 User Manual page 305

Compact image sensor camera
Table of Contents

Advertisement

[Method for creating a checksum code]
The ASCII code for each byte of data, from the processing code to the end of text (prior to
the checksum code) is added together. The lower 1 byte of this sum is divided into the
upper 4 bits and the low-order 4 bits. The hex character (0 to F) is converted to the ASCII
code for that character and sent as one byte. Thus the checksum code consists of two
bytes.
Ex. 1 Command for the measurement
execution function 1 (code 10
:
1 0 0 1 C 2 CR
1.................31
0.................30
0.................30
1.................31
Checksum
: C2
C2
code
Note
· This manual uses the following notation to represent addresses and set values.
Octal numberI ......................... (8)
Decimal number ...................... None
Hexadecimal number ............. (H)
Ex. 2 Command for the measurement
)
execution function 7 (code 1A
(H)
:
ASCLII data
Checksum
code
Ex. 377
(8)
Ex. 255
Ex. FF
(H)
13-5
Communication
1 A 1 6 4 0
1
6
ASCLII data
1.................31
A................41
1.................31
6.................36
4.................34
0.................30
1.................31
: 6E
16E
)
(H)
E
CR
13

Advertisement

Table of Contents
loading

Table of Contents