Pages: [1]   Go Down
Author Topic: Difference b/w Atmega8u2 and Atmega8?  (Read 1851 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 42
Life is art is life.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I googled around a bit on this but couldn't come up with much.
I know that Atmega8u2 is the USB to serial convertor for arduino. It lets the computer know that the device connected is an arduino and handles all the data going back and forth between arduino and PC.
What I can't understand is that what is the difference between this IC and Atmega8? Why can't we use Atmega8(or 16 or 32) to do what it does?

-Antzy
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why can't we use Atmega8(or 16 or 32) to do what it does?

Why would you want to?  The processors are about the same price and the ATmega8U2 has built-in support for USB.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23837
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

Atmega8/16/32 does not have USB electronics built in.

You can find & review the datasheets for them here
http://www.atmel.com/products/microcontrollers/avr/default.aspx?tab=documents
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 42
Life is art is life.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The thing is Atmega8 is easily available and more popular.
Can't we emulate the USB hardware in atmega8u2 in software, like used by USBtinyISP to connect to PC via USB? I want to know if it's feasible. Doesn't matter if the performance might be low, implementing very complex code and requiring more space.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 443
Posts: 23837
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

Look at the datasheets for the 2 parts, and decide if that might be possible.
I'm off to bed...
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.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The thing is Atmega8 is easily available...

How many do you need?  DigiKey has more than 10,000 ATmega8U2 processors ready to ship.  Seems "easily available" to me.

Quote
...and more popular.

Prove it.

Quote
Can't we emulate the USB hardware in atmega8u2 in software, like used by USBtinyISP to connect to PC via USB?

http://www.obdev.at/products/vusb/index.html
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6379
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can't we emulate the USB hardware in software
yes, within limits.  Low speed rather than full speed, and not actually meeting USB specifications.  Suitable for hobby projects and experimental engineering gear, but not for a product (like Arduino) that you want to sell at Radio Shack and other retail outlets.

It's been done.  There's a thread here: http://www.roboticsindia.com/showthread.php/2922-ARP-Affordable-USB-Arduino-Freeduino-based-Boards
Apparently in India, ATmega8 chips were available very cheap, and FTDI chips were nearly unavailable.  So these guys implemented an ATmega8-based Arduino using a second ATmega8 as the USB/Serial converter.  I gather that it worked OK, but ultimately failed because the low prices of the ATmega8 were more of a temporary glitch in the marketplace than a real savings.  (since then, prices of the 328P have dropped considerably, and the mega8 prices ... not.)  At least in the US.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 42
Life is art is life.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How many do you need?  DigiKey has more than 10,000 ATmega8U2 processors ready to ship.  Seems "easily available" to me.
I'm in India. Not going to pay $40 for shipping for 1 ATmega8u2 smiley

Quote
Prove it.
westfw's comment proves it. In local shops, we get Attiny and generic Atmegas(that too in few select shops). Very hard to find 8u2 or FTDI cables. I couldn't even find an Arduino in Delhi to replace my dead one(which I bought from another city)! They only had clones. Neither do we have option of buying electronics online (unless we're ready to pay double).  smiley-sad-blue

Thanks for the links Coding Badly and westfw. Seems the project which westfw provided used V-USB based AVR-CDC code in Coding Badly's link to implement USB to serial... If I can't find a fairly priced FTDI cable, I'll give that a try for some homebrew arduino.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6379
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can also make an Arduino (at least theoretically) with nearly any other USB/Serial (TTL) converter.  CA42 cell-phone cables are supposed to work (you may not be able to get autoreset to work with these.)
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


This person claims to (almost) have it working...
http://arduino.cc/forum/index.php/topic,131177.msg622672.html#new
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6379
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The "metaboard" that Coding Badly links only uses a single ATmega, running USB on the same CPU as the sketch.
This is similar to Leonardo (but harder, since it's all software), and is significantly different than using a separate AVR to do JUST the USB/Serial conversion, with an otherwise "standard" AVR to run the sketch.
Logged

Pages: [1]   Go Up
Jump to: