Author Topic: Testing ceramic resonator  (Read 5551 times)

0 Members and 1 Guest are viewing this topic.

Offline terriea

  • Contributor
  • Posts: 20
Testing ceramic resonator
« on: March 15, 2011, 02:04:21 am »
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:
http://www.tdk.co.jp/tefe02/ef31_ccr.pdf
pic datashet
http://ww1.microchip.com/downloads/en/DeviceDoc/39632e.pdf

Thanks !
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1438
  • Country: gb
Re: Testing ceramic resonator
« Reply #1 on: March 15, 2011, 06:45:57 pm »
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)

Neil
« Last Edit: March 15, 2011, 06:57:25 pm by Neilm »
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 813
  • Country: au
Re: Testing ceramic resonator
« Reply #2 on: March 15, 2011, 09:12:15 pm »
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.

Regards
Testing one two three...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf