CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

1 quartz 3 pics

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
denis_11



Joined: 13 Jul 2010
Posts: 45

View user's profile Send private message

1 quartz 3 pics
PostPosted: Tue Sep 07, 2010 3:58 pm     Reply with quote

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?
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Sep 07, 2010 4:17 pm     Reply with quote

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
denis_11



Joined: 13 Jul 2010
Posts: 45

View user's profile Send private message

PostPosted: Tue Sep 07, 2010 4:31 pm     Reply with quote

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 ...
icefield



Joined: 09 May 2005
Posts: 20
Location: Canada

View user's profile Send private message

PostPosted: Tue Sep 07, 2010 5:27 pm     Reply with quote

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 Shocked). Best to use a buffer to drive the "slave" PICs from the OSC2 pin (look at Fairchild's single-gate Schmitt input offerings).
Ttelmah



Joined: 11 Mar 2010
Posts: 19369

View user's profile Send private message

PostPosted: Wed Sep 08, 2010 2:34 am     Reply with quote

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
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Sep 08, 2010 7:42 pm     Reply with quote

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.
Ttelmah



Joined: 11 Mar 2010
Posts: 19369

View user's profile Send private message

PostPosted: Thu Sep 09, 2010 3:01 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group