Multiple PIC's with 1 crystal


Closed Thread
Results 1 to 12 of 12
  1. #1
    puma's Avatar
    puma Guest

    Default Multiple PIC's with 1 crystal

    I was wondering if it is possible to connect multiple pic to 1 crystal ossilator. It would save some space on the pcb and some components if you were using more than one PIC on an pcb.

    If it is possible to connect multiple PIC's on to 1 crystal ossilator. How do you connect them?

    Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Puma,

    What type of PIC chips are you using.. maybe they have an on board oscillator that you can use instead?

    Some PICs allow you to use the external clock input for single oscillator pcbs.

    Cheers

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Method 1.

    Connect OSC2 from the PIC with the Crystal, to OSC1 of the PIC's without. Disadvantage: If you are driving more than about 2 or three slave PICs, you will need a simple CMOS or TTL driver/buffer as it will load the Master's oscillator too much. You have to set the Master for HC Oscillator (even at clock rates of 4MHz or under) to provide extra drive on the Oscillator if you have more than one slave PIC. I have many thousands of a design in the field with one master and two slaves without any problems whatsoever using this method.


    Method 2.

    Connect OSC2 from the PIC1 with the Crystal, to OSC1 of PIC2 without. PIC2's OSC2 connects to PIC3's OSC1. PIC3's OSC2 connects to PIC4's OSC1... ad infinitum... Disadvantage: If one of the PICs failed, all the PICs down the chain from that PIC will cease operating also.


    You can use any combination of Method 1 and Method 2 to construct Oscillator arrays as big as you wish.


    Method 3.

    Use a CMOS HEX Inverter/Driver IC and build a simple conventional Oscillator (as you would do if you were building a standard non-PIC logic design. Fan this out to heaps of PICs on your PCB as each HEX inverter/buffer stage should be able to fan-out to over a dozen PICs.


    Method 4.

    Use a ready-built 'canned' Oscillator... careful though, some of those TTL ones generate heaps of RFI...

  4. #4
    puma's Avatar
    puma Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks melanie for the explanation. It help me verry much. If have some projects in my mind where I could use this knowhow. For example:
    If have a master PIC wich sends datastream to several slave PIC's (8 or so) they filter and use the data to do something with it. When they share/use the same oscillator stream I could get the slave PIC's to do there task at exactly the same time (when al other slave PIC are ready to)

    Again thanks.

  5. #5
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Melanie,

    I would like to share the crystal of a 16f876 with a 12f675. By your description, I tie osc2 from the 876 to osc1 of the 675. What about osc2 of the 675. Do I leave it hanging or tie it to something?


    Thank you,

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  6. #6
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    Method 3.

    Use a CMOS HEX Inverter/Driver IC and build a simple conventional Oscillator (as you would do if you were building a standard non-PIC logic design. Fan this out to heaps of PICs on your PCB as each HEX inverter/buffer stage should be able to fan-out to over a dozen PICs.
    My experience with these (both CMOS and TTL) is that, like Method 4, they can generate some interesting RFI, especially on the odd harmonics.

    (I mean "interesting" in the sense of the ancient Chinese curse, "May you live in interesting times.")
    Last edited by RussMartin; - 6th September 2006 at 06:18.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  7. #7
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default Help please... one oscillator... two pics...

    I never got an answer to this question.

    I would like to share the crystal of a 16f876 with a 16f88. By the thread above, I tie osc2 from the 16f876 to osc1 on the 16f88. What about the second osc2 input on the 16f88. Do I leave that pin hanging or tie it to something?


    Thank you,

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rossfree View Post
    I never got an answer to this question.

    I would like to share the crystal of a 16f876 with a 16f88. By the thread above, I tie osc2 from the 16f876 to osc1 on the 16f88. What about the second osc2 input on the 16f88. Do I leave that pin hanging or tie it to something?


    Thank you,

    Ross
    For one thing, OSC2 is usually Fosc/4 (i.e. 10mhz in = 2.5mhz out), so depending on how you have it set up, the one PIC will run 1/4 the speed of the other PIC. In any case, you try it with it hanging; it doesn't work, try a weak pull up, that doesn't work, try a weak pull up, etc. and so on and so on...

    If it was me (and I've done this before), I'd get yourself one of those 4 pin oscillators, run the clock output of that into something like a 7404, tie a couple of the inputs together, and use the individual outputs to drive the seperate clocks of the PICs, which are set to external clock or HS mode. Simply put, the 7404 is used as a buffer to keep the 2 inputs from messing with each other.
    Or, use a 7404 as part of a crystal oscillator circuit and take the output and run it into a couple of other inputs as suggested above.

  9. #9
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    rossfree, Don't listen to skimask as the OSC2 output is divided by 4 ONLY in RC mode and INTIO mode. Either of which you are using. In normal HS or XT modes the OSC1 signal is buffered and inverted on OSC2. It's all in the data sheets....

    Dave Purola,
    N8NTA

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dave View Post
    rossfree, Don't listen to skimask as the OSC2 output is divided by 4 ONLY in RC mode and INTIO mode. Either of which you are using. In normal HS or XT modes the OSC1 signal is buffered and inverted on OSC2. It's all in the data sheets....

    Dave Purola,
    N8NTA
    Right, don't listen to me...sometimes I don't know what I'm talking about....like in the above post

  11. #11
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thank you... I was a bit puzzled...

    Which brings me back to the original question...

    Do I tie off osc2 on the second PIC or leave it unattached??? Looking for a simple answer. :-)

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

  12. #12
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Just leave it hanging (or use it as an available I/O if your particular PIC permits). If you needed to do something with it, I would have said so in my original post at the start of this thread.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts