The first thing that I see is you have SERIN and SEROUT on the same pin.
I have never tried A4 for serialCode:SERIN PORTA.3, SEROUT PORTA.3,
http://www.picbasic.co.uk/forum/showthread.php?t=562
You may have to use another pin.
Right now do not worry about TRISA. The SERIN/SEROUT takes care of that.
Bookmarks