Flashing Atmega 1280 board firmware using Uno as ISP/AVR

Hello everybody,

being relatively newbie i might wan't more then i can fetch, nevertheless

i have a 3d printer whose board has an atmega1280

this board came with a firmware that seams to have the bootloader disabled since i have not been able to upgrade the firmware as normally, using an application that provides the means to

the board does have icsp 6 pin connection and i have found already that it is possible to flash the firmware using an avr/icsp connector, avrdude and the binary hex file with the firmware

since i don't have that connector, though i am awaiting the arrival of one, i start digging the possibility of using the Arduino Uno for the purpose

so the question is: is it possible?

got some c programming skills, and have fooled around with Arduino before

got the Uno already loaded with the Adafruit ArduinoISP.ino program

got a lot of doubts regarding tx rates, though both board are 16Mhz, and most dauntingly the constants which i should pay attention to

any tips on the steps to follow as well as on which files/headers should i focus to understand a bit more of what i am going to do would be a bless

thank for you kind attention

AJRPM:
so the question is: is it possible?

Sure!

AJRPM:
any tips on the steps to follow as well as on which files/headers should i focus to understand a bit more of what i am going to do would be a bless

Please provide more details of what you're trying to accomplish. Usually when people come here asking about updating 3D printer firmware they are trying to upload an Arduino sketch (such as Marlin) to their controller, which you can do via the Arduino IDE. But you mention a "binary hex file with the firmware". If you have a precompiled .hex firmware file then you can not use the Arduino IDE to flash that to your 3D printer controller but you can simply use AVRDUDE from the command line to do that and AVRDUDE is included with the Arduino IDE.

pert:
Please provide more details of what you're trying to accomplish. Usually when people come here asking about updating 3D printer firmware they are trying to upload an Arduino sketch (such as Marlin) to their controller, which you can do via the Arduino IDE. But you mention a "binary hex file with the firmware". If you have a precompiled .hex firmware file then you can not use the Arduino IDE to flash that to your 3D printer controller but you can simply use AVRDUDE from the command line to do that and AVRDUDE is included with the Arduino IDE.

thank's

i guess i'm trying to use an Uno as avr/isp dongle in order to flash a mightyboard with sailfish 7.7 firmware which is on an hex file

the printer is a ctc clone of makerbot replicator

the mightyboard has an atmega1280 and is provided with an ISP 6 pin connection

so, as i said in my initial post, i have the Uno loaded with Adafruit's ArduinoISP, this, without having changed any parameter value

i don't know if i will have to compile a specifically parameterized version of ArduinoISP.ino for Atmega1280

i don't know whether the AVRDUDE command will do all the magic :slight_smile: and of course i don't want to brick the board

hopefully :), the Uno loaded with that original ArduinoISP.ino compilation will act as an ISP dongle while AVRDUDE does the work, for which i must provide a command line like:

avrdude -c usbasp -p m1280 -P usb -b 115200 -V -U flash:w:mighty_one-Sailfish-v7.7.0-r1432b.hex

only that i don't know also how to specify

-c programmer type
-p AVR device
-P connection port

i apologize for any eventually nonsense doubt

AJRPM:
i guess i'm trying to use an Uno as avr/isp dongle in order to flash a mightyboard with sailfish 7.7 firmware which is on an hex file

OK, I understand.

AJRPM:
i have the Uno loaded with Adafruit's ArduinoISP, this, without having changed any parameter value

I'm not familiar with Adafruit's ArduinoISP sketch but I'll assume it's similar enough to Arduino's ArduinoISP sketch (File > Examples > 11.ArduinoISP > ArduinoISP).

AJRPM:
i don't know if i will have to compile a specifically parameterized version of ArduinoISP.ino for Atmega1280

No, that is not necessary. You only need to compile the 3D printer firmware for the ATmega1280 but that has already been done for you.

AJRPM:
i don't know whether the AVRDUDE command will do all the magic

Yes, it should do that.

AJRPM:
for which i must provide a command line

Even though you will need to use AVRDUDE from the command line to flash the .hex file, the easiest way to generate the correct command is via the Arduino IDE.
DO NOT have 3D controller connected to the Arduino as ISP for this process:

  • Connect the Arduino as ISP programmer's USB cable to your computer.
  • File > New
  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Tools > Board > Arduino/Genuino Mega or Mega 2560
  • Tools > Processor > ATmega1280
  • Tools > Port > Select the port of your Arduino as ISP programmer
  • Tools > Programmer > Arduino as ISP
  • Sketch > Upload Using Programmer

After the upload process fails (because the 3D printer board was not connected), examine the contents of the black console window at the bottom of the Arduino IDE window. You will need to scroll up to see it all. Somewhere in that output you will find the avrdude command generated by the Arduino IDE. It will look something like this:

C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -V -patmega1280 -cstk500v1 -PCOM5 -b19200 -Uflash:w:C:\Users\per\AppData\Local\Temp\arduino_build_856203/sketch_mar27b.ino.hex:i

Copy that line to a text editor where you can easily edit it. If the paths contain any spaces you will need to wrap them in quotes. You need to change this part:

-Uflash:w:C:\Users\per\AppData\Local\Temp\arduino_build_856203/sketch_mar27b.ino.hex:i

to point to the location of your 3D printer firmware .hex file.
Now connect the Arduino as ISP programmer to your 3D printer board following the wiring shown in the tutorial, copy the updated avrdude command to the command line, hit "Enter" and keep your fingers crossed for success!

Thank you so much Pert for your straights forward explanation

i was about to ask which programmer should i select and where could i get the required data for AVRDUDE command line :smiley:

i will give it a try later and post back the results

Thank you very much sincerely

Followup

already try to flash the firmware following Pert's instructions and using Arduino's ArduinoISP.ino but i've forgot to cross my fingers and the result was the following

C:>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega1280 -F -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

C:\>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega1280 -F -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

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

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega1280
         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    131072  256    512  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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega1280 is 1E 97 03
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
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: reading input file "C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex"
avrdude: writing flash (125448 bytes):

Writing | ################################################## | 100% 119.86s

avrdude: 125448 bytes of flash written
avrdude: verifying flash memory against C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:
avrdude: load data flash data from input file C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:
avrdude: input file C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex contains 125448 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 71.37s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x0c
avrdude: verification error; content mismatch

avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

likely i am missing a lot, namely i am not sure if should have select atmega1280 as processor in the previous trial

anyway it also looks like the board doesn't have the bootloader, and that might be the reason why i can't update the firmware via usb

so... i presume i will have to flash the bootloader first

i can get the proper bootloader hex file from Dan Newman Git repository at

but i'am still figuring things out, particularly regarding AVRDUDE param -cstk500v1 implications since as per Distribution's About text

This is the standard ARDUINO STK500V2 bootloader, used on the Atmega 2560 and other related processors and boards. No changes were made to the actual source file of the bootloader. Changes in this distribution are simply to the make file.

my best guess now is that i will have to find a mix between

Arduino's IDE burn bootloader line

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

and the AVRDUDE command lines from Git Instruction

avrdude -v -p m2560 -c usbasp -P usb -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m -e

avrdude -v -p m2560 -c usbasp -P usb -Uflash:w:stk500boot_v2_mega2560.hex:i -Ulock:w:0x0f:m

That's it, only :slight_smile:

Thank you so much for reading and even more for any advice that might help me avoiding to brick the board

Everything will be considered except not to do nothing

some one said that it seams that all this is due to force who buys the printer to also buy the consumables from ctc

regards

AJRPM:
but i've forgot to cross my fingers

That was the essential step!

AJRPM:
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.

This usually indicates a problem in the connections between the programmer and the target microcontroller. I can't be worked around by the -F option. Double check all your connections and make sure the 3D printer board is being powered.

AJRPM:
likely i am missing a lot, namely i am not sure if should have select atmega1280 as processor in the previous trial

Which previous trial? You did specify ATmega1280 via the -patmega1280 in your avrdude command.

AJRPM:
anyway it also looks like the board doesn't have the bootloader, and that might be the reason why i can't update the firmware via usb

No, that's not the problem. When you use the ISP programmer to flash the firmware no bootloader is needed. In fact when you do that the bootloader is erased. Bootloader is only needed to flash without an ISP programmer, such as on the Arduino boards where we just plug in the USB cable of the board, then upload to the virtual serial port that is created.

AJRPM:
anyway it also looks like the board doesn't have the bootloader, and that might be the reason why i can't update the firmware via usb

That could be, since updating the firmware via usb probably is not using an ISP programmer.

AJRPM:
so... i presume i will have to flash the bootloader first

Well, as I said, if you only want to flash the firmware via your Arduino as ISP programmer then you don't need the bootloader but if you want to upload over the USB on the 3D printer board then that may be necessary. I don't have any experience with this board so I can't give exact answers. I can only tell you what would be true for the Arduino/Genuino Mega with ATmega1280, which hopefully the MightyBoard is functionally similar to.

AJRPM:
Arduino's IDE burn bootloader line

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m

The Arduino IDE does the Burn Bootloader process in two commands. You only posted the first of the two.

The first command erases the flash memory and then sets the fuses to configure the microcontroller for the appropriate bootloader section size, clock source and speed, BOD (brown-out detection) voltage level, and several other things. The fuses are the same between that command and the second one you posted.

The second command flashes the bootloader file.

Note that the Upload Using Programmer process is done by the Arduino IDE in a single command, which is why you could get that complete command from the output even though it failed. In the case of Burn Bootloader you won't see the second command if the first fails but you can easily adapt the existing command you have. The most important thing is just knowing the right path to the avrdude executable and avrdude.conf.

i have now a finger crossed medal hanging above the board

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.

when i got this error i searched, and after i checked the connections

since the board is powered i am thinking if it is for the cristal near the Atmega1280 which was also mentioned as a possible cause of the error

i am not sure but i believe to have cross-reading some information whereas the cristal is not necessary for the board functions, so i wouldn't be surprised if this is part of a strategy from ctc to block firmware updates at all

no bootloader for usb no crystal for avr

i can give a look at the crystal but for that i have to dismount the board to access it's back and that is the last thing i would want to do right now

pert:
Which previous trial?

i meant the "above mentioned" because there is also the option for atmega2560 as processor though i thought they were the same

pert:
When you use the ISP programmer to flash the firmware no bootloader is needed. In fact when you do that the bootloader is erased.

Bootloader is only needed to flash without an ISP programmer, such as on the Arduino boards where we just plug in the USB cable of the board, then upload to the virtual serial port that is created.

if flashing the firmware using the ISP programmer erases the bootloader is there any way to flash the firmware and the bootloader?

it might be useful to have the bootloader for future firmware updates using usb

AJRPM:
since the board is powered i am thinking if it is for the cristal near the Atmega1280 which was also mentioned as a possible cause of the error

If you set the wrong clock configuration then it can "brick" the board until you have connected the clock source the fuses are set for but the Upload Using Programmer style command you ran:

AJRPM:

C:\>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega1280 -F -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

doesn't change any fuses so if the board was working previously and you didn't change any fuses then it's unlikely that's the problem.

It is perhaps a bit sketchy that you added the -F option to your command. I'm not sure what sort of problems could be caused by forcing the command to run even when the signature verification fails but if the signature was being read as 0x000000 from the start then I don't think there could be any harm since that probably indicates the flashing process failed completely.

AJRPM:
is there any way to flash the firmware and the bootloader?

Yes, I believe so. I believe the Arduino IDE has a feature like that but I haven't used it. At least wit the IDE, you would need to compile the firmware from source to generate the .hex file with is the firmware and bootloader combined. Maybe it's possible to combine the firmware .hex file and the bootloader .hex file via the command line (probably one of the avr-gcc tools). Maybe someone else can advise on that. I think that is just going to unnecessarily confuse things. First step is to figure out why the chip signature is reading as 0x000000.

i gave a try to -F due to a message like

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

DrAzzy:
Turn on verbose uploads, so you see what signature it reads. All 0s out all 1s indicates wiring problem, or target device is set to use a crystal but isn't connected to one (which renders it inoperative)

that is why i mentioned the crystal issue since wires are checked and double-checked

Try uploading the official ArduinoISP sketch (File > Examples > 11.ArduinoISP > ArduinoISP) to your Uno. Then make sure to follow the wiring connections as shown:


Note that pin 1 of the ICSP header is at the top right corner in that image. That pin should be marked in some way on your 3D printer board.

AJRPM:
that is why i mentioned the crystal issue since wires are checked and double-checked

Can you do a quick check to see if the 3D printer board is still working? If so, then there is nothing wrong with the crystal.

dear Pert, i am already using ArduinoISP(.ino) for a while, it gave me some trouble in the beginning but i end up managing it

C:\>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -p atmega1280 -c stk500v1 -P COM7 -b 115200 -U flash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

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

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega1280
         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    131072  256    512  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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

i followed the pictured diagram since beginning and your'e right the printer's board has also the pin 1 marked (a dot) and follows the same scheme

the printer is working, but you can trust me when i say that it doesn't need either XTAL1 or XTAL2 for it

moreover there are rumors about ctc having fused port 33 and 34 the wrongway

Plug the Reset lead into pin 10 of the Arduino as ISP.

thanks kprims

did as you suggested and the result was

C:\>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -p atmega1280 -c stk500v1 -P COM7 -b 115200 -U flash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

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

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega1280
         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    131072  256    512  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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

the error led blinked once

i had my fingers crossed :slight_smile:

I/O Clock – clkI/O
The I/O clock is used by the majority of the I/O modules, like Timer/Counters, SPI, and USART. The I/O clock is
also used by the External Interrupt module, but note that some external interrupts are detected by asynchronous
logic, allowing such interrupts to be detected even if the I/O clock is halted. Also note that start condition detection
in the USI module is carried out asynchronously when clkI/O is halted, TWI address recognition in all sleep modes.

in ATmega640/V-1280/V-1281/V-2560/V-2561/V [DATASHEET] 39 2549Q–AVR–02/2014

Hi,

though no conclusion apart from the ones inferred from the above, for those who might be curious on how this saga started and where it eventually will lead to

https://groups.google.com/forum/#!topic/ctc3dprinters/l1pZQNl-M6w

thank you all for the support given

regards,
António

Sorry, I did not read whole topic carefully. Was your last try with Arduino as ISP (according resp. #11)? Then use -b19200.

thank's Budvar10

:frowning: i believe i tried that, and other bit rates, also

i cannot be sure whether the result was also a reading signature error or a sync fail error

i will try again e post back the result

C:\>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega2560 -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\avrdude\mighty_one-Sailfish-v7.7.0-r1432b.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

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

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xff

avrdude done.  Thank you.

it is confirmed :frowning:

one thing i have noticed and forgot to mention is that, pressing the reset button of the board of the printer while it is being powered by the ArduinoISP (no other power is being supplied to the board of the printer) also resets the ArduinoISP.

i wonder if that is a normal behavior from a master-slave logic point of view?

:confused:

Something wrong with your wiring. Reset must not affect Arduino. Reset pin on ISP have to be not connected. Reset for the target is from Arduino's pin 10.