----- Original Message ----- From: "Jan-Erik Soderholm XA (TN/PAC)" Subject: Re: [PIC]:PIC Oscillators > > Now if the change the value of C1 and C2 > > What C1 and C2 ? You mean the two caps that should be used > together with a crystal ? They shold never be changed. Use the > value specified in the manual. Well, not exactly. The PIC specifies a crystal of 20pF load capacitance, and the suggested values for the caps will give the correct load capacitance. If you have different values there, the oscillator will run at a different frequency, or it might not even start. You might even choose to use different capacitors and a crystal with a different load capacitance. HOWEVER, depending on the particular crystal, it is VERY hard to move the frequency very much. I doubt that you could get meaningfully outside the PIC's frequency spec by adjusting the capacitors. I would be very surprised if a 20 MHz PIC would show any adverse effect from running at 20.1 MHz, and that's about how far you might move a 20 MHz crystal, with a lot of luck. As you saw in other postings, the PIC will operate from DC up to it's rated frequency. Get beyond the rated frequency and you MAY see some misoperation. But it would be foolish of Microchip not to leave a little breathing space. The odds of you getting that one part that happens to be right on the edge are pretty slim. Obviously, the further you get past the edge, the better the odds are of getting into trouble, but crystals are bound and determined to oscillate at their marked frequency, and you aren't going to pull a crystal very far by twiddling the caps. However, one thing that is fairly common is to include a trimmer in the capacitance you provide to the crystal. If you are making a frequency counter or something of that ilk, calibration with a trimmer is somewhat simpler than adjusting program parameters, at least in simple cases. Capacitors tend to have pretty large tolerances, and crystals are never spot on, either. If you use the recommended capacitors and the correct crystal you will likely be within a few hundred Hz of the crystal's marked frequency. Sometimes that's not close enough, and you need the trimmer. Even with no capacitors (something I frequently do when tinkering) I've never seen the frequency off by a whole KHz, so the trimmer is only something you need in cases where frequency is very important. 72/73 de WB8RCR http://www.qsl.net/wb8rcr didileydadidah QRP-L #1446 Code Warriors #35 -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads