Chris,

You've read this post?
http://www.picbasic.co.uk/forum/showthread.php?p=23259

What part don't you understand?

How the Timer works?
How the Interrupts work?
How the program works?
<br>