STK500 crystal clock circuit problems

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

I have a m644p in my STK500 and have used it with a 20MHz crystal and it worked just fine.

2 days ago I experimented with some code that was written for the internal 8MHz oscillator so I just changed the fuses in the m644p.

Last night I wanted to go back to the 20MHz signal and the processor just didn't run. Changing the jumper to use the internal clock source (3.686MHz) and the processor runs. Changing the jumper back to use the crystal and - nothing.

I then had a look at the signal on the OSCSEL jumper and I can see a 20MHz signal, but it has 0.2V swing. Even worse, it is superimposed by a 3.686kHz signal, with about 0.5Vpp. On the XTAL1 jumper I measure a 20MHz signal modulated on the 3.686kHz signal with 2.7Vpp and a 1.3V offset. The amplitude of the 20MHz seems to be modulated with another frequency I can't measure and goes from 0Vpp to 1.5Vpp. AFAICT my processor doesn't even pick up the 3.686kHz (which is suspicously a 1000th of the internal clock).

The signals are the same, with and without processor (suggested in another thread). The STK500 is basically new and worked fine before I changed the fuses.

Does anybody have any idea what went wrong? And more importantly, what I can do about it?

Markus

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

Have a look at your clock jumper settings. Sounds like you have 2 clock fighting each other.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

XTAL1 is in place, and OSCSEL is to the left. If I put OSCSEL to the right I get the internal clock (3.686MHz, which looks fine on the oscilloscope and also clocks the AVR).

I took everything off the STK500, even the processor. Other than the power supply and the 20MHz crystal there is nothing connected anymore.

I did some more tests: The 3.686kHz modulation frequency does not change if I change the internal oscillator frequency. Also the m644p (if plugged in) does not pick up the 3.686kHz signal (avrdude responds with a 'yikes').

Markus

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

So does the clock at xtal1 (pin 13) change depending on the position of the jumper jp900. You shoud get 20MHz or 3.686MHz. If that is the case, did you change the clock fuses in the chip by any chance? If not if jp901 fitted?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

yup, it changes. If OSCSEL is to the right (internal oscillator) I get a nice square wave with whatever frequency I set with avrdude.

And if I set OSCSEL to the left (crystal oscillator) I get said mixed signal.

I changed the fuses of my m644p accordingly and it works if I use the internal oscillator, but not if I use the crystal setting. I tried connecting the crystal directly to XTAL1 and XTAL2 on PORTE and the m644p runs fine with that. So the fuses seem OK.

Markus

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

I was finally able to extract the schematic from STK500.chm. I'll have a look at it and see where things go wrong tomorrow.

Thanks John,
Markus

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

I can measure the 20MHz signal on the base of Q903A, but it's amplitude is already modulated with a 3.4kHz signal.

If I remove the crystal I get a nice but not very stable 270kHz signal on XTAL1. I don't think there should be a signal at all when no crystal is plugged in. There doesn't seem to be a feedback loop without it.

Any ideas?
Markus

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

Have you tried another crystal? Any frequency will do I suppose.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Good point, never did.

I just went through all my crystals and all but the 20MHz ones work. The 2 20MHz crystals I have show the same behaviour.

Markus

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

Was this ever solved?

I am seeing a similar behavior. I re-configured my STK500 to internal clock to check something with the ICE200. I then re connected the mega168.

The same 168 chip and 20 MHz crystal work on a solderless breadboard. !6 an 18 MHz work on both systems. I tried two different 20 Mhz crystals. These are surplus so I do not know the load capacitance.

Is there a limit as to what the STK 500 clock circuit can handle?