Hard to say, could you post the entire tx/rx routine and details of hardware.
I presume your using a max485 or similer as the RS485 hardware interface to the PIC, the first thing that if this is half duplex are you seting the DE line (pin3 on the max485) high during tx ?
Another note on this is to ensure this remains high for a period of two bytes after the HSEROUT has completed otherwise data still being transmitted bu the UART would be corupted.
something like:
HSERIN xx,xxxxx,[xxxxxx] 'recieve data
DE = 1 'enable 485 tx
HSEROUT [xxxxxxxx] 'send data
PAUSE xxx 'wait two bytes
DE = 0 'disable 485 tx, enable 485 rx
Bookmarks