View previous topic :: View next topic |
Author |
Message |
jahan
Joined: 04 Apr 2005 Posts: 63
|
2 PIC MCU, 1 Crystal ... see schematics |
Posted: Thu Aug 18, 2005 3:16 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Thu Aug 18, 2005 4:01 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jahan
Joined: 04 Apr 2005 Posts: 63
|
|
Posted: Thu Aug 18, 2005 4:41 pm |
|
|
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? |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Thu Aug 18, 2005 6:38 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Thu Aug 18, 2005 7:26 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
LomasS Guest
|
|
Posted: Fri Aug 19, 2005 8:36 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
jahan
Joined: 04 Apr 2005 Posts: 63
|
see schematics ... |
Posted: Fri Aug 19, 2005 11:05 am |
|
|
is this correct?
![](http://www.jjpower.net/ebay/2osc.gif) |
|
![](templates/subSilver/images/spacer.gif) |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Aug 19, 2005 2:05 pm |
|
|
Yes this arrange should work. Let us know if so.
Humberto |
|
![](templates/subSilver/images/spacer.gif) |
LomasS Guest
|
|
Posted: Fri Aug 19, 2005 4:25 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Mon Aug 22, 2005 9:32 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
jahan
Joined: 04 Apr 2005 Posts: 63
|
|
Posted: Mon Aug 22, 2005 11:46 am |
|
|
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"? |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: see schematics ... |
Posted: Mon Aug 22, 2005 6:01 pm |
|
|
jahan wrote: | is this correct?
![](http://www.jjpower.net/ebay/2osc.gif) |
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!! |
|
![](templates/subSilver/images/spacer.gif) |
|