Shop OBEX P1 Docs P2 Docs Learn Events
Had to use capacitors with external crystal anybody else had this? — Parallax Forums

Had to use capacitors with external crystal anybody else had this?

Dr BulbDr Bulb Posts: 11
edited 2010-01-07 02:04 in Propeller 1
·Hi the guys who answered my last post will know that I just got my prop chip working after some trouble with getting the Prop Tool to talk to my stripboard prototype. I had another problem not related to comms so thought I would share it with you guys and see if you have any thoughts on it. Ok stripboard prototype with external 4mhz HC-18/U mini crystal, yeah just handy in my spares gives me 64mhz internal clock with phase locked loop * 16. I read no caps required for external crystal so none fitted and stripboard tracks cut close to crystal, tracks are pretty long at moment so was avoiding extra capacitance. Loaded the led flasher spin prog into prop tool and changed·-xinfreq·equal to 4_000_000, then loaded the program into eprom which verified fine. Pressed reset and nothing scratched head and decided to see if I had oscillation on pins 30 and 31 with my scope, sure enough nice sine wave hmmm! So obviously the spin code was initialising the osc with the crystal whilst observing I decided to press reset and watched the oscillator come up a bit slow then hey presto flashing led. Right away I guessed it I have·good scope Tek 2465A with nice X10 probe with capacitance of 10pf, yes you guessed it it was loading the crytal with 10pf. I have fitted 2·* 10pf to crystal pins and to deck and prop fires up everytime without fail. Maybe I have a slightly ropey crystal but I remember buying it new for a Z80A project. Or maybe it is because I used stripboard. Any of you guys had this? Your thoughts are really welcome.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It began with a closed deserted diner and a man too tired to debug his Z80 code any longer.

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2010-01-05 23:51
    I'd try it with changing the XTAL parameter in the _clkmode assignment. As far as I remember it changes the internal cap.· XTAL1-3 is possible.

    CON
    _clkmode = xtal1 + pll8x
    _xinfreq = 10_000_000
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-01-06 00:16
    Stripboard should work fantastically, I have a 5 Mhz Xtal running on a breadboard with the Xtal1 setting without any problems. If your traces are on the order of several inches you may have antenna type losses but I suspect they are much shorter. I have noted that power supply(IR drops, caps can help fix this) and I/O glitches (coils, piezos - good design practices can fix this) can momentarily halt the oscillator circuit but it always restarts (<1 second) with RAM intact. Your crystal is probably to blame, if you have another change it out and remove those 10pf caps (clean debug slate).
  • mparkmpark Posts: 1,305
    edited 2010-01-06 00:44
    Perhaps this thread will be of assistance: http://forums.parallax.com/showthread.php?p=816550

    Also, "The Propeller specs call for a parallel-resonant crystal with about a 20pF load capacitance (for 5MHz). If you were to substitute a series-resonant crystal or one with the wrong load capacitance, you might well see a frequency discrepancy."
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-01-06 01:04
    A lot of older xtals called for 33pF loading caps. I am sure it is your xtal. With the correct xtal you definately do not need them, providing of course the pcb layout is fine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Dr BulbDr Bulb Posts: 11
    edited 2010-01-06 14:54
    ·Thanks very much for all your replies guys. I have had the propeller on soak for 24hrs with flashing led program running and 2 * 10pf caps from osc pins to ground.·Whilst around I have kept resetting the chip and the osc has always come up and the program has run. Disconnected the 10pf caps and tried the suggestion of changing··the XTAL setting, between ·XTAL1-3 no change, caps back on for now and prop chip happy. Will order the specified 5mhz crystal and see what happens, meantime I can now dip my head into spin and assembler. Again fast responses on a great forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It began with a closed deserted diner and a man too tired to debug his Z80 code any longer.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-01-06 17:24
    I would have thought that the stripboard would have given you the extra capacitance, like it or not.

    I have noticed that all the 5MHz rocks I have actually run about 500Hz lower even with minimal track lenths. I find I have to lower the freq statement to get the PAL output to improve.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • Dr BulbDr Bulb Posts: 11
    edited 2010-01-07 02:04
    Yes Toby I thought exactly the same regarding the long tracks of veroboard I had running away from the Prop chip and the 4mhz crystal, thats why I cut them as close as possibe after the crystal. That is interesting what you say about 5mhz crystals, I was wondering about oscillator accuracy for generation of Pal colour burst on front porch of sync, that is a good tip about lowering the frequency statement to pull the osc in. I will remember that if I want to drive a colour tv, thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It began with a closed deserted diner and a man too tired to debug his Z80 code any longer.
Sign In or Register to comment.