I bought an ATMEGA2560 on eBay and programmed it with Arduino IDE 1.6.9 using the USB cable, and the LED blinked as expected - All well and good.

Now I wanted to program the mega from my UNO as follows:

  1. Uploaded ArduinoISP to the UNO
  2. Changed the Board to Mega2560 and changed the Programmer to Arduio as ISP
  3. Connected the two ICPS sockets with a 6 wire cable, where pin 5 on the UNO ICPS is cut and instead connected to D10 on the UNO
  4. Upload the Blink sketch: IDE says Uploading for a minute, then some errors:

    avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer

5) Upload Using Programmer: Activity on the UNO (RX/TX) and the LED on the mega lights constantly - And I can no longer program the mega using the IDE

Any pointers to what I did wrong and how to fix it? Best regards

  • 4
    Once you use ISP to erase or program anything other than the bootloader, you lose the ability to use the bootloader until you use ISP (or a more drastic method) to replace the bootloader. So while you have not "bricked" you device, you have put it in a state that will require getting your ISP setup working to recover from. There are countless questions and answers on proper ISP all over the web, your issue is unlikely to be unique but rather something you can solve by finding and reading them. Oct 12 '16 at 19:14
  • 1
    When you're using the Uno as an ISP, make sure you have tx and rx lines wired correctly. Remember, rx on one board should connect to tx on the other board and vice versa. A common mistake is to hook up tx to tx and rx to rx which is incorrect.
    – Izzo
    Oct 12 '16 at 19:15
  • 2
    @Teague ISP uses SPI not UART to communicate with the target processor. Oct 12 '16 at 19:22
  • I have no doubt the truth is out there - I just don't know the right questions :-) I tried burning the bootloader with the same setup, and that got the mega back (the led started blinking, and I can program it using USB), but I still don't know how to program the mega using ICPS - Any pointers what to look for?
    – StefanOfDenmark
    Oct 12 '16 at 19:25
  • 2
    @Teague you would be wrong again. MOSI must be connected to MOSI and MISO to MISO. Unlike a UART interface, SPI/ISP does NOT use crossover. Oct 12 '16 at 19:30

Ah, the problem seems to be in the IDE - Something with the fuses when programming the mega (I won't even pretend to understand that yet). I upgraded to 1.6.12 and everything works like a charm.

Best regards Stefan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy