XTAL2 voltage range

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear friends,
I am working on a project
and I found out after some debugging
that XTAL2 pin of atmega32
is oscillating @ 16 MHz (like the ext. crystal I use)
BUT Vp-p is only 500 mV

I believe this is why the uC plays dead
Is this Vp-p normal?

What do you suggest to fix it?

Thank you very much!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need a pretty good oscilloscope and good quality x10 probes to even see 16MHz.

So you could have a respectable 5V signal at XTAL2, but you cannot see it with a x1 probe.

If you want a higher 'drive' use the CKOPT fuse. This is recommended for a 16MHz crystal anyway.

It appears that many users own $10000 oscilloscopes. Please ignore my comments if you have one of these.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

It appears that many users own $10000 oscilloscopes. Please ignore my comments if you have one of these.

I understand the joke, but while many people may only have $100-$1.000 oscilloscopes or none at all, they may have access to $10.000 oscilloscopes (university/work).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First of all
thank you for your answers.

Regardless of the oscilloscope
(Agilent Technologies)
my probe is a 10x.
BUT
if the same microcontroller is plugged in STK500
and the same crystal is also plugged in STK500
with the same fuse settings and program of course;
I get a very good waveform and ~5Vp-p @ 16 MHz.

This is why I need your help...

Anyway thank you very much!
I appreciate everything you say, even the jokes :-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The STK500 crystal clock uses regular logic chips. It provides a good drive to all the sockets on the board.

It does not use the AVR oscillator at all!

George has done some useful readings that illustrate the effect of the CKOPT fuse, and the use of oscilloscope probes.

@Jepael,

Yes. I have always assumed that the posters that cannot afford I2C pull-up resistors or ANY decoupling capacitors are students. So they have access to University oscilloscopes. OTOH they also have access to University resistors too!

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David thank you for your answers.
So the 500mV peak to peak are ok ?
Theoretically the uC needs a clock at TTL
level or no?

Thanks again
(P.S. Yes it's a University Oscilloscope)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

So the 500mV peak to peak are ok ?

No they are not - if you use 8MHz+ you should have CKOPT enabled - your results seem to suggest you haven't done this.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will try this afternoon and I will inform you!

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kakarot wrote:
David thank you for your answers.
So the 500mV peak to peak are ok ?
Theoretically the uC needs a clock at TTL
level or no?

XTAL2 is the output pin.

XTAL1 is the input pin.

The uC does not need a clock INPUT on XTAL1 at TTL levels when using the internal oscillator with a crystal.

However you can select the clock OUTPUT level on XTAL2 with the CKOPT fuse, and set it how datasheet says for your crystal. I think the datasheet says with that high speed it should be set whichever way to get full swing output.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use external crystal @ 16 MHz with 22pF capacitors.
CKOPT fuse enabled but same thing happens!
I measured XTAL2 on another project of mine with atmega16 and Vpp is 400mV so I guess something else is faulty here.

Also JTAGICE mkII when debugging returns
"JTAGICE mkII IDR event 0xff"

I reprogrammed fuses in order to use internal 8.0 MHz oscillator and everything works

The pcb layout is like in other projects I have made and I cannot understand why this problem occurs!

Thank you very much!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok....
I reprogrammed fuses to use external and no CKOPT
and it works...
Crystals are indeed magic...
this needs further investigation...
Thank you for your time and answers