Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

16 meg crystal, load caps and AVR won't start

2004-04-28 by Craig Limber

Hi there;

I am looking for a little advice on debugging my latest AVR project.  I
have an ATmega32 (40 pin DIP, high voltage version) on a custom
single-sided printed circuit board.  I bought a 16 meg/20pf load
crystal (CTS Frequency Controls model ats16a) and wired in 18pf caps
(didn't have 20 but I figured stray capacitance should get me close
enough).  The crystal and caps are mounted as close as I could on the
board.  

My processor won't start.  I adjusted the fuses for the high frequency
range and programmed the CKOPT fuse.  I also tried various fuse
settings for SUT0 and SUT1 to see if fiddling with the startup time
might help but no go.  The usual swapping out of all related components
with fresh replacements was the first thing I tried.  I also tried
different makes of 16 meg crystals.

A frequency counter on either XTAL pins shows 15.9989xx MHz and a scope
on either pin shows either a nice sinewave (rail to rail which tells me
that CKOPT is programmed as I expected) on one and a slightly deformed
sine wave on the other (but still regular and rail to rail).  

If I put an 8 meg crystal in it works perfectly using the exact same
settings and load caps.  A scope on the XTAL pins shows almost
identical waveforms at 8 meg as 16 meg but at half the frequency, of
course.

Oh, and I am using a 16 meg version of the ATmega32.  Power shows 5.01
volts and the microcontroller and all other bits have .1uf bypass caps.
A scope on the other pins and on power doesn't appear to show any noise.

I tried swapping the load caps ranging from 15 to 22pf but still no 
joy.  I tried swapping processors and I've verified the settings and
whatnot using an STK500 just to be sure.  

When on the project board I use ISP from Linux.  When the 16 meg
cyrstal is in use and the CPU is programmed to use it as described
above I can't even use UISP or avrdude to reliably read the fuses
or program the chip.  Just by lowering the crystal from 16 to 8 meg
re-established full communication.  Each time I wanted to try new
fuse settings while the 16 meg crystal was installed I had to remove
the chip, program it elsewhere and put it back on the project.

So, any suggestions of what to try next?

Thanks in advance, eh.

Craig

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.