20
FCS Calculation
Section 3-4
3-4
FCS Calculation
FCS (Frame Check Sequence) can be attached to output data to
improve communications. FCS is the result of taking the XOR for
each byte between header and footer (8 bits) and converting to 2-
character ASCII codes.
Each time data is received, the host link calculates the FCS and
checks it against the FCS attached to sending data so that sending
data can be checked for errors. Refer to Appendix B FCS Check Pro-
gram Examples (BASIC). page 177
(e.g.) Reading data: ABCDEFG
The sending data is as shown below.
Header
Footer
Reading data
FCS
Calculation
ASCII
code
A 41 0100 0001
XOR
B 42 0100 0010
XOR
C 43 0100 0011
XOR
D 44 0100 0100
XOR
XOR
E 45 0100 0101
XOR
F 46 0100 0110
XOR
G 47 0100 0111
Result 0100 0000
Converted into hexadecimal
and used as ASCII codes.
4
0