Tell me first, what programming language you are using to program your PIC? If you use PICBasic then it is real easy
with your data out pin connected A1 and data in connected to A2 use the following code
Code:
SerIn porta.1,N9600,["A",#(Data Variables separated by a comma)]
SerOut porta.2,N9600,["A",#(Data Variables separated by a comma)]