Atmega8 Variants - Are they arduino compatible?

Are Atmega8, Atmega88, Atmega8L all arduino compatible? Can the Atmega8 bootloader work on all variants of ATmega8?

A lil background - I need some Atmega168s for an arduino workshop but there seems to be no stock of any of Atmega8 / 168 / 328 with any of the ATMEL distributors. The only stock left seems to be with retailers and prices are skyrocketing (they’ve quadrupled! in 4 months) now i’m going to shop around with as many retailers as required. Each one seems to have a different variant. Any suggestions of how i can tackle this is welcome

Cheers,
Prakash

Arduino should still be supporting ATmega8 and ATmega8L (which is the same, only tested/spec'ed at lower operating voltages.)

Atmega88 was never supported (though it should not be difficult to do so.)

In theory, I believe ATmega8A, ATmega168P, ATmega168V, and ATmega168PV should also "just work" (8A is the same (and the official replacement) for 8, and the others are variations of the 168.)

Atmega88 seems to be an improvised version of Atmega8… is it so?

http://www.avrfreaks.net/index.php?module=Freaks%20Devices&func=displayDev&objectid=77

Atmega88 seems to be an improvised version of Atmega8... is it so?

Yes. In theory, mega88 is just like a mega168, only with less memory. But (for example) there isn't a bootloader with the correct conditionals in it, and the "obvious" modifications of the 168 bootloader would use up 2k of the 8k, rather than the 1k of the 8k used by the mega8 bootloader. Historically, the mega88 wasn't enough cheaper than mega168 or mega328 for anyone to bother with. Now, with an apparently shortage of 28-pin ATmega chips, it might make sense to support as many as possible!

Now, with an apparently shortage of 28-pin ATmega chips, it might make sense to support as many as possible!

True... ATMEL doesnt seem to be having anything in stock excepting 328s... perhaps time to include others like PIC...prices of 28pin DIPS have shot up like 5 times to what they used to be...

The shortage of DIPs makes me sad.

You just can't beat the simplicity of dropping in a fresh chip when one breaks :P.

prices of 28pin DIPS have shot up like 5 times to what they used to be...

Really? From where? All my usual "reputable" sources (digikey, mouser, sparkfun, adafruit, modern devices, etc) are still charging about the same price they've always charged...

(the eBay $1 ATmega8s seem to have disappeared, though, leaving only other vendors selling the same chips at higher prices... Is that what you meant?)

Hi Prakash,

I'm facing the same problem. I shud've bought a couple of atmega8L s back in the days when they used to be Rs. 60 a piece. Now they're selling for 150-200 :(

As for compatibility, if it is pin compatible, it will run an Arduino code. You can burn your Arduino generated hex file with any programmer. But you'll definitely face problems with the bootloader. Or maybe if you succeed in creating one for mega88, then it's something extra you can teach in your workshop! ;)

BTW, if you manage to get some chips, please let me know, would like to buy some.

Hello, everyone! I've modified the source code atmegaboot.c (mega8/L) to run with atmega88@3.3V&12Mhz. Sketches are uploaded at 38400. Fuse settings are wrong here, I modified them separately. If somebody is interested, write me. With this modification of board.txt everything runs perfectly like there's mega8 instead of 88:

atmega88.name=Arduino NG or older w/ ATmega88

atmega88.upload.protocol=stk500 atmega88.upload.maximum_size=7168 atmega88.upload.speed=38400

atmega88.bootloader.low_fuses=0xff atmega88.bootloader.high_fuses=0xdd atmega88.bootloader.extended_fuses=0x00 atmega88.bootloader.path=atmega88 atmega88.bootloader.file=ATmegaBOOT.hex atmega88.bootloader.unlock_bits=0x3F atmega88.bootloader.lock_bits=0x0F

atmega88.build.mcu=atmega88 atmega88.build.f_cpu=12000000L atmega88.build.core=arduino

Really? From where? All my usual "reputable" sources (digikey, mouser, sparkfun, adafruit, modern devices, etc) are still charging about the same price they've always charged...

(the eBay $1 ATmega8s seem to have disappeared, though, leaving only other vendors selling the same chips at higher prices... Is that what you meant?)

There are problems with supplies and prices, at least in Russia and Ukraine. I can't buy 168 or 328 locally (I mean country, not my town) at all. If I need one or two of them it is too expensive to order them elsewhere and it is too long to wait for 2-3 weeks. The good point of this that I've started programming bare C with WinAVR because I can't fit my project into ATMega8A :)

About the topic starter question:

  1. ATMega8A works without any modifications to bootloader\Arduino

  2. My local suppliers have a lot of ATmega16 and ATmega32. I have a good point on where to take modified source for almost every ATmega chip in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293135409