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

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

Reply to
Antti
Loading thread data ...

What VCC? Sometimes they only work full speed with high voltage.

Reply to
linnix

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

Reply to
Antti

My guess is that the POR signal timing is wrong at 5V. Take all components off the _RESET line and see what happens.

Reply to
larwe

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

Reply to
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?)

Reply to
TT_Man

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

formatting link

Reply to
MK

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

Reply to
Antti

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

Reply to
Antti

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.