Forums

16Mhz AVR

Started by RCS March 11, 2004
Could anyone help?...

 I am having trouble switching from the 8mhz  internal clock to an
external 16mhz crystal on a AVR mega32. I was able to switch  from the
1Mhz internal clock to the 8Mhz internal. But I can't get the external
crystal to function? What is the  procedure?

 I have already messed up four M32's and still can't get one to work at
16Mhz. I am using 22pf caps on the crystal. Do you have any other ideas?
What are the fuse settings you use for 16Mhz?  I am using the bascom AVR
application to set the fuses.  I have tried everything that seems right to
me.

Help.............

Thanks,
Steve M.


In article <4050df5f$0$2817$61fed72c@news.rcn.com>, RCS <rcs@erols.com> 
writes
>Could anyone help?... > > I am having trouble switching from the 8mhz internal clock to an >external 16mhz crystal on a AVR mega32. I was able to switch from the >1Mhz internal clock to the 8Mhz internal. But I can't get the external >crystal to function? What is the procedure? > > I have already messed up four M32's and still can't get one to work at >16Mhz. I am using 22pf caps on the crystal. Do you have any other ideas? >What are the fuse settings you use for 16Mhz? I am using the bascom AVR >application to set the fuses. I have tried everything that seems right to >me. >
I use 15pf caps; set CKOPT bit; set all CKSEL 3-2-1-0 bits; set both SUT bits. That works for me on a Mega16 which is pretty much the same. I did have to do a lot of messing around to arrive at settings which worked. -- Tim Mitchell
"Tim Mitchell" <timng@sabretechnology.co.uk> wrote in message
news:TdIdu7ZCbcUAFAJ0@tega.co.uk...

> I use 15pf caps;
Isn't that way too low? From the crystal's point of view, both caps are in series, thus loading the crystal with only 7.5pF. Add another 3 from the crystal pins on the AVR and your total crystal load is about 10pF. Most crystals are spec'd to be loaded with 25pF, which means both caps should be _at least_ 33pF. Meindert
On Fri, 12 Mar 2004 14:18:42 +0000, Tim Mitchell
<timng@sabretechnology.co.uk> wrote:

>In article <4050df5f$0$2817$61fed72c@news.rcn.com>, RCS <rcs@erols.com> >writes >>Could anyone help?... >> >> I am having trouble switching from the 8mhz internal clock to an >>external 16mhz crystal on a AVR mega32. I was able to switch from the >>1Mhz internal clock to the 8Mhz internal. But I can't get the external >>crystal to function? What is the procedure? >> >> I have already messed up four M32's and still can't get one to work at >>16Mhz. I am using 22pf caps on the crystal. Do you have any other ideas? >>What are the fuse settings you use for 16Mhz? I am using the bascom AVR >>application to set the fuses. I have tried everything that seems right to >>me. >> >I use 15pf caps; set CKOPT bit; set all CKSEL 3-2-1-0 bits; set both SUT >bits. That works for me on a Mega16 which is pretty much the same. I did >have to do a lot of messing around to arrive at settings which worked.
Same here, except we use a 12 MHz SM resonator and program (clear) the CKOPT bit to get the full rail-to-rail voltage swing from the oscillator amplifier. This works for both the Mega16 and Mega32. See pages 24 (last row of Table 4) and 25 (last row of Table 5) of the Mega32 datasheet. Regards, -=Dave -- Change is inevitable, progress is not.
Hi,
      This could be a stupid question but are you sure you are using the
Mega32 and not the Mega32L?
The L version is only specified to 8MHz.

For ATMega32 with 16MHz xtals I have succesfully used 22pF load capacitors.

Regards,
Ken.


"RCS" <rcs@erols.com> wrote in message
news:4050df5f$0$2817$61fed72c@news.rcn.com...
> Could anyone help?... > > I am having trouble switching from the 8mhz internal clock to an > external 16mhz crystal on a AVR mega32. I was able to switch from the > 1Mhz internal clock to the 8Mhz internal. But I can't get the external > crystal to function? What is the procedure? > > I have already messed up four M32's and still can't get one to work at > 16Mhz. I am using 22pf caps on the crystal. Do you have any other ideas? > What are the fuse settings you use for 16Mhz? I am using the bascom AVR > application to set the fuses. I have tried everything that seems right to > me. > > Help............. > > Thanks, > Steve M. > >