Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

22pF capacitor causes trouble

Status
Not open for further replies.

krishnakumar.r93

Member level 2
Joined
Jan 28, 2015
Messages
48
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
388
Hi all,

I use PIC16F877A and PIC18F45K22 with 4MHz and 12MHz crystals for my projects. Everything worked fine for some days and then the MCU starts working too much slower (not all, the last few). I initially thought that the crystal would have been damaged as the voltage on the crystal pins were 0v. So i replaced the crystal and the problem still persisted. When i removed the 22pF capacitors with which we ground our crystals, the MCU started working normal ( even with the crystal which i removed before replacing it ).
May be the capacitors were of low quality. But, It is kind of wierd. Does this happen to anyone else? How do i avoid such problems?
 

Are you sure the value you placed physically is correct ? I couldn't see why this could happen, anyway you could reduce the value a few, to something close to 15pF for instance.
 

hello,

I never been facing to this kind of problem..

What is the Environment Ambient temp domaine ?

Did you check power supply ?

Are you sure about the configuration bits ..
use XT for Q=4MHz
maybe HS for Q=12 Mhz
..not using internal FOSC
 

Hi,

what´s the exact type of the crystals?

Have you read datasheets, bot crystals and PIC? What does it say about the capacitors?

Is the capacitor value correct and is the capacitor type correct?

What PIC setup (if any) is needed?

Klaus
 

hello,

I never been facing to this kind of problem..

What is the Environment Ambient temp domaine ?

Did you check power supply ?

Are you sure about the configuration bits ..
use XT for Q=4MHz
maybe HS for Q=12 Mhz
..not using internal FOSC

All are good. VCC is 4.98v.
Bit configurations are good. If they are not proper, the MCU should not have worked at the beginning. But, i weirdly get this problem.
 

Just a check question: Had you assembled these capacitors at a breadboard ?
 

Hi,

what´s the exact type of the crystals?

Have you read datasheets, bot crystals and PIC? What does it say about the capacitors?

Is the capacitor value correct and is the capacitor type correct?

What PIC setup (if any) is needed?

Klaus

crystal types are regular quartz crystal. we use 22pF for the crystals, right?

- - - Updated - - -

Just a check question: Had you assembled these capacitors at a breadboard ?

No, i've soldered them.
 

show your code and config bit ...

@paulfjujo

Code:
#include <16F877A.h>
#device ADC=16

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O

#use delay(crystal=4MHz)
 

I'm not sure if the implicit declaration of the crystal type inside Delay directive suffice for ensuring proper oscillator opperation as XTAL. As far as I know, default configuration of bit fuses is internal RC oscillator.

Try including something like that:
Code:
#fuses HS
 

Hi,

crystal types are regular quartz crystal.
Every crystal has an exact name (type) and a manufacturer name. I´d say there is no "regular" crystal....

we use 22pF for the crystals, right?
...Only the datasheet can tell you.


Klaus
 

Have you tried replacing those capacitors with the new ones?

The 22pF capacitors on the oscillator pins is helping. The MCU might reset randomly if you don;t attach it, especially when you touch the oscillator pins. I have tested it multiple times. There must be something wrong with your circuit or the components.
 

Have you tried replacing those capacitors with the new ones?
Yes, tried it and it worked.

There must be something wrong with your circuit or the components.
How come.? I use the same circuitry for all the boards. May be, as u said, something must be wrong with the components, i guess.

- - - Updated - - -

Every crystal has an exact name (type) and a manufacturer name. I´d say there is no "regular" crystal....
Klaus

crystal type = KDS 4MHz
 

Hi,

KDS is the manufacturer name. The type is still missing.

I read some of the KDS datasheets. They don't tell much.
Often they speak of a serial capacitance of 8, 10, 12 pF. Because you probably use two capacitors to GND - from electrical view - they are connected in series. Therefore you need to use capacitors with twice the given value. So 16, 20 24pF is good.
But this is the total capacitance value, you need to subtract the PIC's input/output capacitance.
--> your 22pF are on the upper limit, but the value should be OK. As long as the PCB layout is good and there are no other devices involved.
Good layout here means: short traces to crystal and capacitors, low impedance ground plane from capacitors to GND connection of PIC. Also a capacitor with short wires from VCC to GND of PIC is essential.

*****
What else can make the circuit to fail?
* ultrasonic cleaning ( more problematic for the crystal)
* capacitors mounted near the edge of the PCB, combined with thermal or mechanical stress
* too thick solder stop film underneath the SMD capacitors, may cause the capacitor to *****.
* flux residuals causing corrosion and leakage currents
* wrong capacitor type
* additional resistors or additional load
..

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top