Re: Correct crystal oscillator choice.




This is a standard type of crystal clock. Note that IMHO you bought a
crystal, not a crystal oscillator (the latter implies some internal IC
logic to run the clock), but you did buy the right part. Based on the
crystal's part number, it wants 20pF caps (each crystal wants a
specific cap value, read the data sheets) but 22pF is probably close
enough, at most the frequency might be off a little.

The first thing to check is your wiring, especially the power, ground,
and reset lines. The caps should be grounded on the other side. Keep
the wires relating to the crystal as short as practical.

Now, do you have a way of checking to see if the crystal *is*
oscillating? Note that only one side of the crystal is safe to probe,
if you probe the other side you'll likely stop the clock (it won't
hurt anything, though) so check both pins. On some MCUs, the crystal
always runs, on others it has to be started in software.

After reading the specs for the crystal and the PIC, I make the
following observation: The crystal is an AT strip cut crystal. The
PIC spec says that a series resistor may be needed for AT strip cut
crystals; the PIC spec has a schematic. Also, make sure the FOSC
configuration bits are correctly chosen.
.