http://www.picbasic.co.uk/forum/showthread.php?t=573

Turns on LEDs, get it working, thereafter adapt it for HSERIN/OUT whatever...