Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Master Oscillator for 2 ICs

Status
Not open for further replies.
Hi,

I have some questions regarding the clock input of PIC.

Fig 1 (Config A) is the most common way providing clock signal to PIC. Two pins of XTAL are connected to OSC1 and OSC2. OSC1 is CLK_IN, where OSC2 is CLK_OUT. Why do both CLK_IN and CLK_OUT are connected to XTAL?

Could we just connect CLK_IN to XTAL, and leave CLK_OUT disconnected?

If I want 2 PICs share a same master oscillator, is the Fig 2 Configuration B the correct way to do that? The 2nd PIC will get the same clock freq as the 1st PIC have.

I have come across a Clock generator (fig 3) which provides clock signal to other uC. I don't understand how it works. Besides XTAL and capacitor, there is Inverter (7404) and resistors. Can anyone explain to me?

Thanks.
 

Attachments

  • clock_question.jpg
    clock_question.jpg
    73.1 KB · Views: 780
janetsmith2000@yahoo.com said:
Hi,

I have some questions regarding the clock input of PIC.

Fig 1 (Config A) is the most common way providing clock signal to PIC. Two pins of XTAL are connected to OSC1 and OSC2. OSC1 is CLK_IN, where OSC2 is CLK_OUT. Why do both CLK_IN and CLK_OUT are connected to XTAL?

Could we just connect CLK_IN to XTAL, and leave CLK_OUT disconnected?

How would it oscillate?, an oscillator requires positive feedback to oscillate, this is from CLK_OUT to CLK_IN - the crystal and capacitors merely force it to a specific frequency.

If I want 2 PICs share a same master oscillator, is the Fig 2 Configuration B the correct way to do that? The 2nd PIC will get the same clock freq as the 1st PIC have.

Connect the crystal properly and that should work OK, you can feed from CLK_OUT to CLK_IN on another PIC. As drawn, it won't oscillate at all!.

I have come across a Clock generator (fig 3) which provides clock signal to other uC. I don't understand how it works. Besides XTAL and capacitor, there is Inverter (7404) and resistors. Can anyone explain to me?

It's a simple RC oscillator, using R1 and C5 - if pin 1 is LOW, then pin 2 will be HIGH, and C5 will charge through R1. Eventually the input on pin 1 will become high enough to switch the inverter, and the output will switch LOW - R1 will then discharge C5 until it switches again. This process will repeat continually, creating an oscillator - the output on pin 2 will be a squarewave, and the input on pin 1 will be a rough triangle wave.

The crystal isn't really part of the oscillator, but it's presence will force the oscillator to 'lock' to it's frequency, as long as it's fairly close to begin with.
 
Thanks for your explaination.

I have 2 configurations here. Are both configurations valid?

For fig. 2, there's lot of IC have only one CLK_IN (without CLK_OUT pin) . These IC cann't provide positive feedback to XTAL. So I don't know how to connect XTAL to these IC.

Thanks, again
 

Attachments

  • share_clock.png
    share_clock.png
    16.8 KB · Views: 620
Like i said in the other post...

Why not use a TTL crystal oscilator and drive both pic's of it ?
 
janetsmith2000@yahoo.com said:
Thanks for your explaination.

I have 2 configurations here. Are both configurations valid?

For fig. 2, there's lot of IC have only one CLK_IN (without CLK_OUT pin) . These IC cann't provide positive feedback to XTAL. So I don't know how to connect XTAL to these IC.

Thanks, again
No, the first one is not OK. Just do the same as the second schematic, but instead CLK input of that IC, connect OSC1 pin of '84 there.
 
Nigel Goodwin said:
........It's a simple RC oscillator, using R1 and C5 - if pin 1 is LOW, then pin 2 will be HIGH, and C5 will charge through R1. Eventually the input on pin 1 will become high enough to switch the inverter, and the output will switch LOW - R1 will then discharge C5 until it switches again. This process will repeat continually, creating an oscillator - the output on pin 2 will be a squarewave, and the input on pin 1 will be a rough triangle wave.

The crystal isn't really part of the oscillator, but it's presence will force the oscillator to 'lock' to it's frequency, as long as it's fairly close to begin with.
Not so. The IC is an inverting gate - not a schmitt.

R1 charges C5. When C5 rises to the gate threshold the output will start to fall. When the output falls to the C5 level, C5 can charge no further. Finally a steady state will be reached with output and input at about half rail.

R1 is only there for biassing. Many circuits have used a gate in this mode as a linear amplifier. Without the crystal it will not oscillate.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top