Hi Lorick, The purpose in using capacitors with a crystal is two fold: #1) The oscillator consists of the inverter inside the PIC, the crystal, and external capacitance (both parasitic and actual capacitors). The total phase shift around the loop (from one inverter terminal, through the inverter, across the crystal/capacitor network, back into the inverter) has to be either 0 or 360 (the same thing) degrees for oscillation. The capacitance adjusts the phase shift of the network to allow oscillation. #2) Crystals are designed to "see" a certain type of load. Most are designed to see a certain, specified capacitance, referred to as the Load Capacitance. In order for your crystal to operate at the correct frequency, it must see this value of capacitance at its terminals. The total value of capacitance at the crystal's terminals is (Ca+Cp)/2, where Ca is the actual value of capacitor, per pin, that you place at the OSC1 and OSC2 pins, and Cp is the per pin parasitic capacitance. Cp is usually about 8pF or so. So, if your crystal wants to see a 20pF load, you will need to put 32pF capacitors at both OSC1 and OSC2: (36+8)/2 = 40pF This is one of the very useful and neat things that I learned from the PICLIST :-) In your case, it probably "just works" because the parasitic capacitance is enough to satisfy #1 and your oscillator is probably running with perhaps 0.1% frequency error, a few kHz with an xtal in the several MHz range. Your question is almost a FAQ, and every time it comes up, there is always a debate about the last point that you make: what is the difference between "series" and "parallel" crystals. Here is the usual consensus: there is no difference. Every crystal has a parallel resonant frequency and a series resonant frequency. They are separated by a few kHz and which one you get depends on what value of external capacitance you place on the crystal (I think it ultimately has to do with #2 and exactly what frequency gives the 0 deg phase shift through the whole network). Crystals sold as "parallel" crystals achieve their rated frequency when loaded with the recommended load capacitance. Those sold as "series" crystals acheive their rated frequency when operated in series resonant mode (determined by the external capacitance, but I'm not sure how to figure this one out numerically,since it isn't specified for xtals sold as "series"). If you need a rough frequency standard, just use the (Ca+Cp)/2 formula. If you need strict accuracy, you will have to use a trimmer cap for one of the caps and use it to adjust the frequency. Sean At 02:21 AM 2/27/00 -0500, you wrote: >What is the difference in using just a crystal on the pic or using it with >the 2 capacitors? >As usual, a quick look at the 200 page data sheets for the 16F876 didn't >produce an obvious answer so I assume someone here knows. > >I have been running with just a bare 4MHz crystal on osc1/osc2 and no >capacitors, and someone told me that's fine and capacitors would probably >cause trouble if anything for me since they have to be properly calculated >etc. He said he is putting capacitors on his circuits though because his >will be going outside and he wanted some stability. > >So how does one decide? > >Also what's the difference between crystal types? I am using "general >purpose microcontroller" parts but there's those other series or parallel or >other specific types. Again how would I know what to choose? > | | Sean Breheny | Amateur Radio Callsign: KA3YXM | Electrical Engineering Student \--------------=---------------- Save lives, please look at http://www.all.org Personal page: http://www.people.cornell.edu/pages/shb7 mailto:shb7@cornell.edu ICQ #: 3329174