This might give you some ideas. Not exactly what you are asking for, but it is very reliable.
http://www.picbasic.co.uk/forum/showthread.php?t=12554