Shop OBEX P1 Docs P2 Docs Learn Events
How to use one crystal to clock multiple props? — Parallax Forums

How to use one crystal to clock multiple props?

MarcGMarcG Posts: 14
edited 2011-02-04 23:01 in Propeller 1
I was wondering how I can have one crystal, clock multiple props.

Will this work... Can I daisy chain the XO pin of one prop to the XI pin of another and continue this way for a total of 10 props spread out across a 17 inch span. (See attached PDF.) If it will work, then would I set the slave props OSCMx register to XINPUT?

If above idea won't work, or if there is a better way. please let me know. Thanks

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-03 10:11
    No, you can't do it that way. The XO pin doesn't have enough drive and should never be used to drive a long trace. It would be better to dedicate an output pin from the master device to drive the XI pins of the slave devices.

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-03 10:50
    You can

    1) Have a separate crystal for each Propeller
    2) Designate one Propeller as master and use an I/O pin for a clock. This requires that the program in that Propeller initialize the I/O pin and one of the cog counters in the "main" cog so that the I/O pin outputs the necessary clock.
    3) Have a single external crystal oscillator that's connected to each of the Propellers' XI and set up all the Propellers with XINPUT clock mode.

    Note that the Propellers initialize themselves using the fast internal RC clock. Once this is done and a program is loaded from EEPROM or an attached PC, the Prop switches over to whatever clock is specified in the program.
  • jazzedjazzed Posts: 11,803
    edited 2011-02-03 11:12
    I've used the XO side to drive a buffer which in turn drives one or more other Propellers on the XI and will be doing it again soon since I need to have synchronized Propellers. Works just fine.
  • MarcGMarcG Posts: 14
    edited 2011-02-03 13:21
    Thanks for the responses. I will probably go for using a crystal oscillator feeding all the props XIN pins.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-02-03 14:32
    This is a common question. When I tried to do this I fell foul of the Prop that had the Xtal being separately reset, this left the slave Prop clockless whilst the master went through its RC Fast reboot. The slave seldom picked up again with out a reset of its own.

    On common powering up, and simutaneous resets the two of then got on fine.

    (this was with the Master being a Blade2 and the Slave being a PropCMD/VT100)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-03 14:41
    Toby,

    'Interesting observation! When this happened, was the slave clock configured for PLL and/or did you have other PLL counters running? Without any PLLs running, I would think that the Prop would behave in a totally static manner. Of course, having PLLs with a 4-8 MHz capture range changes all of that. So it's probably not a good idea, in general, to drive one Prop from another's counter output.

    -Phil
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-03 17:53
    It is definately not the thing to connect props together using 1 xtal. Also be careful that the PLL failure does not bite. If you want to synchronise and use 1 xtal (e.g. the 5MHz), use the 74LVC1GX04.
  • BigFootBigFoot Posts: 259
    edited 2011-02-04 12:52
    Our new dual Prop board just uses two crystals, this way you can reset one without effecting the other.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-02-04 13:59
    Both of the Props were trying to do a x8 off of a 12MHz xtal, initially the same xtal but I soon put on a second.

    A common reset button would have probably worked.
  • jazzedjazzed Posts: 11,803
    edited 2011-02-04 20:35
    Cluso99 wrote: »
    If you want to synchronise and use 1 xtal (e.g. the 5MHz), use the 74LVC1GX04.
    That's my plan except I need to use a 6MHz crystal. I used the inverter successfully on the OctoProp driving 4 slaves with a short clock line. I have 3 boards now that I need to test with the configuration. My reset is common.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-04 20:45
    The 74LVC1GX04 will handle many values. Don't forget to read the spec and use the R's & C's suggested for reliable operation. There should be no problems driving 4+ (10 sould be workable at 6MHz) slaves without buffering. Use a larger track width and some protection ground traces if they run beside signal tracks.

    There is also a 74LVC1104 IIRC.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-02-04 23:01
    On some AVR bits I had done, using the internal inverter's output to feed the slave seemed ok. This was so because the xtal osc starts up on powering and keeps on going, even through resets.

    The Prop starts up using its internal RC clocks and then, code permitting, fires up the external xtal and PLL bits (powersaving I suppose). Even if the Prop is static, clock wise, the interuption did crash the second (VDU) Prop every time. If I had gone even cheaper and not put on the reset switches I may have never noticed.
Sign In or Register to comment.