connecting crystal to pic

Status
Not open for further replies.

strokedmaro

New Member
Im trying to figure out how to connect a 4mhz crystal to a 16f883. Ive gone through the datasheet for the 16f883 and on page 66, figure 4-3 It shows the crystal installed at OSC1 and OSC2 with 2 capacitors and a resistor. What value capacitors do I need to use? It also states: "A series resistor may be required for quartz crystals with low drive level" but does not state what that is. Ive attached the only information in the datasheet for the crystal Im trying to use...can someone help. Thanks!
 

Attachments

  • 4mhz.jpg
    132.8 KB · Views: 1,193
Check page 254 i assume its 15pf from that page. (Page 254 Of Datasheet)

 

Attachments

  • dc.jpg
    69 KB · Views: 2,660
A: Why would you want to connect a 4Mhz oscillator to the 16F883? It has an internal oscillator that goes up to 8Mhz.
B: Don't worry about the resistor. You'd probably know if you had a low-drive crystal.
C: "Drive level is the level of power dissipated in the crystal as a result of the operating circuit. Rated or test drive level is the power at which the crystal is specified and any deviation from the rated level will affect the crystal performance: therefore, the actual drive level should reasonably duplicate that specified. "
D: Around 4Mhz should use 15pF capacitors. From 1Mhz up, you pretty much just use 15pF capacitors for the oscillator.
 

Do I need to use the caps if I use the internal oscillator?
 
ok..no caps if using internal oscillator. Now, would the internal oscillator be able to reliably operate an LCD. I read somewhere that they (internal oscillators)may not work correctly under different temperature and pressure conditions. If this is not the case then internal it is
 
The internal osc is very good, fine for an LCD and most other things including serial communications. It's not good for a real time clock though. About 1% from the factory on most modern PICs including the 16F883.
 
Last edited:
The requirements for an LCD are VERY low, any kind of clock would be perfectly fine - as Bill says, it's only if you need accurate timing for something that you need to worry about crystal clocks.
 
I use crystal oscilators only when I'm doing time sensitive projects where the precise time is require.And all other cases I'm working with internal oscillators.
 
The requirements for an LCD are VERY low, any kind of clock would be perfectly fine - as Bill says, it's only if you need accurate timing for something that you need to worry about crystal clocks.

I take it that also goes for the other serial type protocols like the one wire and i2c?
I have an interest in doing a little data aquisition with a couple pics reporting back to a
computer.
 
I take it that also goes for the other serial type protocols like the one wire and i2c?

Yes, I2C is a syncronous system anyway, so clock speed doesn't matter at all. One wire is presumably asyncronous like RS232 and will be designed in a similar fashion.
 
1-wire is synchronous, in that the master initiates every data bit in each direction. The master pulls the line low and releases it almost immediately. The slave either lets the line go high or it holds the line low for a few µs.

The bit length times on 1-wire come from the internal oscillators on the 1-wire ICs so they are no more accurate than the internal oscillator on a PIC. Because of that, the internal oscillator is fine for 1-wire systems.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…