Any Help for Uploading Bootloader & Firmware in new Atmega328p via AVR Programmer?

Hi There,

I wanna upload the bootloader and the firmware into new Atmega328p microcontroller from MacOSX.

My tool is the Sparkfun Pocket AVR Programmer, and i have install the ObDev CrossPack (for the avrdude) and then i read this help page from, but i don’t know if i’ll make something wrong. After that i’m searching for avrdude with GUI to leave the terminal trouble and install these apps (W7AY AVR Tools, AVR Burn-O-Mat, Vonnieda AVRFuses) but i’m new in AVR and really need some help…


With this terminal command “avrdude -c usbtiny -p t2313” i have check if my avr programmer communicate… i see this message and is mean work if i’m right.

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

I have some questions,
the Anushri need to be connected with the power supply or its ok with 5v (500mA) from the Pocket AVR programmer?
What is the fuse value?

You don’t need crosspak for avrdude, only if you want to compile the code. You can install avrdude with homebrew. Anyway now that you have avrdude installed it looks like you have some problem with the connection between avrdude and the device.
I have not used that particular programmer myself but I’d guess that it’s not compatible with the usbtiny or you are specifying the wrong port. Maybe you should prepend /dev/ ?

avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude done. Thank you.

“This means that the programmer couldn’t talk to the chip. If you are using a “simple” programmer such as a serial or parallel port bitbang programmer, it could mean the programmer is at fault. Otherwise, it usually means the programmer is OK but it couldnt find the chip.”

i have make this check without connect to anushri avr isp port

for example in AVR Tools app where put the bootloader hex? in the Flash or in the EEPROM section?

with pocket avr programmer connected in avrisp port of the anushri i get this message after my command:

avrdude -c usbtiny -p m328p

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f

avrdude: safemode: Fuses OK (H:05, E:D4, L:FF)

avrdude done. Thank you.

To upload the anu_bootloader.hex in the atmega328p need to change the Fuse values or not?

Look here

thanks for the help dude :slight_smile:
but in AVR Tools has 5 values: Fuse, E fuse, H fuse, L fuse and Lock. the first Fuse i leave it without write anything?

any help to upload the bootloader and the firmware via terminal?

please any help how can i upload the bootloader with the right fuses with the AVRDUDE terminal commands?

did you use the forum search? I don’t remember the commands right now, but I’ve seen them multiple times here on the forums. Please search.

Thanks @TheSlowGrowth,
I have find some help for the avrdude commands in the youtube.
For the bootloader flash work this command
avrdude -c usbtiny -p m328p -U flash:w:anu_bootloader.hex -U lfuse:w:0xff:m -U hfuse:w:0xd4:m -U efuse:w:0xfd:m
but in the fuse i dont know if i’m all right because i dont have write the LOCK = 2f

the firmware flashed via avr programmer or via midi with the sysex file?

doesn’t matter. Avr programmer is way faster though

@TheSlowGrowth the command is the same like the flashing of bootloader or is different " eeprom upload" command?

Eeprom upload loads the presets into the internal patch storage. That’s not what you need right now. You can do it later.

Thanks @TheSlowGrowth
i have flash the the bootlader very easy with the and