Electronics > Electronics

How to know if crystal working

(1/5) > >>

Polaris:
Hi all

  Pls advise me on this. I had a simple circuit comprising of a microntroller with one of its port connected to a LED + resistor. I had also connected a crystal oscillator of 4MHz as mentioned in the datasheet for the microcontrller that i am using. In the micro controller, i had download a simple program which do simple thing of turning off and on the LED to create a blinking effect. However, when turned on the circuit, the LED just turn on dimly and checking the voltage level at the same output pin, using a multimeter, the voltage stays constant. Inferring from this, it meant the program is not workng?  i am in a fix, am doubting if the crystal is working. Could anyone advise me any simple technique to do a check ( i do not have an oscilloscope) ? or any good advice to dispense? Thanks

Militoy:
A couple of thoughts -

Does your multimeter have a frequency (Hz) scale? A lot of them do, and you may be able to tell if the crystal is operating by looking at your clock pin with the frequency counter setting on your meter. Also - what voltage did you read when you looked at the pin with the dimly-lit LED? Is it possible that the LED actually IS blinking, but at a rate too fast to see, so that it just appears to be lit dimly? Adjusting the flash rate, and/or the on and off times in your code may improve matters. Good luck!

Polaris:

--- Quote from: Militoy on January 11, 2007, 12:15:04 PM ---A couple of thoughts -

Does your multimeter have a frequency (Hz) scale? A lot of them do, and you may be able to tell if the crystal is operating by looking at your clock pin with the frequency counter setting on your meter. Also - what voltage did you read when you looked at the pin with the dimly-lit LED? Is it possible that the LED actually IS blinking, but at a rate too fast to see, so that it just appears to be lit dimly? Adjusting the flash rate, and/or the on and off times in your code may improve matters. Good luck!

--- End quote ---

Yes, my multimeter has one, but i think it is limited to 99KHz which is less than the crystal of 4MHz, can i still use it? Can you elaborate further on how to use the multimeter to perform the check, am new to this.

My reading at the o/p pin show ~4.1V and stays quite constant. I did see the glowing/diming of light at the LED(apparent when observing from the top instead of side view of the led) but kinda of dismiss it as fluctuation of voltage(ya i know it contradict my statement that my meter shows a constant voltage reading...*scratching my head*)

I did perform an adjustment to the code to have a 5s interval delay between each blinking on/off, but no difference in output. at present, i am connecting my o/p pin to a 377ohms resistor and follow by a LED and a LED's led to gnd. is this correct?

andreahmed:
i were about to suggest doing a delay blink led off and on ,, it seems the crystal is defective or the micro ..

Militoy:

--- Quote ---Yes, my multimeter has one, but i think it is limited to 99KHz which is less than the crystal of 4MHz, can i still use it?
--- End quote ---

Sometimes a freq counter will still pick up a subharmonic of the frequency it's seeing - it's worth trying to measure, to see if you get anything off the clock pin - but the 99KHz bandwith of your meter may not let you see much.


--- Quote ---i am connecting my o/p pin to a 377ohms resistor and follow by a LED and a LED's led to gnd. is this correct?
--- End quote ---

That resistor will give you maybe 11mA through the LED - seems a little high, but OK if the LED you're using is rated for that much current.

Do you have a link to the schematic of what you're doing, or if it's just a few components, do you want to describe it? Hopefully, you didn't handle the micro without grounding yourself and your tools, etc., and maybe blasted out the chip!

Navigation

[0] Message Index

[#] Next page

Go to full version