I have a timing critical application and am running an 8Mhz xtal with a 16F628a. When I program chip 1 with given HEX code (compiled with PBP), it runs roughly 23 ppm slow. I programmed a different 16F628a with the exact same code (same xtal and osc caps, same board, same ambient temperature, same spot on the table), and it runs about 800 ppm slow. What could explain this much variation between PICs with the same external crystal oscillator? Could some threshold or internal capacitance be slightly different between the two chips to affect oscillator freq that much? Everything's soldered on the board except the chip, which uses a socket.

Also here's the obligatory monkey wrench: chip 1 seemed to run just fine with an 8Mhz crystal with the XT osc setting, so I am using the XT osc setting for both chips. Could that have something to do with it? When I have a chance to get back to the workbench, I plan on changing to HS to see if that does anything to either chip, but wanted to see if anyone had any experience with something like this.

Thanks in advance!
Dave