EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Atmega8-L at 8MHz internal oscíllator not stable?

Started by Antti July 25, 2007
Hi

I am not believing what I see, but I have a board where ATmega8L
doesnt want to work with 8MHz internal oscillator setting - the
datasheet does not say its invalid setting, and I think I have used
it before, but now this board only works at 4MHz or at 8MHz
when the OSCCAL is written to lower value <112 to reduce the
internal clock - any ideas what could be wrong?

Antti

On Jul 25, 11:00 am, Antti <Antti.Luk...@googlemail.com> wrote:
> Hi > > I am not believing what I see, but I have a board where ATmega8L > doesnt want to work with 8MHz internal oscillator setting - the > datasheet does not say its invalid setting, and I think I have used > it before, but now this board only works at 4MHz or at 8MHz > when the OSCCAL is written to lower value <112 to reduce the > internal clock - any ideas what could be wrong? > > Antti
What VCC? Sometimes they only work full speed with high voltage.
On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote:

> my guess is that the 8L chip runs up to 8MHz and little above, but > that > the internal oscillator will run way over 8MHz at 5V
My guess is that the POR signal timing is wrong at 5V. Take all components off the _RESET line and see what happens.
"Antti" <Antti.Lukats@googlemail.com> wrote in message 
news:1185426468.756526.59970@w3g2000hsg.googlegroups.com...
> On 25 Jul., 23:00, larwe <zwsdot...@gmail.com> wrote: >> On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote: >> >> > my guess is that the 8L chip runs up to 8MHz and little above, but >> > that >> > the internal oscillator will run way over 8MHz at 5V >> >> My guess is that the POR signal timing is wrong at 5V. Take all >> components off the _RESET line and see what happens. > > I guess your guess is wrong, at 5V the atmega is starting execution of > instructions > as long as I dont use stack the MCU works, that is I can blink a led > in simple loop > but as soon as stack is used the mcu goes wild.. > > Antti >
I think the data sheet specs the int osc @3v3 only and also says 50% spread so at 5V you may be OTT( overclocked?)
"TT_Man" <Someone@ntlworld.com> wrote in message 
news:ny1qi.2007$ph7.1277@newsfe5-win.ntli.net...
> > "Antti" <Antti.Lukats@googlemail.com> wrote in message > news:1185426468.756526.59970@w3g2000hsg.googlegroups.com... >> On 25 Jul., 23:00, larwe <zwsdot...@gmail.com> wrote: >>> On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote: >>> >>> > my guess is that the 8L chip runs up to 8MHz and little above, but >>> > that >>> > the internal oscillator will run way over 8MHz at 5V >>> >>> My guess is that the POR signal timing is wrong at 5V. Take all >>> components off the _RESET line and see what happens. >> >> I guess your guess is wrong, at 5V the atmega is starting execution of >> instructions >> as long as I dont use stack the MCU works, that is I can blink a led >> in simple loop >> but as soon as stack is used the mcu goes wild.. >> >> Antti >> > I think the data sheet specs the int osc @3v3 only and also says 50% > spread so at 5V you may be OTT( overclocked?) >
Antti - why don't you try mega48/88 - pin compatible, has on chip debug, bigger safe operating area for clock/volts and the 48 is cheaper thna the mega8 you are using. Michael Kellett www.mkesc.co.uk
On 25 Jul., 22:06, linnix <m...@linnix.info-for.us> wrote:
> On Jul 25, 11:00 am, Antti <Antti.Luk...@googlemail.com> wrote: > > > Hi > > > I am not believing what I see, but I have a board where ATmega8L > > doesnt want to work with 8MHz internal oscillator setting - the > > datasheet does not say its invalid setting, and I think I have used > > it before, but now this board only works at 4MHz or at 8MHz > > when the OSCCAL is written to lower value <112 to reduce the > > internal clock - any ideas what could be wrong? > > > Antti > > What VCC? Sometimes they only work full speed with high voltage.
actually its the other way around, ;) my design is targetting 3.3V and it works at 3.3V and 8MHz, but I had the programmer giving 5V VCC, and at 5V it DOES NOT WORK. this is weird. at atmega8 at 5V and internal 8MHz starts does something so that can make LED on, but trying to call a subroutine makes all dizzy unless the OSCCAL is heavily adjusted down.. my guess is that the 8L chip runs up to 8MHz and little above, but that the internal oscillator will run way over 8MHz at 5V Antti
On 25 Jul., 23:00, larwe <zwsdot...@gmail.com> wrote:
> On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote: > > > my guess is that the 8L chip runs up to 8MHz and little above, but > > that > > the internal oscillator will run way over 8MHz at 5V > > My guess is that the POR signal timing is wrong at 5V. Take all > components off the _RESET line and see what happens.
I guess your guess is wrong, at 5V the atmega is starting execution of instructions as long as I dont use stack the MCU works, that is I can blink a led in simple loop but as soon as stack is used the mcu goes wild.. Antti
On 26 Jul., 17:53, "MK" <nos...@please.com> wrote:
> "TT_Man" <Some...@ntlworld.com> wrote in message > > news:ny1qi.2007$ph7.1277@newsfe5-win.ntli.net... > > > > > > > > > "Antti" <Antti.Luk...@googlemail.com> wrote in message > >news:1185426468.756526.59970@w3g2000hsg.googlegroups.com... > >> On 25 Jul., 23:00, larwe <zwsdot...@gmail.com> wrote: > >>> On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote: > > >>> > my guess is that the 8L chip runs up to 8MHz and little above, but > >>> > that > >>> > the internal oscillator will run way over 8MHz at 5V > > >>> My guess is that the POR signal timing is wrong at 5V. Take all > >>> components off the _RESET line and see what happens. > > >> I guess your guess is wrong, at 5V the atmega is starting execution of > >> instructions > >> as long as I dont use stack the MCU works, that is I can blink a led > >> in simple loop > >> but as soon as stack is used the mcu goes wild.. > > >> Antti > > > I think the data sheet specs the int osc @3v3 only and also says 50% > > spread so at 5V you may be OTT( overclocked?) > > Antti - why don't you try mega48/88 - pin compatible, has on chip debug, > bigger safe operating area for clock/volts and the 48 is cheaper thna the > mega8 you are using. > > Michael Kellett > > www.mkesc.co.uk- Zitierten Text ausblenden - > > - Zitierten Text anzeigen -
thanks, yes well actually mega88 QFN is easier to obtain than m8, so I may from that reason use it for production runs, but on the dev board its M8, but its no problem any more as it does work at 3.3 and that is what I need. m48 is cheaper than m8 but unfortunatly I need 8K full (over 4K is unrolled blowfish encryption key). m8 price is cool 0.80 ;) havent checked m88 pricing yet Antti
On 26 Jul., 18:12, Antti <Antti.Luk...@googlemail.com> wrote:
> On 26 Jul., 17:53, "MK" <nos...@please.com> wrote: > > > > > > > "TT_Man" <Some...@ntlworld.com> wrote in message > > >news:ny1qi.2007$ph7.1277@newsfe5-win.ntli.net... > > > > "Antti" <Antti.Luk...@googlemail.com> wrote in message > > >news:1185426468.756526.59970@w3g2000hsg.googlegroups.com... > > >> On 25 Jul., 23:00, larwe <zwsdot...@gmail.com> wrote: > > >>> On Jul 25, 4:47 pm, Antti <Antti.Luk...@googlemail.com> wrote: > > > >>> > my guess is that the 8L chip runs up to 8MHz and little above, but > > >>> > that > > >>> > the internal oscillator will run way over 8MHz at 5V > > > >>> My guess is that the POR signal timing is wrong at 5V. Take all > > >>> components off the _RESET line and see what happens. > > > >> I guess your guess is wrong, at 5V the atmega is starting execution of > > >> instructions > > >> as long as I dont use stack the MCU works, that is I can blink a led > > >> in simple loop > > >> but as soon as stack is used the mcu goes wild.. > > > >> Antti > > > > I think the data sheet specs the int osc @3v3 only and also says 50% > > > spread so at 5V you may be OTT( overclocked?) > > > Antti - why don't you try mega48/88 - pin compatible, has on chip debug, > > bigger safe operating area for clock/volts and the 48 is cheaper thna the > > mega8 you are using. > > > Michael Kellett > > >www.mkesc.co.uk-Zitierten Text ausblenden - > > > - Zitierten Text anzeigen - > > thanks, yes well actually mega88 QFN is easier to obtain than m8, so I > may from that reason use it for production runs, but on the dev board > its M8, but its no problem any more as it does work at 3.3 and that is > what I need. m48 is cheaper than m8 but unfortunatly I need 8K full > (over 4K is unrolled blowfish encryption key). m8 price is cool > 0.80 ;) > havent checked m88 pricing yet > > Antti- Zitierten Text ausblenden - > > - Zitierten Text anzeigen -
i was too quick claiming that Atmega8-L works at 8MHz-3.3V a simple loop works 8MHz 5V and 3.3V a loop with function call fails at 5V, works at 3.3V a looped no stack use with algorithm and rom tables fails at 5 and 3.3V and 8MHz ! it starts working stable somewhere at 6.8MHz this is really annoying, Atmel datasheet doesnt say that 8MHz operation is not working at all for Atmega-8L ! and whats worse depending on the firmware it MAY work, until firmware change that makes it failing fully Antti

The 2024 Embedded Online Conference