Go Down

Topic: Does the Orientation of the Crystal matter? (Read 10631 times) previous topic - next topic

Constantin

I have a dumb question... is there such a thing as polarity with crystals or resonators? I thought they weren't polar, i.e. any orientation is OK.

The reason I ask is that I have a Atmega 1284P here which is operating at maybe 10% of nameplate speed. The crystal is allegedly a 16MHz version, though I am beginning to doubt it. Maybe my supplier sent me a 1.6MHz version instead?

If that's the problem, how would one determine the speed of a crystal other than breadboarding it with a Atmega and watching different "blink" sketch responses?

FWIW, the backside of the crystal states "TXC G" and "16.0Dk7F"

retrolefty


I have a dumb question... is there such a thing as polarity with crystals or resonators? I thought they weren't polar, i.e. any orientation is OK.

Crystal and ceramic resonators are basically AC devices so there is no polarity issue in how you wire them up.

The reason I ask is that I have a Atmega 1284P here which is operating at maybe 10% of nameplate speed. The crystal is allegedly a 16MHz version, though I am beginning to doubt it. Maybe my supplier sent me a 1.6MHz version instead?

By 'operating at 10% speed' do you mean that you are able to upload a sketch to the chip using the IDE? If so the bootloader is functioning and would only work if your speed was indeed running at 16Mhz. If however you are using a ISP programmer to load a sketch then maybe possible you have the wrong crystal.
If that's the problem, how would one determine the speed of a crystal other than breadboarding it with a Atmega and watching different "blink" sketch responses?

That's one way, assuming you can actually load a sketch to begin with.

FWIW, the backside of the crystal states "TXC G" and "16.0Dk7F"

Manufactures numbering are unique to each manufacture, so that's not real helpful, but the 16.0 sure sounds like it is a 16Mhz resonator.

keeper63


I have a dumb question... is there such a thing as polarity with crystals or resonators? I thought they weren't polar, i.e. any orientation is OK.

The reason I ask is that I have a Atmega 1284P here which is operating at maybe 10% of nameplate speed. The crystal is allegedly a 16MHz version, though I am beginning to doubt it. Maybe my supplier sent me a 1.6MHz version instead?

If that's the problem, how would one determine the speed of a crystal other than breadboarding it with a Atmega and watching different "blink" sketch responses?

FWIW, the backside of the crystal states "TXC G" and "16.0Dk7F"


Here's one way I found, using a counter and a "dip" meter:

http://www.youtube.com/watch?v=rt1r88NMZLY

Neither are common bench test devices (unless you work with RF or other oscillating circuits with regularity; pun kinda intended).

Here's a thread, in which a similar method is described:

http://forums.qrz.com/showthread.php?188949-unknown-crystal-how-do-you-find-frequency

There's probably a way of doing the above using a high-speed oscillator circuit (or a frequency generator?) and an oscilloscope to look for resonance (which is, IIRC, what the dip meter and counter method are doing).

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

JChristensen

The oscillator definitely has limitations. I have some resonators which won't run reliably on an ATmega328P, but seem fine on ATtiny2313s. Their ESR is higher than others that work OK, not sure but that may be the issue. As for your crystal, have other examples of the same part number worked in the past? I assume you have proper load capacitors.

The oscillator frequency could be measured with a frequency counter, but trying to measure it directly would likely throw it way off or stop it altogether. I'd try setting the CKOUT fuse and then measure the output on PORTB0.


fred256

You probably already thought of this, but just to be sure: AVRs normally ship with the CKDIV8 fuse programmed by default.

robtillaart

Quote
I have a dumb question... is there such a thing as polarity with crystals or resonators? I thought they weren't polar, i.e. any orientation is OK.
Crystal and ceramic resonators are basically AC devices so there is no polarity issue in how you wire them up.


There is however an esthetic point.
Place all components in such a way that they can be read in as less orientations as possible.
Idealiter that means that all components should be readable in one orientation. For the crystal I would align the orientation with the main processor.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Constantin

Quick update and thanks for all the help, everyone!

The mystery is solved, thanks to the help of a stopwatch. Specifically, timing 1000ms blinks indicated that they lasted about 16s instead of 1s. Inspired by this, I set the Serial.begin to 76,800 and the IDE serial monitor to 4800 baud. Lo and behold, I got messages back that made sense. Once I burnt the bootloader, the blinking speed resumed at a normal rate, as did the serial speed. This also explains why the Arduino allowed itself to be programmed even though the later clock speed was much lower...

Moral of the story: Even if you use the ISP to program the Arduino, do not assume you don't need the bootloader in place to program the thing. Many thanks to everyone again, especially Fred256 who got my thinking process rolling once I saw the 16s delay...

kf2qd

Yes the orientation of the crystal matters - the 2 wires each need to be in their own hole in the board...

udoklein

Quote

Once I burnt the bootloader, the blinking speed resumed at a normal rate, as did the serial speed. This also explains why the Arduino allowed itself to be programmed even though the later clock speed was much lower...


Flashing the bootloader will also overwrite the fuses. What happens if you now go back to ISP? I would expect that it now works even without bootloader.
Check out my experiments http://blog.blinkenlight.net

Constantin

Works just fine, I always use the ISP for all uploads.

Still haven't figured out my RS485 issues though. One step at a time, I suppose.

Osgeld

http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Constantin


Go Up