Hello,
You can find the source code in Picbasic and C for Modbus RTU at www.modbus.pl
Regards
Andrzej