View previous topic :: View next topic |
Author |
Message |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
Problem w/ 20MHz Crystal |
Posted: Fri Aug 27, 2004 12:15 pm |
|
|
Hello,
I have a HC49U at 20Mhz and the problem is, it works only when no caps are hooked upto it !?
I have 2 22uF caps, but when I put them on the pic stops working... I tried messing with the polarity in every combonation etc, nothing worked...
What could I be doing wrong ? |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1908
|
|
Posted: Fri Aug 27, 2004 12:42 pm |
|
|
It could be that there's enough parasitic capacitance on the crystal lines to allow it to work without any capacitors.
Maybe try 15 pF, or even 10 pF instead and see what happens.
How is the layout of the pcb? If there are any groundplanes really close to the crystal lines, then that would account for some parasitic capacitance. If you are just prototyping this on one of those push-in boards, then they're horrible for parasitic capacitance. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 27, 2004 12:50 pm |
|
|
Quote: | I have 2 22 uF caps |
|
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Fri Aug 27, 2004 2:36 pm |
|
|
Ah, right. 22 pF caps.... oops.
Hmmm... So why does the clock work w/o caps and why do I still need them ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
ik1wvq
Joined: 21 Feb 2004 Posts: 20
|
|
Posted: Wed Sep 01, 2004 3:28 am |
|
|
hi,
try to place a 1.5M resistor across the crystal .. ( in parallel)
this problem was completely disappared in a my old project ..
this information from a application note of microchip !!
regards .. |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Wed Sep 01, 2004 7:28 am |
|
|
Hi,
I have a similar problem, in this case only some crystals ( 20 Mhz ones) work, others simply do not work at all, but if I remove the 33pF caps then they work....
I have noticed that 4MHz crystals work perfectly well. Is it possibel that the problem may be with the PIC ( Iam using PIC 16F877- 20/4 )
My PCB has a ground track that is quite close to the 20 MHz crystal, do you think this might be the problem ??? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Sep 01, 2004 10:40 am |
|
|
Are you using the HS fuse option instead of the XT??? |
|
|
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Wed Sep 01, 2004 12:01 pm |
|
|
Yea, I'm using HS.
Whats odd is that it seems to work fine with no caps. I am doing that pulse width code and get the same times with caps in as caps out.
Also, I noticed last night I was working just outside our office and NONE of my code was working... so I was like WTF... loaded some code I knew worked and nothing.... I pulled one of the caps and it ran right up (twice) but then it went back to not working...
Its was probably 60degrees last night... Is that enough to screw up a Xsytal like that ? |
|
|
drh
Joined: 12 Jul 2004 Posts: 192 Location: Hemet, California USA
|
|
Posted: Wed Sep 01, 2004 2:00 pm |
|
|
Application note AN849 at the microchip website might help. Also, are you using a parallel resonant crystal? _________________ David |
|
|
|