dear rwskinner

thank you for your reply.
at least can you please give me a working code for generating CRC for modbus RTU (in PICBASIC Pro)

assuming that i have received from the HSERIN these byte

BYTe_1 BYTe_2 BYTe_3 BYTe_4 BYTe_5 BYTe_6 CRC1 CRC2

for example

01 03 00 00 00 0A C5 CD

how to calculate the CRC1 and CRC2

i am using this with PIC16F877A

Best Regards