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

Plenty of code, plenty of explanations, examples, and step-by-step instructions right here to get you going...