ATMEGA8U2 Breakout

Replacement:DEV-11117. We have retired this item to make more room in the catalog for the ATMega 32U4. This page is for reference only.

The board comes pre-loaded with the SparkFun USB to Serial COM Port firmware. When the board plugs into a USB port, Windows will ask for a driver, point to the driver .inf file found here. The board should now enumerate as a 'SparkFun COM Port' and act the same as the SparkFun FTDI Basic. In other words, you can use it as a USB to serial bridge or you can use it to load code with Arduino. In addition, the pinout on the end of the board is the same as the FTDI Basic, which means you can plug it directly into boards like the Arduino Pro.

In addition to the USB to serial firmware, the board also has Atmel's DFU bootloader installed. For information on how to use the bootloader, see the readme file here. You will need to first install Atmel's FLIP software. The bootloader allows you to load your code over USB. See the LUFA project for more example projects.

There is also a selectable 3.3V/5V jumper to set the logic level and VCC voltage.

Note: If using this board to load code with the Arduino IDE, be sure to select the 'Arduino Pro (5V, 16MHz) w/ATmega328' as the device. If using the DFU bootloader with Atmel's FLIP software, be sure to select the AT90USB82 as the device in FLIP.

Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • tz / about 14 years ago / 3

    It would be nice if you left room for code somewhere. 4008 of 4096 bytes used.
    And/or shared the LUFA in the bootloader with the main code.
    I was trying to add my J1850 timer1 decode, but it is just under 400 bytes, so won't fit, at least not alongside the existing code.
    I hope you consider putting on a 16U2 or 32U2 so I might actually be able to do something beyond flashing a LED. Even my tiny bitbang I2C master code won't fit.

    • Demolishun / about 13 years ago / 2

      Well I just did some surgery on one of my boards and it is now running a Atmega32u2. I used the $10 heat gun from Spark Fun, did some swearing, nearly destroyed some traces, and then finally got everything in place and working. I would recommend a decent soldering iron with a "new" tip.
      So, you can purchase your own Atmega32u2 and do some surgery. It is simple and the pinout is the same. Yes, I would like Sparkfun to do it for me, but in the mean time...

  • bennard / about 10 years ago / 1

    I bought one of these in 2011. It never worked quite right and i cant remember successfully loading code to a single board with it. I forget every few months and take it out to try to program something and nope it doesnt work and put it back. Ive sneered at it for four years, thinking how it was a total waste of $20.

    Just this week i thought up a project that could use less pins than the atmega32u4 but still wanted usb, and remembered i had this. I threw some code together in the AVR Studio and loaded it with my pocket programmer and WOOOO, it has finally been useful!

  • Member #21083 / about 12 years ago / 1

    I personally prefer Teensy since it also has a kind of debug output where you can print the contents of variables to the screen, including some simple hexadecimal formatting.

    The first thought that came to mind when I saw this board was 'how does this differ from Teensy'? Sure, it has a 6-pin programming header, but since I can write a program through the USB cable why would I care about it?

  • The flip software does not work on this board to update the bootloader for me. Hit the reset button, selected AT90USB82 as the processor but cannot select USB. It just gives a few .dll errors. Tried on a windows 7 machine and an older windows XP machine. Has anyone else had luck? I might try and get a proper JTAG ice programmer and solder on the ICP connector to get the hex file in. Not sure of the fuse settings though.

  • Laci / about 13 years ago / 1

    I'm interested what is the voltage regulator used on this board.

    • At the moment we are using MIC5205-3.3 BM5TR-LF. Hope that helps!

    • Kuy / about 13 years ago / 1

      It's a SOT23-5 LDO (low-dropout) linear regulator. I don't know the exact part Sparkfun uses but in my projects I like the NCP699 from ON Semi. It's inexpensive, abundant, only has a 340mV dropout voltage and is pin-compatible with the one on this board.

      The ATmega8u2/16u2/32u2 chips actually have a built-in LDO regulator that lets the USB interface operate at the nominal 3.6V when the chip is powered by the 5V USB bus. This same LDO can power the chip's I/O and (some) peripheral circuitry for USB-powered projects, check out section 20.3 in the chip's datasheet.

  • Member #290899 / about 13 years ago / 1

    This board did NOT come with DFU firmware installed, so you can't program it over USB with FLIP or dfu-programmer. There is no way to program the device without additional AVR programming hardware.

    This board should have been shipped with DFU firmware installed, and an additional hardware button that causes it to enter DFU mode at startup. Kind of useless without that.

    • SlyVixsky / about 13 years ago / 1

      I'm going to assume you read the read-me file linked in the description that dies indeed tell you how to access the DFU bootloader :D My problem is working to install another bootloader in place of the DFU.

      • Demolishun / about 13 years ago / 1

        Today I am having the same problem with 2 of the mega8u2s. They are brand new and I just bought them a couple months back. These plus one a further back did not have the DFU bootloader on them. I just took a trip to Radio Shaft to get a Arduino Uno so I can build another programmer.

        To be clear I followed the instructions to get the boot loader to kick in. However I could not get it to register as anything but a SparkFun USB Serial Port.

  • Demolishun / about 13 years ago / 1

    Hey Sparkfun,
    I just bought another one of these a couple months back and it does not have any firmware loaded that I can tell. I just got around to playing with it just today. Not a big deal for me because I have a programmer I can use. Might be a bit confusing for someone else though. I know the description says it should have a bootloader on it, but this one does not seem to.

  • simonx / about 13 years ago / 1

    Has anyone managed to get this board loading sketches to an ATmega328 w/ Uno optiboot (DEV-10524)?
    I've got a 328 running happily on a breadboard as per the Arduino Breadboard tutorial, but I haven't been able to load a sketch to it using either the manual reset method, or the auto-reset from the DTR pin with 0.1uF capacitor in series (& 16Mhz resonator).
    I've rebuilt the circuit several times and know it off by heart. I can load sketches using an Uno board without a chip in it, but I'd really like to get the ATMEGA8U2 Breakout loading sketches.

    • frefol / about 13 years ago / 1

      I was just using this to program my DEV-10524 on Sunday, which worked just fine; at least until my USB port on the breakout board broke.

  • prairie mystic / about 13 years ago / 1

    This does not work for Win7/x64, the USB driver gives error code 10 meaning it's out of date.
    Found this on the Arduino Mega 2560 too, which uses this 8U2.

  • Thinking of getting Arduino Fio But not sure whether this will work with it or not, being 3.3V and this being 5V.
    Thanks
    Sam

  • baum / about 13 years ago / 1

    Would it be possible to remove SFE's firmware in place of something like ArduinoISP to create a USBtinyISP without the messy V-USB software?

    • Kuy / about 13 years ago / 1

      What's messy about V-USB? It's almost certainly the best and most reliable low-speed software USB implementation in existence. It only requires calling a few functions, implementing a few of your own and compiling two files. What could be simpler?

  • heathkid / about 14 years ago / 1

    I agree with previous posts... it seems SFE has overlooked the power and capabilities of the Atmega32u4. Why?

  • sonictj / about 14 years ago / 1

    According to the datasheet of the atmega8u2, when you operate this board at 3.3v you must run using the internal oscillator. VCC should exceed 4.5V to be run at 16MHz.

  • Ozz / about 14 years ago / 1

    I love u sparkfun! So thats why you dont need teensy :D

  • duckythescientist / about 14 years ago / 1

    Even when I enable all layers in Eagle, I still cannot see the ground plane. Why is this?

    • Ocean Controls / about 14 years ago / 1

      click the ratsnest button and it will be generated

  • GB / about 14 years ago / 1

    Regarding the USB Virtual COM Port functionality, is this using the Windows built-in communication class drivers?
    If it is then it should also work with Mac and Linux ... though I don't know what replaces the INF file on those systems.

    • Kuy / about 13 years ago * / 1

      Mac and Linux applications don't need any special files or drivers to communicate with USB devices, as it can (and should!) all be done from userspace. Only Windows has the strange requirement of requiring kernel-space drivers for USB devices, hence the widespread abuse of the HID class (which Windows doesn't need a driver for.)
      On Linux libusb is the usual choice, but you really should avoid it if you can (see footnote) and send packets via ioctl() according to declarations in the kernel header 'include/linux/usbdevice_fs.h'.
      On Mac, use the excellent and powerful IOKit to find and send/receive packets with a USB device. It's easy, highly reliable, well-documented and works with everything.

      Footnote: The explanation of why to avoid libusb exceeds the scope of this comment, take it as veteran engineering advice.

  • FLAKElabs / about 14 years ago / 1

    I got LUFA to compile fairly easy. The DFU loader takes 4KB. Virtual serial seems to take a pretty big chunk of space too 2942 bytes. Not leaving a ton of space for user code.

  • Steven Osborn / about 14 years ago / 1

    An alternative to FLIP that is much easier to use IMO (and works on OSX) is dfu-programmer: http://dfu-programmer.sourceforge.net/

  • Steven Osborn / about 14 years ago / 1

    It seems the width of this board is a little odd, if you want to use it in a breadboard. It would be nice if the width between the left side and right side was slightly narrower so that it could sit flush without angling the pins.

  • For anyone having problems with driver unde 64bit windows check Dean Camera's blog: http://fourwalledcubicle.com/blog/2009/11/getting-flip-to-work-in-64bit-windows/

  • Demolishun / about 14 years ago / 1

    Okay, this is way harder than it needs to be or way easier than I can see it being. Here are the instructions I am trying to follow:
    instructions
    I am stuck at -grab hex and -change fuses.
    I cannot figure out inside AVR Studion 4.18 to open the hex other than a text file, and there are no options for fuse changing. I did not compile this in AVR Studio either. I did it from the command line using WinAVR.
    I cannot load the firmware I compiled nor the firmware you supplied. FLIP gives me a "Address out of range." no matter what I do.

    • Demolishun / about 14 years ago / 1

      Oh man, I just realized I am supposed to have an AVR programmer to reset the fuses for this chip. That really blows chunks... I gotta check the schematic to see if the one I built will work. Hopefully voltage is not too high.
      Why is it the chip is not setup to be programmed through the boot loader without needing a hardware programmer? That is really inconvenient.

      • Demolishun / about 14 years ago / 1

        I am just havin' a good ol time... I got my programmer to work with AVRDude. I was able to check and set the fuse values. The funny thing is they were the same as the instructions said they were. So something is messed up if I cannot load the firmware on the download location that is supposed to be loaded on the device when shipped. So I have no clue as to why I cannot load that firmware. It tells me I need to whack the bootloader and put my own junk on there.
        Is there a reason the bootloader takes half the chip? The FLIP software only sees 4k and this in an 8k chip. I need to find a lighter weight bootloader. Yes, I realize it is USB.

        • Demolishun / about 14 years ago * / 1

          Okay, I am on crack. I have been trying to load the: sparkfun-usbdfu.hex file instead of the: sparkfun_USBtoSerial.hex.
          Well guess what? I successfully uploaded the previous one using AVRDude and it shows up as a ... bootloader! Doh! Now that I got that figured out I can really do some damage!
          Edit: I am done for the day. I got my firmware loaded and it works great. My device shows up as a CDC Serial Port and a HID Mouse. The next step is converting the mouse to a joystick and using the CDC to do Arduino style programming of another Atmel chip.
          Thanks, and hopefully someone else will read this and not get all lost while trying to make this chip work. Also, maybe they won't be up nearly 24 hours... ;)

          • anthezium / about 14 years ago / 2

            so did the programmer end up being necessary or not? i'm in a similar spot in that i want to run the bootloader and upload some new firmware, but i can't get it to do it. according to the readme in the github link i should just be able to ground PD7 (which is connected to the spots labeled DTR on the board right?), hit the reset button, let it go, then release PD7 and it should switch to the bootloader, but I cannot get this to work. anybody else tangled with this? do i in fact need a programmer to update the firmware on this device?

            • Demolishun / about 13 years ago / 1

              Yes, to overwrite the firmware to get full access to the chip requires a programmer. I had built my own before getting this. But you can get one from Sparkfun as well.

  • pp.kettu / about 14 years ago / 1

    This instruction seems incorrect to me: "Note: If using this board to load code with the Arduino IDE, be sure to select the 'Arduino Pro (5V, 16MHz) w/ATmega328' as the device."
    Since ATmega328 has 32 K of flash, and ATmega8U2 only has 8 K. The parts differ in RAM also.

    • sridenour / about 14 years ago / 2

      I'm pretty sure they're talking about using it as a USB-to-serial converter for an Arduino Pro or something. The ATmega8u2 itself isn't directly supported by the Arduino IDE or libraries.

  • Demolishun / about 14 years ago / 1

    Can you build something like this for the AT90USB1287? Now that I have a device that can do USB device mode I really want to get into host mode too.
    What would be really nice is an Arduino style device that has the atmega8u2 for the comm port interface with the AT90USB1287 as the main controller. The Atmega8u2 could program the other chip just like an Arduino. You could include a host usb plug for the ability to do usb device and host mode with the two chips on the same board. This would open up to doing all sorts of cool things. Like using Xbox 360 controllers on the original Xbox (I know they are not HID, but the hardware could do it).
    The LUFA code seems to support host mode for the AT90USB1287 as well.

  • scienceguy8 / about 14 years ago / 1

    Just got mine today. Can't wait to start experimenting. Thanks for breaking out all the unused pins. One of my goals is to use those pins via the Arduino's serial link so I can do more stuff, maybe drive all my LEDs via the 8U2 so I can save the Arduino's pins for the more important stuff.
    Just wanted to point out something interesting: when plugged into a Mac running 10.6.6, the Mac thinks it is a modem. Kinda makes me wonder if I could turn it into an emergency dialup modem with the right DACs and ADCs.

    • AdamTolley / about 14 years ago * / 1

      Mac thinks all serial ports are potential modems, there are some tutorials on ladyada for communicating with their (Atmega32u4) breakout boards via the console on OSX, they would probably be very helpful here.
      Specifically: http://www.ladyada.net/learn/avr/setup-mac.html
      for flashing new firmware.

  • vputz / about 14 years ago / 1

    Just so I understand the "place" for this board... 1) does this basically take the place of the FTDI breakout board for the Arduino Pro boards, and 2) would this basically allow me to use an Arduino Pro with the "represent the USB port as a HID device" hack that is evidently possible on the Unos? (my Orbshield (http://orbduino.sourceforge.net) is having trouble with some chips, and bitbanging a USB port via V-USB is perhaps less elegant than the "existing USB port as HID device" solution).

  • FLAKElabs / about 14 years ago / 1

    Does anyone know if the 8u2 does twi, i2c or analog in. Want to use this with some sensors but the chip seems pretty useless compared to the 32u4.

    • JCWoltz / about 14 years ago * / 1

      no I2C, unfortunately. I bought a few of these chips when the UNO came out, and started a design. Then found out no I2C. Don't think it has and ADC either. Datasheet will have full details.
      http://www.atmel.com/dyn/resources/prod_documents/doc7799.pdf

      • FLAKElabs / about 14 years ago / 1

        Yeah. I looked at the datasheet. Hoped I read wrong. Oh well.. the 1$ extra for the 32u4 is well worth it.

  • You should mention in the product page that it has you can select the power (5V or 3.3V) and the default is 5V (because I was actually wondering about this)

    • chriscross93 / about 14 years ago / 1

      Yes, a switch would be GREAT!

    • Jamo / about 14 years ago / 1

      Nice work spotting that, it makes the board even better. Does anyone know of a smd switch that could be soldered in place there?

  • Kevin Vermeer / about 14 years ago / 1

    Can this product be used with Mac or Linux, like the FTDI board? The line:

    Windows will ask for a driver
    is not encouraging.

    • AdamTolley / about 14 years ago / 1

      I think the driver is just to get the 'SparkFun COM Port' with the factory firmware. Depending on how its programmed, it can act as a number of plug and play, class compliant devices, from what I understand.

      • naimis / about 14 years ago / 1

        As others have mentioned, there are alternatives, e.g. the arduino fw. One could also look at atmel's web page at http://www.atmel.com/dyn/products/product_docs.asp?category_id=163&family_id=607&subfamily_id=760&part_id=4600 to find a variety of USB firmware examples, including serial, mouse, and keyboard.
        I programmed the arduino fw and the device popped up as an "arduino uno" under windows. That same firmware was recognized by a SunRay thin client as a serial device in the past so I'm kind of curious to see how that ends up working out.

      • chriscross93 / about 14 years ago / 1

        One could also use the firmware that comes on the UNOs.
        https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/arduino-usbserial

      • Yeah, you hit the nail on the head. The firmware is just for the basic functionality as we see it on the Uno. Give it time and people will be posting their own firmware examples.

    • LukeW / about 14 years ago / 1

      The Arduino Uno uses the same micro for USB and it's description says this:
      "...no drivers needed for Linux or Mac (inf file for Windows is needed)..."
      I can't see why this would be any different.

  • Dean Camera / about 14 years ago / 1

    I've just added support to the LUFA trunk for this - from the next release forward you will be able to use "BOARD = SPARKFUN8U2" in the project makefile to correctly control the LED with the LUFA LED driver.
    - Dean

  • Mr. Deahl-Coy / about 14 years ago / 1

    Yay! my suggestion is now a reality!

  • AdamTolley / about 14 years ago * / 1

    Awesome!
    I am going to guess this was in development before I suggested it, but I am still going to feel special about it, okay?
    ( http://forum.sparkfun.com/viewtopic.php?f=5&t=25835 )

  • JoshFranz / about 14 years ago / 1

    Why do you select AT90USB82? I haven't worked with this software, but I'm looking into getting involved with AVR USB devices.

    • Kuy / about 13 years ago * / 1

      Atmel still has some naming dysfunction in their AVR (or is that AT90?) line, especially with the USB parts. The 8U2..32U4 naming scheme is newer and represents both a branding and technical change. See the appropriate Atmel Application Note.

  • Audiobuzz / about 14 years ago / 1

    My life is complete!

    • haha, glad we could help.

      • Audiobuzz / about 14 years ago / 2

        my life would be super-saturated if you would release a atmega32u4 version...hint hint :-)

        • frank26080115 / about 14 years ago / 1

          Just go get a Teensy which is exactly what you need

          • jwatte / about 13 years ago / 1

            The problem with the Teensy is that it doesn't have the six-pin ISP header.

          • Audiobuzz / about 14 years ago / 1

            Except it's out of stock and has a proprietary boot loader

            • frank26080115 / about 14 years ago / 2

              Oh ok, I believe Adafruit also has a ATmega32U4s board similar to the Teensy
              I feel sort of bad mannered plugging other people's products on SparkFun's own site but you want something and I know where to get it.

            • Kuy / about 13 years ago / 1

              Who cares? It's very simple, reliable and tiny (512 bytes!) Besides, a proprietary bootloader is nothing compared to the proprietary and undocumented AVR debugging protocol (DebugWIRE[tm].)

Customer Reviews

No reviews yet.