Thanks so much for this detailed walk through.Is there a way to back up my current firmware? Qidi has this custom firmware that I can’t download from the web.

thanks

Yes, actually!

Now, I’m not sure whether or not this will work using the USB method, but if you get an AVR programmer this should definitely work.

AVRDUDE has the ability to read the flash, the eeprom, and the fuses of an AVR chip.

The firmware is stored in flash memory, so you can use AVRDUDE to export the flash memory into a .hex file. I haven’t done this myself, though, so you’ll have to find out the specific command line yourself.

Though I think the Qidi firmware is a derivative of the makerbot firmware, so it may not be fully necessary; but I guess better safe than sorry!

Okay, so there are two ways to go about this.

But first, a note: do not use RepG to upload the firmware, it’ll be better to use one of the following methods.

The first step for both ways requires you to download the firmware’s .hex file.

Here’s the file for the atmega2560 mightyboard’s firmware version 7.7: http://jettyfirmware.yolasite.com/resources/release/firmware/mighty\_one-2560-Sailfish-v7.7.0-r1432.hex

You can also search this xml file to find direct download links to all the sailfish firmwares: http://jettyfirmware.yolasite.com/resources/release/firmware.xml (just replace the “firmware.xml” in the url with whatever is in the “relpath” section of the xml for the firmware you want)

By the way, I’d suggest unplugging the heating bed before continuing, it’s probably safer if you do.

Anyways, here are your two options: USB or ICSP. I can only attest to ICSP being more reliable, though.

To upload over USB, you’ll hook up the printer over USB and use AVRDUDE to flash whatever com port the printer is on. Make sure the programmer option is STK500v2. Also you may need to hit the reset button in the back of the printer when you start AVRDUDE in Command Prompt. I’m not sure on that front because I had screwed up my ability to perform the this method so I needed to use second one.

To upload via ICSP, you’ll need an AVR programmer that can flash a memory size of up to 256 Kb. The atmel avrisp mkII should work: Amazon.com

You need to open up the bottom of the printer and attach the programmer to the ISP port for the atmega2560 chip. You then flash the memory using AVRDUDE again. Also make sure AVRDUDE is using the correct programmer setting (it should be avrisp2 or something like that). (You can try atmel studio too, but I haven’t tried it so I can’t say how well it works).

If you try over USB first and it doesn’t work and the printer stops working all together (I don’t mean that it won’t turn on, I mean that it ends up with a blank LCD screen), then you’ll need to use the ICSP option to fix the printer.

You can also try and find a cheaper AVR programmer, just make sure it can support a flash size of up to 256 kb!

FINAL NOTE: If you didn’t understand any part of what I said, then do not try to do anything without performing significant research first. If you jump into this without enough understanding, you risk bricking your printer.

Where do you get AVRDUDE?

Could you link the tools I need to do this?

Hi again Ryuluce. I have accidentally screwed up my printer by trying to reset the board after having a stepper motor failure. I now have the AVR programmer but am unsure on how to use it. Do you happen to know the orientation of the pins on the motherboard? I’d hate to put power to ground.

Okay, so you’ll notice that the ICSP pins for the ATMEGA1280 have a white dot near one corner, right? That white dot represents the upper-right of the standard ICSP pin configuration.

You’ll also notice that the programmer plug has a notch on one of the long sides, that represents the top of the ICSP pin configuration.

So, the notch on the programmer plug should be on the same long side as the white dot.

In other words, the white dot points out pin one.

Unfortunately I don’t have either of those. I have uploaded a photo.

Do you k now where I can get AVR studio 4?

Okay, I have AVR studio 4 but am failing to connect.

The programmer appears plugged in correctly to me.

As for the AVR studio 4, I’m afraid you’re on your own on that front. I’ve used only AVRDUDE and ATMEL Studio.

I can’t help on that front, I’ve never worked with AVR Studio.

Ah no problem. I’m going to use AVRDUDE. I have some help from another person who went through it and gave me the hex files. I guess what I need to know now is how to use AVRDUDE such as making sure the connector I bought even works. I’ll come back and update.

Hi there and thanks again for replying. I have an programmer now and am familiar with avrdude. Do you have the commands I need to flash to the motherboard in order to get this working?

Right now I’m using:

avrdude -p m1280 -F -P usb -c usbasp -U flash:w:/Makerbot-usbserial.hex \ -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

and

avrdude -p m1280 -F -P usb -c usbasp -U flash:w:/atmega1280.hex \ -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

to the 8u2 ICSP port but to no avail. Avrdude says it completed but had a verification error. Also I see no com6 in repG

Okay, to make troubleshooting easier, could you try again with a verbose output and funnel the command’s output to a text document?

To do that, use this command:

avrdude -v -v -v -p m1280 -F -P usb -c usbasp -U flash:w:/Makerbot-usbserial.hex \ -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0xF4:m -U lock:w:0x0F:m > Troubleshoot.txt

That should output all the command’s response into a .txt file that can be used for troubleshooting.

Will do. Just so I’m clear. I was flashing the atmega1280.hex to the 1280 header and the usbserial.hex to the 8u2 ICSP. Is this correct?

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as F4
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as F4

Wait, the 8u2 chip on the motherboard…? You’re talking about the separate chip on the motherboard?

You… shouldn’t have touched that…

That chip has nothing to do with the firmware flashing, it’s all in the ATMEGA1280 chip.

The fuses you need to adjust are in that chip too as far as I’m aware.

That firmware does NOT belong in the atmega8u2 chip, that’s something else entirely…

I really, really hope you backed up the flash and fuse settings for that chip, or at least can find them online.

If not, you really did brick your printer if it isn’t starting up right now.

That chip at least doesn’t use the “-p m1280” setting in AVRDUDE, so maybe you didn’t break it…

EDIT: for fixing the atmega8u2, this link has some info:

https://groups.google.com/forum/m/?fromgroups#!topic/makerbot/-S01iIYO2E8

Okay, okay. Still so confused and someone else had posted on here with what I believe was incorrect information.

There is the 1280 ICSP port. The 1280.hex goes on that, correct?

The command would be: avrdude -p m1280 -F -P usb -c usbasp -U flash:w:/Makerbot-usbserial.hex \ -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

There is an 8u2 ICSP port. The makerbot usb hex goes on that, also correct?

The command would be: avrdude -p at90usb82 -F -P usb -c usbasp -U flash:w:Makerbot-usbserial.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

You had mentioned flashing the firmware directly and avoiding repG altogether. I can do that to the 1280 ICSP port, right?

If you look in this thread, I have a post giving simple instructions on uploading the firmware.

To be brief, flash the firmware (with the fuse settings) to the 1280 icsp port.

The 8u2 does control the usb, but you really shouldn’t have messed with that in the first place, the flash memory that was already on it was fine.

That response I gave you yesterday linking to that thread should have the information regarding reseting the 8u2’s flash memory back to defaults.

1 Like

Thanks so much. I was in a bind so I was taking advice from the wrong people. I will give it a shot tonight. Thanks again.