Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 8th May 2008, 01:08 PM   (permalink)
Experienced Member
 
skyrock is on a distinguished road
Default crystal, does it work without grounding?

Hello everybody,

As with the little crystal problem i've had last few days, i finally found out why it didnt work but I dont understand it..

It happened that the crystal I used cannot be grounded in order to work. I can only make it work like the circuit in the attachment. Is it normal?

I'm using Nigel's main board and Led board for testing using PIC16f628

http://www.winpicprog.co.uk/pic_tutorial_main_board.htm

I attached the 2 legs from the crystal to RA6 & 7, and then my board turns on the LED on portb blinking at 1 second interval. But this is without any capacitor and grounding... (SPOOKY..) Does anybody knows why?

EDIT: it doesnt work already after i tried it again. would it because there's charge left inside the crystal? It's just plain wierd..
Attached Images
File Type: jpg crystal.JPG (7.4 KB, 30 views)
File Type: jpg IMG061.jpg (490.3 KB, 25 views)

Last edited by skyrock; 8th May 2008 at 02:15 PM.
skyrock is offline   Reply With Quote
Old 8th May 2008, 02:49 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Connect the capacitors, they are an essential part of the oscillator circuit - without them it 'may' work some of the time, due to stray capacitance, but it's unlikely to be reliable.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 8th May 2008, 03:42 PM   (permalink)
Experienced Member
joshua17ss2 is on a distinguished road
Default

Is it possible its running on the internal oscillator and just ignoring the connection to the external crystal?
joshua17ss2 is offline   Reply With Quote
Old 8th May 2008, 05:25 PM   (permalink)
Experienced Member
picbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of lightpicbits is a glorious beacon of light
Default

More than likely the stray capacitance of the PCB or prototype board he's using is enabling the crystal to oscillate as Nigel said above.
picbits is offline   Reply With Quote
Old 8th May 2008, 07:58 PM   (permalink)
Experienced Member
colin mac will become famous soon enough
Default

Same thing happened me the other day .I was wondering what was wrong until I removed the caps. It's still working away now.
I don't have the part no. for the crystal to find out what the story was.
colin mac is online now   Reply With Quote
Old 8th May 2008, 08:55 PM   (permalink)
Experienced Member
speakerguy79 is a jewel in the roughspeakerguy79 is a jewel in the rough
Send a message via AIM to speakerguy79 Send a message via MSN to speakerguy79
Default

Breadboards have a lot of parasitic capacitance. That said, I've always used xtals with caps on breadboards.
speakerguy79 is online now   Reply With Quote
Old 9th May 2008, 08:01 AM   (permalink)
Experienced Member
 
eblc1388 is just really niceeblc1388 is just really niceeblc1388 is just really nice
Default

I never have problem with crystals not working on breadboard.

The technique is simple.

Place the crystal directly across the MCU pins. Do not use any extra connection wire or links to connect the crystal and its two capacitors.

Most projects I saw on the Net placed the crystal some distance away from the MCU pins, then connect them using links so that it looks neat and tidy.

Don't do that.
__________________
L.Chung
eblc1388 is offline   Reply With Quote
Old 9th May 2008, 08:44 AM   (permalink)
Experienced Member
 
skyrock is on a distinguished road
Default

Quote:
Originally Posted by eblc1388
Place the crystal directly across the MCU pins. Do not use any extra connection wire or links to connect the crystal and its two capacitors.

Most projects I saw on the Net placed the crystal some distance away from the MCU pins, then connect them using links so that it looks neat and tidy.

Don't do that.
can you explain further? what is the reason behind this?

regards.
skyrock is offline   Reply With Quote
Old 9th May 2008, 09:02 AM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

Quote:
Originally Posted by eblc1388
I never have problem with crystals not working on breadboard.

The technique is simple.

Place the crystal directly across the MCU pins. Do not use any extra connection wire or links to connect the crystal and its two capacitors.

Most projects I saw on the Net placed the crystal some distance away from the MCU pins, then connect them using links so that it looks neat and tidy.

Don't do that.
hi,
I agree, doing this way I never have a problem with the osc..
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now   Reply With Quote
Old 9th May 2008, 09:30 AM   (permalink)
Experienced Member
 
Kryten is on a distinguished road
Default

I agree with ericgibbs and eblc1388

The shorterway from the Crystal to the cnotroller the bether. This way you get the most correct freq. as you can control the stray capacitance (witch is on all PCBs more or less).

There are some ways to control the stray capacitance as shown on the pic below (snapped from DS1302 Datasheet). For Crystals that are used with PICs the caps are used for stability and to keep the crystals BandWith very tight. (I mean to have read somewhere that its like 3-4 Hz)
Attached Images
File Type: jpg crystal.jpg (151.9 KB, 17 views)
__________________
Simplicity rules

Good enought - its perfect ??

2 Gig of free online backup space

Are you a Chemist?
Kryten is offline   Reply With Quote
Old 10th May 2008, 12:40 PM   (permalink)
Experienced Member
 
skyrock is on a distinguished road
Default

I've finally found a way to make the crystal to work. After trying to abandon the 16f628 by using 16f84a, i noticed a statement from this spec, saying that it is recommended to use HS mode for crystal higher than 3.5mhz rather than XT mode. so this took me a week to finally solve.

http://www.biltek.tubitak.gov.tr/gel.../pic16f84A.pdf

Page:22, (or 24 of acrobat)
skyrock is offline   Reply With Quote
Old 11th May 2008, 01:35 AM   (permalink)
Experienced Member
 
Blog Entries: 2
gramo is just really nicegramo is just really nicegramo is just really nicegramo is just really nice
Default

Quote:
Originally Posted by skyrock
I've finally found a way to make the crystal to work. After trying to abandon the 16f628 by using 16f84a, i noticed a statement from this spec, saying that it is recommended to use HS mode for crystal higher than 3.5mhz rather than XT mode. so this took me a week to finally solve.

http://www.biltek.tubitak.gov.tr/gel.../pic16f84A.pdf

Page:22, (or 24 of acrobat)

Dont abandon the 16F628! The 16F84 is not nearly as good a tool
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Will this work? MagnumForce General Electronics Chat 7 11th November 2007 12:12 PM
DIY Temperature Compensated Crystal Oscillators TCXO oliverb Electronic Projects Design/Ideas/Reviews 2 6th November 2005 09:16 PM
Crystal questions zachtheterrible General Electronics Chat 7 9th April 2005 02:19 PM
Crystal oscillator questions Johnson777717 Micro Controllers 0 19th August 2004 10:41 PM
Need help grounding some exposed metal. RisingFire Electronic Projects Design/Ideas/Reviews 6 30th January 2003 06:17 AM



All times are GMT. The time now is 05:47 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.