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

2 PIC MCU, 1 Crystal ... see schematics

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



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

2 PIC MCU, 1 Crystal ... see schematics
PostPosted: Thu Aug 18, 2005 3:16 pm     Reply with quote

simple setup question:
two units of 16F84A
one unit of 4 MHz crystal.

question:
can both these MCU's share the single crystal pins for OSC?

Tie the PINs 16 together to on side for crystal and tie PINs 17 together to the otherside of the crystal?


Last edited by jahan on Fri Aug 19, 2005 11:32 am; edited 1 time in total
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Aug 18, 2005 4:01 pm     Reply with quote

Quote:

can both these MCU's share the single crystal pins for OSC?


Yes but not in paralel.
Connect the crystal normally to use the internal oscillator of the first MCU
with the corresponding capacitors, then connect the CLKOUT (PIN15)
of the first MCU
to CLKIN (PIN16) in the second MCU.
Quote:

Tie the PINs 16 together to on side for crystal and tie PINs 17 together to the otherside of the crystal?

Noooop!


best wishes,

Humberto
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 18, 2005 4:41 pm     Reply with quote

I'm not sure how to connect only one side of my 4MHz crystal to CLKIN of the first MCU?

usually 4MHz crystal is connected to PIN.15 and PIN.16. Then a couple of CAPs are use to connect them to ground.

is there another type of crystal that only connects to CLKIN?

What would be the fuses or other setups for the MCU to use only CLKIN signla and then send the signal out on CLKOUT?
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Aug 18, 2005 6:38 pm     Reply with quote

Wire one MCU (the first) as always, with the crystal connected to PIN15 and PIN16 plus
a couple of 33pF capacitors to establish oscillations.
Then wire from PIN15(OSC2) of the first MCU to PIN16 (OSC1) of the second MCU.

Quote:

is there another type of crystal that only connects to CLKIN?

Nope.

Quote:

What would be the fuses or other setups for the MCU to use only CLKIN signla and then send the signal out on CLKOUT?

The FUSES Configuration depends of the Xtal frequency, use one of this:
LP For Low Power or current consumption sensitive applications (typical frequency in the range of 32 Khz )
XT For crystal resonator < 4Mhz
HS For crystal resonator >= 4Mhz
RC Is not applicable in this configuration


Hope you understand.

Humberto
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: Thu Aug 18, 2005 7:26 pm     Reply with quote

jahan wrote:
is there another type of crystal that only connects to CLKIN?


I might be wrong, but I think it's possible to wire the output of one clock/oscillator to CLKIN of 2 PICs.
LomasS
Guest







PostPosted: Fri Aug 19, 2005 8:36 am     Reply with quote

I looked at doing just this for a board which had 2 PICs, but the Microchip data sheets I looked at clearly suggested that this was not recommended. I suggest that you look at the appropriate data sheets.
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

see schematics ...
PostPosted: Fri Aug 19, 2005 11:05 am     Reply with quote

is this correct?

Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Aug 19, 2005 2:05 pm     Reply with quote

Code:

is this correct?


Yes this arrange should work. Let us know if so.

Humberto
LomasS
Guest







PostPosted: Fri Aug 19, 2005 4:25 pm     Reply with quote

This is quite likely to work, but as the Microchip Mid-Range reference manual section 2.3.5 states that:
Quote:
Since Microchip
does not recommend connecting other logic to the PICmicro’s internal oscillator circuit, an external
crystal oscillator circuit is recommended

It would be unwise to base a commercial application on this circuit.
The above section offers advice on using buffered oscillators for this purpose.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Mon Aug 22, 2005 9:32 am     Reply with quote

It might be safer to use a clock oscillator and feed it's output to both PIC's OSC1/CLKI pin. This would avoid any feedback/interference between the two PICs.

Ronald
jahan



Joined: 04 Apr 2005
Posts: 63

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 22, 2005 11:46 am     Reply with quote

rnielsen wrote:
It might be safer to use a clock oscillator and feed it's output to both PIC's OSC1/CLKI pin. This would avoid any feedback/interference between the two PICs.

Ronald


I'm pertty new and learning this by myself.
so here is a stupid question:

what is a "Clock Osillator"?
dyeatman



Joined: 06 Sep 2003
Posts: 1924
Location: Norman, OK

View user's profile Send private message

Clock Oscillator
PostPosted: Mon Aug 22, 2005 11:52 am     Reply with quote

Take a look at this page. It should help.

http://dkc3.digikey.com/PDF/T052/0812.pdf
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

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

Re: see schematics ...
PostPosted: Mon Aug 22, 2005 6:01 pm     Reply with quote

jahan wrote:
is this correct?



This will work I have around a hundred of units in this configuration that have been in the field for years like this without any failures or problems. However, the OCS1 input on the lower PIC has input capacitance (of the order of a few pf) which effectively adds to load capacitance of C2. Ideally C2 should be reduced wrt the value of C1 to take this into account. For example, if C1 is 18pF then C2 should be around 15pF.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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