Ir ao conteúdo

Programando atmega8u2 no Arduino Uno utilizando USB Asp

Olá,

Recentemente meu Arduino parou de ser reconhecido pelo computador. Realizei diversos testes:

– Troquei o Atmega328
– Regravei a bootloader
– Testei o controlador fora da placa
– Medi com o multimetro as conexões básicas para ver se fechava o circuito

Nada disso solucionou o problema e então decidi tentar programar o atmega8u2 que é responsável por controlar a conexão com a USB. Encontrei dois artigos principais os quais usei como base:
Atualizando o Atmega8U2 no Uno ou no Mega2560 usando DFU (Ingles) e também Como atualizar o firmware do atmega8u2 Updating the Atmega8U2 on an Uno or Mega2560 using DFU

Ambos utilizavam de soluções que era necessário soldar um resistor na placa, o que eu não queria fazer, então verifiquei que próximo ao atmega8u2 existem pinos de ICSP e imaginei que os mesmos servem para programar o atmega8u2. Decidi tentar, por garantia removi meu Atmega328 da placa. E conectei meu USB Asp seguindo os pinos da imagem, lembrando que o pino 1 possui uma marcação próxima no meu Arduino UNO uma pequena bolinha.

Após a conexão acessei o diretório que continha os hex do atmega8u2 do arduino Uno (/arduino/hardware/arduino/firmware/) e usei o comando:

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

O mesmo não aceitou dizendo que o identificador de ambos eram diferentes:

avrdude: Yikes! Invalid device signature.

voltei a pesquisar e descobri que o at90usb162 é compativel, então decidi arriscar e forçar a escrita com a opção

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

Esperei gravar, desliguei o arduino, conectei meu atmega328 e a conexão USB voltou a aparecer no computador, tornando assim possivel eu utilizar meu Arduino pela USB novamente.

Matheus

PS: Logo após regravar a bootloader meu atmega328 não sincronizava com a USB, então escrevi a bootloader do atmega328 pro arduino uno novamente e tudo funcionou perfeitamente.

Referencias:
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)

Publicado emArduino

46 Comentários

  1. Really insightful post — Your article is very clearly written, i enjoyed reading it, can i ask you a question? you can also checkout this newbies in classied. iswap24.com. thank you

  2. 1win букмекерская контора официальный сайт зеркало [url=http://1win5521.ru]http://1win5521.ru[/url]

  3. I was suggested this web site by my cousin Im not sure whether this post is written by him as no one else know such detailed about my trouble You are incredible Thanks

  4. Just checking out umcassino and thought I’d share the love. It’s really solid with a user-friendly interface. Give it a whirl, you won’t regret it! You can find it here: umcassino

  5. Really insightful post — Your article is very clearly written, i enjoyed reading it, can i ask you a question? you can also checkout this newbies in seo

  6. I like the valuable info you provide in your articles. I’ll
    bookmark your weblog and check again here
    regularly. I am quite certain I’ll learn many new stuff right here!
    Best of luck for the next!

  7. Really great read — I appreciate how clearly you explained the importance of local online presence for businesses today. It’s a topic many companies overlook, i find it very interesting and very important topic. can i ask you a question? also we are recently checking out this newbies in the webdesign industry., you can take a look . waiting to ask my question if allowed. Thank you

  8. Instagram Chat Assistant – $250 a Day. Several online retailers are looking to hire additional Instagram Chat Assistants to help drive more sales through Direct Messages sent to their Instagram accounts. This is online work that can be done from anywhere, full training is provided and the pay is $250 a day. Hiring workers from all countries. Read full details here to complete your application if you are interested. You can find more info here: http://chat-assistant.advertising4you.co.uk

  9. Everything said made a lot of sense. But,
    consider this, suppose you added a little content? I ain’t suggesting your information isn’t solid, however what if you added a post title to possibly
    get people’s attention? I mean Programming atmega8u2 on Arduino Uno using USB Asp – Matheus Bratfisch is kinda vanilla.
    You might peek at Yahoo’s front page and watch how they create article titles to grab viewers to
    click. You might add a video or a related pic or two to grab readers excited about everything’ve written.
    Just my opinion, it could make your blog a little bit more interesting.

  10. Good day! I know this is kinda off topic however , I’d figured I’d
    ask. Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa?
    My website covers a lot of the same subjects as yours and I believe we could greatly benefit from each other.
    If you happen to be interested feel free to shoot me an e-mail.

    I look forward to hearing from you! Awesome blog by
    the way!

  11. Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to make your point.
    You definitely know what youre talking about, why waste your intelligence on just posting videos to
    your blog when you could be giving us something enlightening to read?

  12. Greetings! Very helpful advice within this article! It’s the little changes which will make the greatest changes.

    Many thanks for sharing!

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *