Electronics > Beginners

Testing ceramic resonator


Hi folks,

I'm trying to make a USB breakup board from a pic18f4550, two capacitors and ceramic resonator (4Mhz). A very simple design, the goal is just to be able to easily program the pic, connect it to a USB and expose all the pins to make fun usb-based prototyping. All is SMD.
My problem is when I try to use clock with the external resonator. The pin 30 (resonator input) is flat dead on 0V, and the pin 31 (resonator output) is flat on 5v. I checked the tracks and the soldering points. All seems OK, making contact where it should, and not where it shouldn't.
I double/triple check the configuration of the PIC itself to be sure nothing comes disabling the oscillator. Oscillator pins are mixed with some IO ports, but as soon the clock is enabled it should bypass the port configuration for these pins (similar configuration works fine zwith a pic18f2450). I tried both XT and HS setting none works (by the way i don't have a clue on the differences between them). The PIC itself works fine when set to work on its internal clock. But the external clock is mandatory for the USB part. I begin to think the problem is the resonator itself.

Is there a way to test a resonator (or crystal by the way) ?
especially if the resonator is a SMD already mounted ?

resonator datasheet:
pic datashet

Thanks !

It would be unusual for a resonater to stop working. I don't know how one could test it due to the way these work.

The only times I have had problems like this was when the clock was not correctly configured. Possilbe problems could be due to circuit layout, if the traces are long you will have problems with inductance and / or capacitace.

Is there any hint of movement on the pins when you turn on? You would need a storage scope to see it. The shape of the waveform might give a clue. If you were overdriving the resonator I would expect to see something here.

One note - The first paragraph says that this chip has a different method of clock operation to previous devices so it might be that your code needs changing to correctly configure the clocks. It looks like there are several new parameters to setup to do with the USB sections. The second paragraph of section 2.2 says you need either a 6MHz or 48MHz clock when the USB is enabled.

Also, have you checked the errata for this device to see if there is a known bug with the chip? This has been known to catch many an engineer. (Including Dave if I recall)


When working with USB the clock must be accurate. I would be using a crystal rather that a ceramic resonator.  Ceramic resonators have a bad habit of drifting a little over time.



[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod