I don't know if this will help or not, but Bruce put together a nice little program here;
http://www.picbasic.co.uk/forum/showthread.php?p=23401
I'm not familiar with the PIC you're using, but if you have a CCP module I would give Bruce's program a shot, it looks like it should be very accurate.
Hope this helps.
Jerry.