1

I am using an ArduinoISP external programmer to upload a sketch to an Arduino MEGA.

I set the processor type to MEGA 2560, and use Ctrl-Shft-U to upload using a programmer. My programmer is set to ArduinoISP under tools>Programmer.

So far, I haven't been able to get the sketch to upload without a verification error. Worse, the programmer made it far enough in the upload process to overwrite the bootloader. Trying to re-upload the boot loader ("Burn Bootloader") also fails. The verbose error output is below with the exact error at the bottom.

A previous post suggested that code with a lot of 0xFF statements in it would fail. I have none.

Following a suggestion in the comments, I unsoldered the power over ISP programmer jumper (SJVCC) on my ArduinoISP. I powered the Arduino using the power jack; however, I got the same verification error.

I have also tried updating the software the the latest version (1.6.12), but that also does not seem to work. I may try to downgrade the software, but this all seems a little futile. Other forums don't seem to have a good answer for similar verification problems.

Is this a known problem? What can I do to fix it? What is particularly frustrating is that the problem occurs intermittently, ocassional after a computer reboot, it will upload successfully one time.

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : usb
     Using Programmer              : arduinoisp
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x2341-0x0049
     AVR Part                      : ATmega2560
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
       flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : USBtiny
     Description     :  
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be     performed
     To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Using SCK period of 10 usec
avrdude: reading input file     "C:\Users\Michael\AppData\Local\Temp\builddfc205ae09caa85de62f61bf2adae2c7.tmp/Tension_wo_Averaging.ino.hex"
avrdude: writing flash (9334 bytes):

Writing | ################################################## | 100% 10.71s

avrdude: 9334 bytes of flash written
avrdude: verifying flash memory against     C:\Users\Michael\AppData\Local\Temp\builddfc205ae09caa85de62f61bf2adae2c7.tmp/Te    nsion_wo_Averaging.ino.hex:
avrdude: load data flash data from input file     C:\Users\Michael\AppData\Local\Temp\builddfc205ae09caa85de62f61bf2adae2c7.tmp/Tension_wo_Averaging.ino.hex:
avrdude: input file                     C:\Users\Michael\AppData\Local\Temp\builddfc205ae09caa85de62f61bf2adae2c7.tmp/Tension_wo_Averaging.ino.hex contains 9334 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 7.34s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0600
         0xdd != 0x4a
avrdude: verification error; content mismatch

avrdude done.  Thank you.
Michael Molter
  • 225
  • 2
  • 10
  • How is the board powered? 2) Did you try downloading the zip of Arduino IDE 1.5.7 and then trying. (might be waste of time but I hear sometimes older versions work better)
  • – Visual Micro Nov 07 '16 at 16:38
  • The ArduinoISP provides power to the board, but I have tried it with a USB cable plugged in too. – Michael Molter Nov 07 '16 at 16:40
  • Haven't tried the older version yet. Will work on that too. – Michael Molter Nov 07 '16 at 16:40
  • Did you put the jumper back on the ISP when trying external power? – Visual Micro Nov 07 '16 at 16:41
  • No, the ArduinoISP doesn't have jumper pins, just jumper pads. I didn't change any of the soldering. – Michael Molter Nov 07 '16 at 16:42
  • https://www.arduino.cc/en/Main/ArduinoISP – Michael Molter Nov 07 '16 at 16:43
  • By default, my board had the SJVCC jumper soldered over, indicating it should be able to power the board. – Michael Molter Nov 07 '16 at 16:47
  • I tried desoldering the SJVCC pin, and powering over USB while programming. Same problem. – Michael Molter Nov 07 '16 at 16:54
  • Yes I read the ISp article on Arduino.cc. It mentions verification errors and says to power via external power so having a soldered power jump on the ISP might be an issue. – Visual Micro Nov 07 '16 at 17:08
  • I updated my question with the latest tests. – Michael Molter Nov 07 '16 at 19:21
  • Did you try older arduino ide? The tools have changed. If that doesn't work try using the Device Programming Tools in Atmel Studio to burn the bootloader – Visual Micro Nov 08 '16 at 13:20
  • Similar to: https://arduino.stackexchange.com/q/44965/19409 https://arduino.stackexchange.com/q/59837/19409 https://arduino.stackexchange.com/q/52798/19409 – sa_leinad Dec 18 '18 at 15:30
  • I'm having the same problem with my USBtinyISP. It worked great for about a year and then one day it started giving verification errors on every board that I own. I tried a new ICSP cable, a different PC, several Arduino boards and it consistently corrupts flash (verification errors!). The board seems to work fine as far as my PC is concerned. I've ordered another USBtinyISP, hopefully this next one will last longer than the first. – Jeff Wahaus Jan 17 '19 at 17:29