While this doesnt help your accuracy problem, one good way to measure the frequency of a micro controller is to make a program which basically divides the clock by some value (i personally use 30) and outputs it to a pin. This is better than measuring directly at the crystal, both because the capacitance of the measuring instrument can, from what ive heard, load the oscillator, and moreover, i think frequency counters are more accurate at lower frequencies. ------------------------------------------------------------------------------ A member of the PI-100 Club: 3.1415926535897932384626433832795028841971693993751 058209749445923078164062862089986280348253421170679 On Wed, 30 Jun 1999, Andres Tarzia wrote: > Hi all! > > I am having problems with an 20Mhz oscillator that does not want to > oscillate at 20Mhz. Something like 20,080,000Hz. > > I am using the "usual" oscillator construction with two fixed caps to > ground, one at each end of the crystal (120pf in this case). > > The problem is that the damn circuit is oscillating at slightly above 20Mhz, > so I changed one of the fixed caps (the OSC1/ClkIN) for a variable cap. The > only one I had was a 5-20pf part. I was able to reduce the oscillation > frequency to 20,035,000Hz but no less than that. > > I am using a temperature-compensated frequencimeter for measurement (using > the OSC2/ClkOUT pin) that is very exact. > > What can I do to reduce it further? I was thinking about changing the (now > only) fixed cap for another one, but with LARGER or SMALLER capacitance? > Could someone help me here? > > Thank you very much! > > Regards, > Andres Tarzia > Technology Consultant - SMART S.A. > email: atarzia@smart.com.ar >