View previous topic :: View next topic |
Author |
Message |
denis_11
Joined: 13 Jul 2010 Posts: 45
|
1 quartz 3 pics |
Posted: Tue Sep 07, 2010 3:58 pm |
|
|
Hi, I know that you can connect a crystal with two pics, with fuses set with EC_IO, but I want to know can I connect three pics with a single quartz? |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
|
Posted: Tue Sep 07, 2010 4:17 pm |
|
|
EC_IO?
No.
Look at the datasheet.
EC = External Clock.
If you are using a crystal, you'll be turning on the buffer that "wraps" OSC1 and OSC2 of the PIC (you haven't mentioned which one).
Keeping in mind that one of those OSC pins is the OUTPUT of that buffer, that let's you cheat a little to string that to another PIC.
You will be introducing more stray capacitance.. So if you wanted to be paranoid, use a buffer and run that buffer to your PIC's.
You could also use the internal oscillator and output it to your other PIC's. (IF THE PIC SUPPORTS it - look for INTOSCO in the Oscillator section of the PIC's datasheet that you want to use.)
Cheers,
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
denis_11
Joined: 13 Jul 2010 Posts: 45
|
|
Posted: Tue Sep 07, 2010 4:31 pm |
|
|
I understand but I'll explain my situation: I have 2 pics 12f683 who must work with a frequency of 20MHz so I linked them together with a single 20MHz quartz with OSC2 pin of the first PIC to second PIC (pin OSC1) and their fuses, now on same circuit I have another pic that might work with 20MHz then I would use the same quartz of 12f683 with this third pic that unfortunately does not support internal oscillator ... |
|
![](templates/subSilver/images/spacer.gif) |
icefield
Joined: 09 May 2005 Posts: 20 Location: Canada
|
|
Posted: Tue Sep 07, 2010 5:27 pm |
|
|
As has already been mentioned, the oscillator drive circuit can drive the crystal and one or more external oscillator inputs (on your 2nd and 3rd PICs), but you will run into loading and capacitance issues. The crystal drive circuit is designed to drive (and not overdrive) a crystal - if you put too much load on it, it may not operate properly (you'll notice that right away) or it might fail during operation (probably when you hand it to your client ). Best to use a buffer to drive the "slave" PICs from the OSC2 pin (look at Fairchild's single-gate Schmitt input offerings). |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Wed Sep 08, 2010 2:34 am |
|
|
Or of course, use an external _oscillator module_, rather than just a crystal. You can then gain a pin on all the PICs (EC_IO), and have a reliable solution.
Most such modules have a 'fan-out' of 5 or more.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Sep 08, 2010 7:42 pm |
|
|
Ttelmah wrote: | Or of course, use an external _oscillator module_, rather than just a crystal. |
It works with an external oscillator. It may work with a quartz crystal too. Connect the crystal to PIC1 in a regular way. Connect OSC2 of PIC1 to OSC1 on each PIC2 and PIC3. I've seen a schematic like that. I haven't used a topology like that myself, though. _________________ Read the label, before opening a can of worms. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Thu Sep 09, 2010 3:01 am |
|
|
kender wrote: | Ttelmah wrote: | Or of course, use an external _oscillator module_, rather than just a crystal. |
It works with an external oscillator. It may work with a quartz crystal too. Connect the crystal to PIC1 in a regular way. Connect OSC2 of PIC1 to OSC1 on each PIC2 and PIC3. I've seen a schematic like that. I haven't used a topology like that myself, though. |
That what was was being mentioned right at the top of this thread.
Plus - cheap.
Downside, problems of load capacitance in particular.
With any reasonable length tracks between the PICs, the crystal loading will be going out of spec.
Many people have done this for two PICs without problems, and I have used this with a PIC, and an external UART, but with the parts only a few cm apart. If however the PICs need to be any distance apart, given the price now of the oscillator modules, it will be more reliable, to have a buffered quartz oscillator module, and then just feed the oscillator input pins on all the PICs. Has two extra bonuses. EC_IO, gains a pin, if supported by the PIC involved, and selecting EC, gives you standard TTL thresholds on the inputs, rather than the slightly lower thresholds selected by the oscillator settings, and hence better noise immunity.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|