loading

how to solve external crystal problem in pic16F and its capacitance

i have made a circuit of radio control switch with PIC16F and diplayed the value on LCD16X2, i am having the problem with its crystal frequency. When i set pic18F with its internal crystal of 4Mhz its working fine,but not with 16F using 4MHz  external crystal and 33pF capacitor so how should i solve the problem of external crystal and its capacitance for pic16F.

sort by: active | newest | oldest
Alia Bakhsh (author) 2 years ago

i know that for PIC16F we can use only 3 capacitor values (15,22 and 33)pF as mentioned in datasheet but how may I select the crystal value..

i have tried combination of two 33pF with 20MHz and 4MHz then two 22pF with 20MHz crystal.

but program works for only few seconds.

I'd second the 22pF caps, they have always worked well for me:)

are both caps are tied to ground right? perhaps use a multi-meter to double check?

When you program the device, you have to set certain internal fuses to use an external crystal, or it won't run. What have you set ?

verence2 years ago

Put the crystal and the Cs as close to the µC as possible. I'm talking millimetres here, not centimetres. Did you check the crystal? Try another one. Try this one in another circuit. Did you set the correct configuration fuses?

Yeah, all of that too. The fuses are critical.

Read Microchips notes

Crystal oscillator basics AN826