I could give you the coding but I would not explain it as well as the PIC BASIC MANUAL does.

The three options are:
SERIN/OUT

SERIN2/SEROUT2

HSERIN/OUT