> The timing of the code (infamed by Myke Predko?) at the end of this mail > simulates to the nearest µsecond using MPLAB. However, when executed on a > P16F84 using a 4 MHz 3 pin resonator marked > [4.00 (M x], I loose about 1 second every 10 minutes. Same occurs at > different supply voltages between 3.5 and 6V. > > Presumably this is because of the +/-0.5% error (or greater) in the crystal > and my too frequent reliance on 1 microsecond being accurate? Losing 1 second out of 10 minutes is an error of only 0.17%, which is well within the accuracy rating of the typical ceramic resonator. The obvious solution would be to use a crystal, which is about 100 times more accurate than a resonator. Jason Harper