Originally Posted by
phoenix_1
I have RS485 (900 devices with displays and work 100% ok) now I need to implementa 9 more displays as terminals on network and pc send to my pic next:
Chr$(4) + Adr1 + Adr1 + Adr2 + Adr2 + Chr$(2) + Adr3 + "W" + "Q" + "PRESS INTERNATIONAL" + Chr$(3) + Chr$(crc) ' vb6 code
adr1 = number 0-9
adr2 = number 0-9
adr3 = number 0-9
and dat 1 to 4 are numbers 0-255
crc calculation on pc work fine with next:
crc = Dat1 Xor Dat2 Xor Dat3 Xor Dat4 Xor Hex(Adr3) ' vb6 code
I was probe in pbp : crc = Dat1 ^ Dat2 ^ Dat3 ^ Dat4 ^ Hex(Adr3)
but not success ....
Any idea for XOR for these crc calculation in pbp ?]