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

PIC question about crystal oscillator

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



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PIC question about crystal oscillator
PostPosted: Mon Feb 11, 2008 1:50 pm     Reply with quote

Dear members,

I'm designing a small pcb (2x2) with 2x 18F4550 TQFP40 (each are very close).

I'm wondering if it's possible to use a single crystal osc. of 12mhz for the 2 pics ?

...or I must use 2 crystal osc. ?

Also, what do you recommend me to get the two pics working together , spi, i2c or rs232 ? (each pic will run at max speed, 48mhz sending over 6000 bytes per sec)


Best Regards,

Laurent
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 1:58 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=23649&highlight=two+pics+same+oscillator

Can you clarify:

Did you want to run two pics from the same crystal ?
or,
two PICs from the same external oscillator ?


A crystal looks like this:
http://rocky.digikey.com/WebLib/ECS/Web%20Photos/HC-49US.jpg

An oscillator looks like this:
http://rocky.digikey.com/WebLib/CTS/Web%20photos/MXO45.jpg
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 2:04 pm     Reply with quote

Thanks but...

Quote:
Yeah, you can. You would set your #fuse settings so that you can send CLKOUT from one of the PICs, and feed this to your single oscillator input on the other PIC.


CLKOUT is already being used with a crystal osc. ... OSC1 and OSC2 pins are used with the quartz , i can't output the clock on this pin.

EDIT: same crystal

Have a nice day,

Laurent
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 2:20 pm     Reply with quote

These threads on the Microchip forum explain how to do it:
http://forum.microchip.com/tm.aspx?m=64265
http://forum.microchip.com/tm.aspx?m=232267
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 4:12 pm     Reply with quote

Thanks PCM Programmer,

I've learned that using a TTL Oscillator , you know the thing with 4 pins, you can drive as many pic you want easily... but for the crystal osc. (ex: HC49) it's another story and its more difficult to achieve.

I've never used a TTL oscillator before, you need a special circuitry to drive this or you simply apply some Vdd and Vss and you got some clock signal?

Thanks for all,

Laurent
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 4:28 pm     Reply with quote

Look on pages 18 and 19 in the PicDem2-Plus user's guide:
http://ww1.microchip.com/downloads/en/devicedoc/51275b.pdf
Look for "Y2". It's a "can" style oscillator. Disregard components
J7, R4, and C3 that are near Y2 on the schematic. They are used
with the optional RC oscillator. They have nothing to do with the Y2
oscillator.

If you order an oscillator, get one that is compatible with your PIC's Vdd
voltage (+3.3v or +5v, for example). The safe thing is to order one
that is correct for your voltage, and that says "TLL/CMOS compatible".
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 4:44 pm     Reply with quote

Wow thanks for the great help!

Those are pretty easy to use, the only downside , they are expensive and they are big (even with the half-size) compared to the cheap bare crystal osc. ! I will use them only when i need multiple clock signals.

Topic solved !

Best Regards,
Laurent
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Feb 11, 2008 4:49 pm     Reply with quote

You can get them in much smaller sizes. A typical surface mount
package is 5x7mm.
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