I still don't understand. The way you have it written, SWITCH is a variable you are getting from your SERIN routine?? So, I will assume that you are setting a bit on the transmit side on say...portb. Then you are reading portb, and sending it as a variable. On the receive side just make PORTB = SWITCH.

Now open the PBP manual and look up SERIN. There should be an example of a wait statement. If not, use SERIN2. Copy it verbatim and do not substitute "[" for "(" or vice versa. If you don't, don't be at a loss why it does not work. These things are fussy about syntax.

Ron