Quote Originally Posted by Snap View Post
I am trying to make a slot car timing system and I am using a 16f84a. I have already set it up to do the timing using the internal interupts but it is not 100% accurate, it is close (about 1 second per min off). I set the prescaler at 8 and load the tmro with 131 to give 1 sec on paper but it is a bit slow. I can adjust for it in the software but I was wondering if the caps I put on the external clock have anything to do with it. I wanted .22pf just as the schematics said but could not find any so I used .20pf ( I am not quite sure of the exact difference but I know I was close). Any way I was wondering if the clock depended on a R/C circuit or if the caps were only there for filtering.
Any help would be apreciated and sorry for the spelling.
Snap
You're probably losing a cycle here and there at the PIC level that you're forgetting about or not seeing or something...but yes, you might be able to 'drag' a 4Mhz cystal up to say 4.1Mhz or down to 3.9Mhz by using different load caps...but it won't be stable...in other words, it might be 4.1Mhz today, but it might be 4.05Mhz tomorrow.
Best to get the crystal locked down with the recommended cap's and dial in the timing by adding or subtract a 'leap count'/'leap second'/whatever whenever it's needed.