Pages: [1]   Go Down
Author Topic: ATmega4 vs ATmega8 vs ATmega328. Project use? (question)  (Read 5761 times)
0 Members and 1 Guest are viewing this topic.
Around St. Louis
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, as I've stated in a different post, I'm working with making an arduino system that's practically an led control kit. I also found online that the ATmega4 and ATmega8 performs the same as a 328 as far as speed, power consumption, etc. I was just wondering is there any reason an ATmega4/8 can't run arduino? The main reason I ask is, because I'm not too worried about 8kb of space on the ATmega8 being to small (most programs that I'd be writing to it would be at most 100 lines) compared to the 328' 32kb (... I now get the naming convention of the 328.... smiley-lol), I am kind of worried about the 4kb of the Atmega4, with the bootloader on it. I don't think the application of turning on and off leds is very ram intensive, so the extra 1kb ram from the 8 isn't really needed (script doesn't use many variables either).

So... O-o I guess what I'm asking, is the ATmega4/8 compatible with arduino?

The main reason I ask is because an ATmega4 is only $1.77, ATmega8 is only $2.30 where as the 328 is $3.42 (all surface mount, all not pre-programmed, from mouser). Sure, in the short term, it isn't that much of a difference in cost, but the cheaper I can make my own chips, the more neat little toys I can make smiley-razz. I think my total build cost per unit would be less then $5 per unit if I can just use the ATmega8, and possibly even less then $4 with the ATmega4.

Are there any other cheaper alternative chips like these that do work with the arduino bootloader?

(>_< sorry for the two different posts so quickly together, but they aren't really all that related)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 202
Posts: 8716
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ATtiny25 can be bought for $1.89 from Digikey in single quantities and there is an Arduino core for it.

http://code.google.com/p/arduino-tiny/
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Around St. Louis
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for pointing those out. I'd still like all the outputs though. The closest is the ATtiny2313, with 18 i/o pins, which would actually be fine, but if I can use the ATmega4, I'd still have all 20 i/o pins at the same cost. (atmega4 on mouser is $1.77 so if it's possible to use it, it'd be at the same price)

The ATtiny25 is cheaper on mouser also, ($1.18 for single) but it still only has 6 i/o pins. Super small projects would be fine, but not for the gadgets I have in mind every once in a while.

I've searched for arduino on the 4 and 8, and found stuff about it on the 8, but not the 4. Is that because of the size of the bootloader maybe?
« Last Edit: October 10, 2011, 04:20:11 pm by Caliber Mengsk » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26538
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can always download your sketch into them directly and just not have a bootloader.
You down load via the MISO/MOSI/SCK pins, vs having the bootloader accept sketch from the UART and then loading it into Flash memory.

Get yourself a programmer like this:
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

http://store.nkcelectronics.com/pocket-avr-programmer.html

I have both, have only used the first one so far.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 5557
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What's an ATMega4? Maybe you mean an ATMega48 (88, 168, 328 - notice the progression)...?
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26538
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, 4, 8, 16, 32, whatever it takes smiley
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Around St. Louis
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@CrossRoads: I have no clue how to program with standard avr. Not even a smidgen smiley-razz That's why. Have any resources for newbies that my be useful? If it's easy enough and such, sure I'd be interested. It would let me program for a much more broad amount of micro controller ic's.

@cr0sh: You're right, it is a 48, not 4... but has what you might expect by just being a 4 for the specs. http://www.mouser.com/ProductDetail/Atmel/ATMEGA48A-AU/?qs=sGAEpiMZZMuHCAZ7U3Ea2oLmFWtgS%2fZs
Only 4kb of memory and .5kb of ram.
Logged

Rochester, NY USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

You could download AVR Studio from Atmel (free) and be able to debug and program your Atmega microcontrollers. I'd recommend a AVR dragon which is a low cost programmer/debugger.

If you have more questions and need a place for more AVR resources check out, avrfreaks.com which is a community of AVR enthusiasts who are very helpful.

Alan
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26538
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Caliber Mengsk,
I've not used the AVR ISPs except from within the Arduino IDE, using Tools:Download Bootloader:Using _____, something along those lines.
I would suspect that downloading a sketch might be performed similarly.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I got some refurbished SMD ATmega8 for $ 1.96 each on eBay, and they work.

http://www.ebay.com/itm/10-pcs-ATmega8A-AU-NEW-ORIGINAL-ATMEL-TQFP32-8-bit-MCU-/170659460920?_trksid=p5197.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D4%26po%3DLVI%26ps%3D63%26clkid%3D3723796260554712631

The best part is they are fully arduino compatible, no extra cores needed.

Wk
Logged


0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ATmega8 was even used as an Arduino IC in the past, before it was upgraded to the 168 and then the 328. You should note that it has fewer timer outputs (so you cannot use PWM on as many pins) and does not support pin change interrupts on any pin, though.
The 48 belongs to the same line as the 168 and the 328, but its self-programming features are not as advanced. The 88 should be fairly compatible, though.
« Last Edit: October 25, 2011, 07:50:19 am by Fat D » Logged

Brazil
Offline Offline
God Member
*****
Karma: 3
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Indeed, forgot to mention that. Also, if you don't know what to do with the SMD chip, here's a nice adapter to use with a breadboard.

http://www.ebay.com/itm/270707899662?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Combining both will still go for under $ 4 USD, which is a good price.

Wk
Logged


Pages: [1]   Go Up
Jump to: