Shop OBEX P1 Docs P2 Docs Learn Events
Some crystal troubleshooting? — Parallax Forums

Some crystal troubleshooting?

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-04-20 10:23 in Propeller 1
ok so im having some issues with my prop pertaining to crystals and frequencies. i posted a thread a while back a little similar. I was having problems with a 5mhz xtal but everythinga went smooth with a 6.25 xtal. Well i came to the conclusion that i mist have killed my 5mhz xtal, so i just ordered a new one.

well my digikey box arrived today with all my goodies including xtals from 5mhz to 16mhz. first thing i did was stick the 5 in and boot up my board. the monitor nor speakers came on so im like what the hell is going on, then realized i had ordered a 5mhz xtal thats capacitive inductance rating was series(can someone tell me what series means can i just stick a 20pf cap in series with it?) not 20pf like the rest. would this stop the board dead from booting?? also is there a way to test my original xtal?

Ive also been having problems with certain spin programs at 100mhz. they wont display on a vga. this only happens with certain programs and not the super taxing ones used to test the oc. do some vga drivers have a hard time syncing with the monitor on non standard prop frequencys? this is really the only reason i got a 5mhz xtal.

i was also wondering if anyone could tell me when you pick an xtal over an oscilator and what advantages they have. i like the idea of using the props internal oscillator when u dont need alot of speed. the only issue i have is that rcslow and fast tend to drift. i was thinking of getting a 1mhz xtal just so i can run low freq withoit drift, this then made me ask myself why the the internal oscillator drifts and if using an oscillator in a pll is ever a good idea

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-19 21:55
    Crystals are made for a particular series or parallel capacitance. If the oscillator circuit doesn't supply that, either the crystal won't oscillate or, more likely, it will oscillate at a different frequency than you expect. You can't just stick an extra capacitor somewhere. Some oscillator circuits will tolerate additional capacitance or inductance to "tune" the crystal and some will not. It's best to get a crystal made for the oscillator at hand.

    Some monitors have problems syncing with some combinations of horizontal and vertical sync pulse frequencies. When you over-clock, some VGA I/O drivers won't completely adjust themselves to the system clock frequency used. It depends on the I/O driver you're using and how it's written.

    The internal oscillators drift because they use on-chip resistors and capacitors to set the frequency and those are temperature and supply voltage sensitive. Their values also are not very accurate and vary from chip to chip as well. As a result, the actual frequency can be anywhere in a broad range, then it can drift over time based on environmental conditions. If you need an accurate frequency standard for serial I/O or video generation, you can't use the internal clocks.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-04-19 22:18
    Thanks I understand the series thing now, although I'm still curious about my original 20pf 5mhz and how I can test it? What would kill a crystal?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-19 22:28
    Generally dropping it from a few feet onto a hard surface, like a concrete floor can break a crystal although they're pretty well built these days. Certainly hitting one with a hammer will break it. There's not much electrically these days that will damage one. "In the old days" when crystals were used to control a vacuum tube transmitter, there would be a bit of RF power passing through a crystal and they could overheat and crack, but there's not enough RF power floating around CMOS circuits to do that.

    This Wikipedia article should explain things much better than I can. This article is about Pierce oscillators, commonly used in logic circuits.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-04-20 01:47
    that is strange i got my 5mhz xtal from the parallax store, and it worked fine for weeks. I dont recall beating it up or dropping it to hard. one drunken night i put it in parallel with some other xtals and tryed to run a capacitance tester on it while the prop was running.. but like you said its hard to kill a crystall.

    so with out any kond of quick access to another 5mhz 20pf crystal is there a way i can tell if my xtal is somehow dead or if my prop chip is having problems at 80mhz for some reason, is that even possible? i mean the thing runs fine at pll4,8,16 with a 6.25mhz crystal. i dont understand how a chip would dislike a certain freq all the sudden but there are smarter people than i out there, that may have some insight into this!
  • jmgjmg Posts: 15,183
    edited 2012-04-20 01:58
    also is there a way to test my original xtal?

    Sure. You just need a multimeter, and a 1M resistor, and a small signal diode 1N4148/BAW62.

    Step 1: Place the Meter +ve on Vcc, and connect the diode [Meter-] --|>|-- [Xtal2] and measure the voltage, with the Crystal shorted, and working normally.
    Now do the mirror of Meter -ve to GND and connect the diode [Meter-] --|<|-- [Xtal2] and measure the voltage, with the Crystal shorted, and working normally.
    You now have indications of the High frequency AC swing on the Oscillator.
    If there is no change Shorted/working, you have a dud crystal.

    Check the Inverter in the Prop, with the 1M resistor at your Meter probe end, measure both Xtal pins.
    Common inverters are 50% Vcc, with the IP pin measuring a little lower, depending on your meter impedance, and the Inverter feedback resistor value. If you do this both ways like the example above, you can even calculate the Inverter feedback resistor value.

    If you want to check the frequency, google Sound Card frequency Counter.
    These work best on sloped waveforms, rather than square waves as then they can use the precision in the analog domain to calculate a zero crossing better than the sample rate.
    If you are patient, you can get your PC's PPM precision from this. (eg Mine is about 18.2ppm high.)

    A couple of examples
    http://www.daqarta.com/dw_freq.htm
    http://opend.co.za/hardware/freqmeter1/index.htm

    Of course, if you already have one of these (or a mate with one)
    http://www.thinksrs.com/products/SR620.htm
    you can skip the Sound card Step...

    Or you can generate a frequency, and measure that on the Prop, but that is slightly more work...

    Precision is getting ever-cheaper, Digikey now shows these :
    ±20ppb $39.32 CW727-1-ND
    ±100ppb $31.13 CW700-1-ND
    ±250ppb $21.00 CW663-ND
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-04-20 03:27
    im sorry ur post is really tricking me up. i think i understad though. your saying i conect the diode to the crystal with the xtal pins shorted then xtal pins open like normal, flip diode repeate correct? but am i sticking the components in the diode tester or just the posotive probe on ac voltage or something? im just not understanding how the diode crystal socket circut connects to the meter, what is +ve?

    im interpreting the inverter test goes like this. stick a 1m resistor on probe read xo and xi, if they are 50% of 3.3v or 1.65v in this case then the inverter is working?

    also with the freq counter isnt the prop circuit going to put out square dc waves? if im looking for freq how does the crystals ppm value relate? im sorry if i should know this stuff, gotta start somewhere i guess
  • Mark_TMark_T Posts: 1,981
    edited 2012-04-20 03:31
    Mike Green wrote: »
    Crystals are made for a particular series or parallel capacitance. If the oscillator circuit doesn't supply that, either the crystal won't oscillate or, more likely, it will oscillate at a different frequency than you expect. You can't just stick an extra capacitor somewhere. Some oscillator circuits will tolerate additional capacitance or inductance to "tune" the crystal and some will not. It's best to get a crystal made for the oscillator at hand.

    http://en.wikipedia.org/wiki/Crystal_oscillator#Resonance_modes is quite useful here.
  • LeonLeon Posts: 7,620
    edited 2012-04-20 03:45
    A 5 MHz series resonant crystal would be very unusual! Overtone crystals are series resonant.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-04-20 04:13
    Xo99-nd is the part number jusdt says the capacitance is series
  • LeonLeon Posts: 7,620
    edited 2012-04-20 04:46
    I can't find that part on the Dig-Key web site. It seems to be X099-ND,

    It does appear to be a series resonant crystal, which is unusual. It should work OK with the Propeller, although the frequency will be slightly off.
  • jmgjmg Posts: 15,183
    edited 2012-04-20 05:42
    im sorry ur post is really tricking me up. i think i understad though. your saying i conect the diode to the crystal with the xtal pins shorted then xtal pins open like normal, flip diode repeate correct? but am i sticking the components in the diode tester or just the posotive probe on ac voltage or something? im just not understanding how the diode crystal socket circut connects to the meter, what is +ve?

    The fast diode is placed in series, right at the meter probe tip, so it peak-detects the oscillator amplitude, into the Meters lead capacitance, giving you close to a RF probe.

    Shorting the crystal ensures no oscillation - removing the short, should give normal oscillation, which the probe will show.
    The system should operate normally while the Xtal is active and the AC measurement is made.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-04-20 06:16
    Ok thanks jmg, ill give it a try when I get home.

    @leon sorry about that been up a little to long. Well the fact that u say it should work fine, and that my other 5 mhz xtal doesn't work and is hard to break is a little disheartening. I'm definately going to try jmgs test methods. :/
  • Mark_TMark_T Posts: 1,981
    edited 2012-04-20 09:19
    Leon wrote: »
    A 5 MHz series resonant crystal would be very unusual! Overtone crystals are series resonant.

    Not perhaps as unusual for a radio local-oscillator application as for a microprocessor clock... Series resonance is sharper and less affected by stray impedances.
  • LeonLeon Posts: 7,620
    edited 2012-04-20 10:23
    Most fundamental crystals are parallel resonant.
Sign In or Register to comment.