I'm trying to pick out some 4mhz and 16mhz ceramic resonators for a pic 16f627 project and I'm a bit confused as to what I need. I'm looking for thru-hole and would prefer built-in caps. I'm browsing mouser (I'd prefer to get them there because I have to order some other things) and I'm a bit overwhelmed by all the options. Most of what they have are surface mount. Would these (Murata 81-CSTLS16M0X53-B0) work? If anyone has any recommendations (part numbers) I'd really appreciate it. Thanks, -Lee
Since you're not using the PIC for a time critical circuit, why not just used the internal oscillator? Or use the ER (external resistor mode) All you need to add is a resistor (or not) to CLKIN. Connecting CLKIN direct to ground will give you a 10MHz oscillator - no components needed. Otherwise, that resonator should work fine, though I've not used one with internal caps before. I prefer to use crystals.
Using and external resonator isn't that bad, especially with built in caps. for mouser numbers, 520-ZTT400MG is a 4 mhz resonator, $.40 for one. 520-ZTT1600MX is a 16 mhz resonator, $.40 for one. I have used the 20 mhz version of that product, and it is decent. I managed to fit it underneath the PIC, in the middle of the socket. But I was using a 40-DIP pic, .6" wide. The pic I was using had osc1 and osc 2 next to Vss, so I bent the pins on the resonator I just soldered it to the board, and did a little jumper on the back to the pin on the socket. But the gnd is in the midde, and you have to have it flat, so it is a tight fit. I've heard that resonators have less accuracy than crystals, but If you aren't doing anything too sensitive to timing, it isn't a problem, If you are doing an LCD, just check the busy flag, and throw in some extra waiting in the startup and you wont have any trouble.
Thanks for the quick reply. I was originally looking for crystals but was getting confused by the options. Looking again, I found some by FOX, but what does "Load Cap" mean?, or series for that matter. As you can probably guess, I'm a noob and a bit confused. I was thinking of adding an LCD to my project so I though timing might be a bit more important, but I might just scrap it for now. 10Mhz should be fast enough for driving my PWMs and the sampling I intend to do. Thanks for the ER tip.
Load cap is the size capacitors you should use with the crystal to make it work. Series is a different kind of crystal and isn't compatable with microchip PICs. If you are using a 16F or 16C series PIC, get its datasheet and get the mid-range MCU referance manual. It will be on documents page where you can DL the datasheet too. It has a better explanation of everything.
If you wish to use a crystal, any parallel cut crystal with two 15-33pf caps will work (up to 4 or 20Mhz depending on the specific MCU). Series cut crystals will work with PICs, but you need to add an additional resistor. But still, why not just use the internal oscillator set to 10MHz?
Thanks for the info on crystals. I very well might use the internal oscillator. I need to figure out some timing stuff. My final goal is to have 10 software PWM (roughly 120hz), a servo output, a few (probably using multiplexing) adc inputs, and a few other bells and whistles. I'm not sure if when all is said and done 10mhz will cut it.
OT: FOX makes crystal oscillators witht the rating 'Load Cap' meaning Load capacity (how many TTL devices it can power a signal to). Might be the same thing, might not. A couple of your options: Crystal: packaged like a metal can, 1/2" long by 3/16" wide. Has 2 leads. Requires a capacitor on both leads, usually 15-33pF ceramic. Cheaper solution, but very accurate timming signal. Resonator: Looks like a plastic drop, with 3 leads coming from the bottom (though sometimes they come in a plastic box shape instead). They work alot like a crystal, but can have the capacitors built into them. The 2 outside pins goto the OSC pins, and the middle one goes to ground. Murata series ZTT is what you should look for. Easier to hook-up, no caps, less space. Cost more, not as accurate. TTL Oscillator: Rectangular metal can, the size of a 14pin IC (3/4" by 3/8"). They have 4 leads. One for 5V power, one for ground, one for osc signal (you wire up only one wire to PIC this way...OSC1), and the 4th sometimes can be used as output enable. Very accurate, very expensive, but you can drive more than just one IC from a single clock signal. Oh, they also come in whats called 'half-can' meaning they are half the size. PIC internal oscillator: Basically, the PIC has a TTL oscillator inside of it. Its about as accurate as a resonator. You can even drive one other IC from a clock out pin. 8MHz is more than enough to drive an LCD (with built-in controller). The only hard part is configuring it, which in terms of PICs is really not hard at all. Just read the whole 2 pages describing how to operate it.
does the 16F872 have an internal oscillator? I never noticed that during my journey through the datasheets.