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.

Crystal Oscillators

Status
Not open for further replies.

2camjohn

Member
So I want to add a crystal oscillator to one of my PIC microcontroller circuits.

However the oscillator I ordered (CMAC CFPS-72) seems to be different to the average crystal used on most google results.


Mine has 4 pins rather than two. It has Enable, GND, Output and +vs.

While this seems fairly simple on the surface, google extensively covers placement and layout considerations for the 2 pin crystals as well as capacitor selection.
I cant find any of that info on this type of crystal, perhaps it has a specific name I need to search for I dont know.
Without my impeccable teacher google, I dont know how to wire it up to the micro or choose external capacitors.

Any info is greatly appreciated.
 
2camjohn said:
So I want to add a crystal oscillator to one of my PIC microcontroller circuits.

However the oscillator I ordered (CMAC CFPS-72) seems to be different to the average crystal used on most google results.


Mine has 4 pins rather than two. It has Enable, GND, Output and +vs.

While this seems fairly simple on the surface, google extensively covers placement and layout considerations for the 2 pin crystals as well as capacitor selection.
I cant find any of that info on this type of crystal, perhaps it has a specific name I need to search for I dont know.
Without my impeccable teacher google, I dont know how to wire it up to the micro or choose external capacitors.

Any info is greatly appreciated.


There is a difference between a crystal assembly and a crystal oscillator assembly. A Pic has an internal oscillator circuit that only requires a crystal to be wired to the 2 pins to function. Your new 4 pin assembly contains a crystal and a complete oscillator circuit that outputs a TTL level frequency.

I'm still new to Pics, but you may be able to wire your oscillator's output pin direct to one of the two PIC crystal pins, but best to wait for other's comments or check the data sheet for the pic.

Lefty
 
I assume you can just connect the oscillator to one of the crystal pins on the PIC.

Powering the oscillator shoudn't be a problem, connect 100nF across the supply and the enable pin probably needs to go high to turn it on. For relaiabe operation the oscillator needs to be placed as close to the PIC on the board as possible.
 
Connecting an external oscilator to a PIC while it's set up to use a crystal probably isn't very good for it, just set the internal fuse on the pic to use an external oscilator. Due to the relativly low speeds and robustness of an oscilator modules output exact placement of the oscilator in relation to the PIC is not as sensative as with a simple crystal filter. One bad thing I've heard about thes devices (according to the PDF sheets) is they use a pretty decent amount of power (significantly more than the PIC during idle). If this is going to be used in a battery powered device and you want longer run times it's going to be relativly complex to disable the oscilator and still have the PIC able to wake up. If you don't intend on disableing the oscilator you can simply cut the enable pin off as if left floating the device will remain on due to internal pullup/down (I'm not sure if the enable pin is active high or low)
 
Last edited:
Hey guys,

Thanks for the info. Im still in the head scratching phase right now, not got as far as setting up the fuses for the oscillator type in this instance.


The point about power consumption is especailly useful since my device runs off a battery and must go into sleep mode, so thanks for that. But its the hardware not the software that I sometimes struggle with, the operation of the enable pin on the crystal seems quite simple (logic 1 or no connection enables the crystal), so I dont expect that to be a problem.



Is it important which oscillator pin I connect the oscillator to?
Anyone got any info on choosing caps for oscilaltors as opposed to crystals?


Thanks alot for the help.
 
2camjohn said:
Hey guys,

Thanks for the info. Im still in the head scratching phase right now, not got as far as setting up the fuses for the oscillator type in this instance.


The point about power consumption is especailly useful since my device runs off a battery and must go into sleep mode, so thanks for that. But its the hardware not the software that I sometimes struggle with, the operation of the enable pin on the crystal seems quite simple (logic 1 or no connection enables the crystal), so I dont expect that to be a problem.



Is it important which oscillator pin I connect the oscillator to?
Anyone got any info on choosing caps for oscilaltors as opposed to crystals?


Thanks alot for the help.

Can't answer the first Q, but the second is that you should not need caps if using an external oscillator. The caps are for proper loading of a crystal so that is oscillates at it's specified frequency. You oscillator assembly has all that stuff internal to it's oscillator.

lefty
 
I re read the datasheet with what you guys said about crystal oscillators as an external clock source in mind and it makes much more sense now, thanks.

Incidentally the datasheet (from my understanding of it) doesnt make the distinction between a crystal and a crystal oscillator in the same way you guys do.
It refers to a 2 pin crystal crystal as both a 'crystal' and a 'crystal oscillator'.
 
2camjohn said:
The point about power consumption is especailly useful since my device runs off a battery and must go into sleep mode, so thanks for that.

Dump the oscillator module, and buy a crystal - you're adding greatly increased power consumption, for no good reason (ordering the wrong part isn't a good reason!) - I would expect the module to probably take more current than the PIC?.

But its the hardware not the software that I sometimes struggle with, the operation of the enable pin on the crystal seems quite simple (logic 1 or no connection enables the crystal), so I dont expect that to be a problem.

If you keep refering to it as a crystal you're just going to keep confusing yourself, it's an oscillator module - it may contain a crystal (and I'm positive it does), but it doesn't work as one.

Is it important which oscillator pin I connect the oscillator to?
Anyone got any info on choosing caps for oscilaltors as opposed to crystals?

It goes to the input pin, as you would expect - you don't need capacitors it's NOT a crystal. Dump it, get a crystal and two capacitors!.
 
They do tend to look like crystals because they're in metal cans.
 
Sceadwian said:
They do tend to look like crystals because they're in metal cans.


I've seen several listings on E-bay for crystal oscillators but the picture shows they are only two leads on them and I've seen the reverse description of crystals in four pin packages so I guess it's not that hard for inexperienced people to get confused :rolleyes:

Lefty
 
Many people selling stolen stuff on E-Bay don't have a clue about what it is.
 
audioguru said:
Many people selling stolen stuff on E-Bay don't have a clue about what it is.

Yes always be careful and cautious, but there are power sellers with good feedback that offer some tremendous bargains sometimes.

Here is a listing where I got quantity 40 of 80mhz for like $0.14 each!

**broken link removed**


Lefty
 
Sceadwian said:
They do tend to look like crystals because they're in metal cans.

Tomato soup comes in metal cans, but I don't think that it will oscillate very well at 4Mhz.:D

JimB
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top