USBasp programming issue with Hiduino firmware

I just got a USBasp programmer off amazon to install the HIDUINO firmware onto it, but having some issues.(Board is a 2560 MEGA)

Here is the website: hiduino

I followed the guide to program the firmware but that didn't work. Found something new to try and it appeared to flash it correctly.(Minus the error at the end which you can see in the text)

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin>avrdude -p at90usb82 -F -P usb -c usbasp -U flash:w:usbserial_mega_16u2.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 avrdude: Expected signature for AT90USB82 is 1E 93 82 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: warning: cannot set sck period. please check for usbasp firmware update. avrdude: reading input file "usbserial_mega_16u2.hex" avrdude: input file usbserial_mega_16u2.hex auto detected as raw binary avrdude: writing flash (8192 bytes):

Writing | ################################################## | 100% 6.98s

avrdude: 8192 bytes of flash written avrdude: verifying flash memory against usbserial_mega_16u2.hex: avrdude: load data flash data from input file usbserial_mega_16u2.hex: avrdude: input file usbserial_mega_16u2.hex auto detected as raw binary avrdude: input file usbserial_mega_16u2.hex contains 8192 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.14s

avrdude: verifying ... avrdude: 8192 bytes of flash verified avrdude: reading input file "0xFF" avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xFF: avrdude: load data lfuse data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip lfuse data:

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

avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: reading input file "0xD9" avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xD9: avrdude: load data hfuse data from input file 0xD9: avrdude: input file 0xD9 contains 1 bytes avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "0xF4" avrdude: writing efuse (1 bytes):

Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.08s

avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0xF4: avrdude: load data efuse data from input file 0xF4: avrdude: input file 0xF4 contains 1 bytes avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

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

avrdude: safemode: efuse changed! Was f4, and is now fc Would you like this fuse to be changed back? [y/n] y

Now when i took off the programmer and plugged it back in, the arduino didn't show up in device manager. So hooked it up to the IDE and reflashed the bootloader.(back to working again)

It looks like it flashed correctly up until Efuse '0xf4' which i hit yes...and then it froze becoming a semi-brick. Any idea what i did wrong? Does it have something to do with this error? (avrdude: warning: cannot set sck period.)

The instructions were kinda confusing on the hiduino website and wasn't sure if i'm supposed to flash 'arduino_midi.hex' first then 'usbserial_mega_16u2.hex' or what.

I just realized one of the files was the damn bootloader and there was no point to try and flash it. :/ Tried the other file and got this:

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin>avrdude -p at90usb82 -F -P usb -c usbasp -U flash:w:arduino_midi.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

avrdude: warning: cannot set sck period. please check for usbasp firmware update. avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801 avrdude: Expected signature for AT90USB82 is 1E 93 82 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: warning: cannot set sck period. please check for usbasp firmware update. avrdude: reading input file "arduino_midi.hex" avrdude: input file arduino_midi.hex auto detected as raw binary avrdude: writing flash (8192 bytes):

Writing | ################################################## | 100% 7.03s

avrdude: 8192 bytes of flash written avrdude: verifying flash memory against arduino_midi.hex: avrdude: load data flash data from input file arduino_midi.hex: avrdude: input file arduino_midi.hex auto detected as raw binary avrdude: input file arduino_midi.hex contains 8192 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.16s

avrdude: verifying ... avrdude: 8192 bytes of flash verified avrdude: reading input file "0xFF" avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xFF: avrdude: load data lfuse data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: reading input file "0xD9" avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xD9: avrdude: load data hfuse data from input file 0xD9: avrdude: input file 0xD9 contains 1 bytes avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "0xF4" avrdude: writing efuse (1 bytes):

Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.11s

avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0xF4: avrdude: load data efuse data from input file 0xF4: avrdude: input file 0xF4 contains 1 bytes avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

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

avrdude: safemode: efuse changed! Was f4, and is now fc Would you like this fuse to be changed back? [y/n] avrdude: safemode: Fuses OK (H:F4, E:D9, L:FF)

avrdude done. Thank you.

I didn't have to choose yes or no for the last fuse but still got the error. Plugged it back in and still says its an arduino mega on port 3. So do you think it's the error with the efuse or this one?

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

Read the install instructions again.

You're trying to put the Hiduino firmware onto the Atmega2560, you're supposed to put it on the Atmega16u2 or Atmega8u2, which means a different set of ISP pins. The fuse layout is different, hence the errors you got.

When you get told the device signature is wrong, don't bypass the check with -F, figure out what's causing the signature to be wrong - there are very few cases where -F will achieve the desired result. You're lucky you didn't brick the mega2560 (by writing fuses to disable reset or ISP programming).

You must rebootload the 2560 too.

I guess following other people’s guides isn’t the best way to go about getting this programmed then…I was just struggling to understand what they were trying to say as far as the right code.Just now seen the other ICSP pinout on the board, and understand what you mean.(16u2)

I’ll go over everything on that website again, and try what you said with the code and what not. Appreciate the help.