How does one go about programming the 16u2 on an Uno? I have the isp header (for the 16u2) hooked up to another Uno programmed as ArduinoISP I'm not talking about DFU or USB->UART, I'm talking about using it like a standalone chip (Like, say, a Leonardo or Yun [the 32u4, not the Linux, obviously])

  • Do you want to use it for something else, or do you want to extent the current firmware on it? I've done the latter to duplicate the reset-output to one of the JP2 headers, so I could use the uno board to program and external atmega over serial. I used DFU to upload, but if you don't care about this DFU bootloader you can use an Arduino-as-ISP to program it. To use the arduino IDE you'd have to create a new board. You can probably copy all/most of it from an ATMega32u4 board.
    – Gerben
    Commented Jun 13, 2015 at 13:20

1 Answer 1


First you need to write a program for it. There is no Arduino core for the 'XU2, so you will need to write it out longhand. Then you compile it. Then you upload it using ISP. Then you run it. Note that the only pins you have access to on the board are the UART pins, the two on the LEDs, and the 3 on the ISP header.

  • 2
    Plus 4 on jp2, making 9 easily usable gpios, plus 2 status LEDs. And how would I go about making a program, and uploading? Commented Jun 12, 2015 at 21:56
  • As the OP said, with the ISP, it costs a few bucks on eBay. Or you can google on how to use one Arduino to program another. That might work too. Commented Jun 13, 2015 at 9:24
  • @AlexanderM: You use the correct tool. Commented Jun 14, 2015 at 1:39
  • 1
    There's no need to use atmel studio for this - the same compiler installed with the Arduino suite will work - see the source of the existing firmware in the Arduino repositories for an example. However, that does not mean that the chip will be supported in the IDE or the Arduino libraries, unless you find a version which someone has extended for this. Commented Jun 14, 2015 at 14:54
  • 1
    True, but getting USB and QTouch working is much easier with AS than trying to get the standalone libraries to work with standalone GCC. Commented Jun 14, 2015 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.