Atmel AVR Microcontroller discussion group.
atmega8 / mega8-16 - Andreas Hoffmann - May 19 10:00:00 2004
Hi guys,
I just Programmed a little application for the atmega8-16PI, it runs fine, I use the
internal oscilator on 8 mhz. (fuse_low byte low nibble is 0100). Now I put the same code
into an atmega8L-8PI, programmed the same fuse bytes. but now the program doesn't work,
serial output isn't right.. to me it seems the 2nd mega8 runs at the wrong speed.. but
why?
they have the same internal oscillator?!
hope anyone can help,
regards,
Andreas

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - Andreas Hoffmann - May 20 8:05:00 2004
hm, it's me again.. I now found out the serial output is right when I have the
atmega8l-8pi run on 2 MHz. It seems the internal oscillator of the uC isn't that accurate
anymore when it runs at higher frequencies.
regards,
Andreas
On Wed, 19 May 2004 16:00:55 +0200
Andreas Hoffmann <eldorado@eldo...> wrote:
> Hi guys,
>
> I just Programmed a little application for the atmega8-16PI, it runs fine, I use the
internal oscilator on 8 mhz. (fuse_low byte low nibble is 0100). Now I put the same code
into an atmega8L-8PI, programmed the same fuse bytes. but now the program doesn't work,
serial output isn't right.. to me it seems the 2nd mega8 runs at the wrong speed.. but
why?
> they have the same internal oscillator?!
>
> hope anyone can help,
> regards,
>
> Andreas
> Yahoo! Groups Links
>

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - David VanHorn - May 20 9:30:00 2004
At 02:05 PM 5/20/2004 +0200, Andreas Hoffmann wrote:
>hm, it's me again.. I now found out the serial output is right when I have the
atmega8l-8pi run on 2 MHz. It seems the internal oscillator of the uC isn't that accurate
anymore when it runs at higher frequencies.
The internal RC really isn't suited for serial UART operation.
Too much error over the range of voltage and temperature.
You should be using a resonator, or crystal here.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - Zack Widup - May 20 9:32:00 2004
I wondered about that. The ATmega8 is spec'd to 16 MHz but the ATmega8L
is only spec'd to 8 MHz. I haven't played around with this yet with
AVR's, but when you're at or near the limit of frequency listed in the
specs, things could be inaccurate. I've encountered this with Microchip
PIC's with internal oscillators.
Zack
On Thu, 20 May 2004, Andreas Hoffmann wrote:
> hm, it's me again.. I now found out the serial output is right when I have the
atmega8l-8pi run on 2 MHz. It seems the internal oscillator of the uC isn't that accurate
anymore when it runs at higher frequencies.
>
> regards,
>
> Andreas
>
> On Wed, 19 May 2004 16:00:55 +0200
> Andreas Hoffmann <eldorado@eldo...> wrote:
>
> > Hi guys,
> >
> > I just Programmed a little application for the atmega8-16PI, it runs fine, I
use the internal oscilator on 8 mhz. (fuse_low byte low nibble is 0100). Now I put the
same code into an atmega8L-8PI, programmed the same fuse bytes. but now the program
doesn't work, serial output isn't right.. to me it seems the 2nd mega8 runs at the wrong
speed.. but why?
> > they have the same internal oscillator?!
> >
> > hope anyone can help,
> >
> >
> > regards,
> >
> > Andreas
>

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - David VanHorn - May 20 9:59:00 2004
At 08:32 AM 5/20/2004 -0500, Zack Widup wrote:
>I wondered about that. The ATmega8 is spec'd to 16 MHz but the ATmega8L
>is only spec'd to 8 MHz. I haven't played around with this yet with
>AVR's, but when you're at or near the limit of frequency listed in the
>specs, things could be inaccurate. I've encountered this with Microchip
>PIC's with internal oscillators.
It's not about the limit, it's just that RC's are inaccurate by nature.
You can program the osccal byte and improve it a bit, but look at the spec.
You're only allowed about 10% error on serial rate, TOTAL. That's your error plus the
other guy's error. Traditionally, you split the error budget, so anything that's 5% or
better, over the whole temperature and voltage range, is good enough.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - Mike F. Schwarzer - May 21 3:46:00 2004
Hello Andreas,
> hm, it's me again.. I now found out the serial
> output is right when I have the atmega8l-8pi run
> on 2 MHz. It seems the internal oscillator of the
> uC isn't that accurate anymore when it runs at
> higher frequencies.
I think you have to check several Points:
1.
RC-Oszillator isn't very accurate, over wider
temp. and VCC ranges, so if need that your µC
is running at wide temp./VCC Ranges, you must go
to a Quarz based clock.
2.
The internal RC-Oszillator has an Callibration
Byte. With that your able to change the RC-Frequency
from about 6MHz to 12MHz. Of course, if the
Frequency ist to high (12MHz) on an 8MHz µC
everything is very unstable.
With an 16MHz Type, I was able to let him run
stabil at 12MHz with the RC Oscillator.
3.
In serial Communication are normally 10% Baudrate
Error allowed, so one Part my have 5%. When you
look at the Baudrate Tables, you will see Baudrate
which allready have an high Error Rate. Dont use
such Baudrates with internal RC-Oszillator, just
becouse the RC is inaccurate.
mfg
mike
Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - jay marante - May 21 4:03:00 2004
Go for crystals. Check the tables for errors. Id
prefer 7.3728MHz crystals.
--- mike_schwarzer@mike... <mike_schwarzer@mike...>
wrote:
> Hello Andreas,
>
> > hm, it's me again.. I now found out the serial
> > output is right when I have the atmega8l-8pi run
> > on 2 MHz. It seems the internal oscillator of the
> > uC isn't that accurate anymore when it runs at
> > higher frequencies.
>
> I think you have to check several Points:
> 1.
> RC-Oszillator isn't very accurate, over wider
> temp. and VCC ranges, so if need that your µC
> is running at wide temp./VCC Ranges, you must go
> to a Quarz based clock.
> 2.
> The internal RC-Oszillator has an Callibration
> Byte. With that your able to change the RC-Frequency
> from about 6MHz to 12MHz. Of course, if the
> Frequency ist to high (12MHz) on an 8MHz µC
> everything is very unstable.
> With an 16MHz Type, I was able to let him run
> stabil at 12MHz with the RC Oscillator.
> 3.
> In serial Communication are normally 10% Baudrate
> Error allowed, so one Part my have 5%. When you
> look at the Baudrate Tables, you will see Baudrate
> which allready have an high Error Rate. Dont use
> such Baudrates with internal RC-Oszillator, just
> becouse the RC is inaccurate.
>
> mfg
> mike
>
>
> Mit schönen Grüßen von Yahoo! Mail -
http://mail.yahoo.de
__________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] atmega8 / mega8-16 - Mike F. Schwarzer - May 21 5:09:00 2004
Hi All,
> Go for crystals. Check the tables for errors. Id
> prefer 7.3728MHz crystals.
Correct, but with the right Setting of the
RC-Callibration Byte you can get the 7.... MHz
also from the RC-Oszillator.
From my experence the RC-Oszillator work fine,
as long as you have a good stabilized Voltage
(e.g. 7805) and are within a small temperatur witdth.
(e.g. 20degree +/-5)
In case of lower voltages (< 3.6V) you loose
accuracy (Don't know why), also if the Temp. Range
is higher than +/- 10degree, but that normal.
mfg
mike
Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )