Skip to content

Programming atmega8u2 on Arduino Uno using USB Asp

Hello,

Recently my Arduino UNO stopped to be recognized by computer (using USB), I tried a few stuffs:

– Changed the Atmega328
– Rewrite bootloader
– Tested the controller on other board
– Measure the connection between a few pins using a multimeter

Nothing worked, so I decided to try to update the atmega8u2 firmware that is responsible to control de USB connection, I found two articles that I used as base:
Updating the Atmega8U2 on an Uno or Mega2560 using DFU e também How to upgrade atmega8u2 firmware

Both of them used solutions that needs to soldering a resistor on the board, but I don’t want to solder anything to the board, so I checked next to the atmega8u2 exists the ICSP pins, so I decided to try to burn the bootloader using them. Just to prevent other disaster I removed my atmega328 from board and connected the USB ASP to the ICSP pins. (Remember that the PIN 1 has a number or a little mark near it, mine had a small white circle)

After that, I accessed the dir that contains atmega8u2 hex of Arduino Uno (/arduino/hardware/arduino/firmware), and then I tried to rewrite the bootloader:

sudo avrdude -c usbasp -p m8 -u -U flash:w:UNO-dfu_and_usbserial_combined.hex

It didn’t worked because it is a atmega8u2 and I was trying to write it with atmega8 the error was:

avrdude: Yikes! Invalid device signature.

So I did a little more research and I discover that at90usb162 is almost the same, so I decided to take a shot with force (-F) option

sudo avrdude -c usbasp -p usb162 -u -U flash:w:UNO-dfu_and_usbserial_combined.hex -F

I waited it to burn, turn arduino uno off, connected my atmega328 and then turn it on and my USB just showed up on my computer, so now I can program my Arduino UNO using USB again.

Matheus

PS: Right after the booloader update I tried to Upload a Sketch to atmega328 without sucess, it was out of sync, so I tried to rewrite the bootloader of atmega328, and then everything started to work.

References:
http://8515.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=688637
http://image.pinout.net/pinout_10_pin_files/connector_pinout.php?image=avr_icsp.png&pinout=%20This%20a%20pinout%20of%20the%20AVR%20ICSP%20header.%20(6-pin%20&%2010-pin)

Published inArduino

555 Comments

  1. If I were to recommend a starting point for the topic this site would be near the top of my list, and a stop at directionsetsvelocity reinforced that recommendation status, the small list of starting point recommendations I keep for friends asking about topics is short and this site is now firmly on it.

  2. 888 stars [url=https://888starz-uzb3.com/]888 stars[/url]
    Rasmiy sayt ravon o’zbek tili va intuitiv boshqaruv bilan foydalanishga qulay.

    888Games to’plami darhol natija beradigan Crash va Plinko kabi formatlarni jamlaydi.

    888starz o’ttiz beshdan ziyod sport turiga tikishni, jumladan Dota 2 va CS:GO kibersportini taklif etadi.

    888starz doimiy aksiyalar, keshbek va slot musobaqalari bilan o’yinchilarni rag’batlantiradi.

    888starz sutkalik jonli yordamni hamda Android APK va iOS ilovalarini taqdim etadi.

  3. Hello there, You’ve done an incredible job. I?ll certainly digg it and personally recommend to my friends. I’m confident they’ll be benefited from this site.

  4. Reading this in a moment of low energy still kept my attention, and a stop at signalcreatesalignment continued that engagement under suboptimal conditions, content that survives the reader being tired is content with extra reserves of pull and this site has the kind of writing that holds up even when I am not at my reading best.

  5. Thanks for a post that does not try to be funny when it is not the moment for it, and a stop at compassbulb maintained the same appropriate seriousness, knowing when humour helps and when it just signals desperation for engagement is a sign of editorial maturity that many blogs have not developed yet.

Leave a Reply

Your email address will not be published. Required fields are marked *