> From: "David E. Queen" > > I got my interface test unit built and running. > > To my surprise the times were not as expected. 241, 482, and 964 milliseconds > not 250, 500, and 1sec. I had double checked in MPLAB and I am using the > right number of cycles. My problem is my crystal is 4% high in frequency. > About 4.16 to 4.18 depending on where I try to measure it. 4% is awfully bad for an xtal. They are usually spec'd to within 100ppm (0.01%) if correct loading is used. Try a different xtal. Note that there are 2 basic types of xtal: series and parallel resonant. I can't remember which, but one should be in an inverting loop and the other in a non-inverting loop. Don't know which type the PIC is expecting. > > I am using a 16c84 rated at 10mhz, a 4.000mhz crystal and 2 22pf caps from > Digikey. I set the oscillator bits to HS. The unit was built on one of MEL's > proto boards. > > What are the key factors I need to look at when I need the oscillator to be > within 0.1% without tweaking the frequency? If used correctly, the xtal will be within 0.01%. Try adding a series resistor since the xtal may be being grossly overdriven. Perhaps the seal is broken (although I would expect moisture on the quartz would slow it down not speed it up as you state). > > I really thought I could just grab a 4mhz rock and a couple caps ant it would > be at least as close as I need. Should I consider using a canned dip oscillator? > That would certainly work. > > Another question is can you use a solder less breadboard (I just got one of the > E.N.D. unit's) and a 20mhz clock on a 16c65 windowed part. I have concerns that > the oscillator will go nuts with all the stray coupling, and I will need 0.1% > accuracy on that unit too. > I have had no problems with 4MHz logic (was a Z80 system) done up on a breadboard. Using a frequency meter and changing loading capacitance by a few 10's of pF produced only a few 100Hz difference at 4MHz. Regards, SJH Canberra, Australia