Programming atmega328 with usbtinyisp first time user

"C:\Users\jhobbs\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.2-arduino.1/bin/avrdude" "-CC:\Users\jhobbs\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/avrdude.conf" -v -patmega328 -cusbtiny -B32 -e -Ulock:w:0xff:m -Uefuse:w:0b11111111:m -Uhfuse:w:0xd7:m -Ulfuse:w:0b11110111:m

avrdude: Version 7.2-arduino.1
Copyright the AVRDUDE authors;
see avrdude/AUTHORS at main · avrdudes/avrdude · GitHub

     System wide configuration file is C:\Users\jhobbs\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.conf

     Using Port                    : usb
     Using Programmer              : usbtiny
     Setting bit clk period        : 32.0

avrdude: usbdev_open(): found USBtinyISP, bus:device: 002:010
AVR Part : ATmega328
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :

                                       Block Poll               Page                       Polled
       Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom                 65    20     4    0 no       1024    4      0  3600  3600 0x00 0x00
       flash                  65    10   128    0 yes     32768  128    256  4500  4500 0x00 0x00
       lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
       hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
       efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
       lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
       signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
       calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

     Programmer Type : USBtiny
     Description     : USBtiny simple USB programmer

avrdude: setting SCK period to 32 usec
avrdude main() error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower the bit clock frequency, e.g. -B 125kHz
- use -F to override this check

avrdude done. Thank you.

Failed chip erase: uploading error: exit status 1

Perhaps this post can help

I simply googled "initialization failed, rc=-1"

i have the 328p which is a tiny surface mount and its mounted on a board. i have wires soldered to it correctly to reset, mosi, sck...etc...
it always says failed to erase and error: initialization failed. Tried another board but same result. on win10 64bit and it could be driver related but i am trying all i can find in fourms. just trying to get boot loader installed.

Are there any other components connected to those MOSI, MISO, SCK and RST pins via the traces on that board? e.g. a SPI radio module device?

Do you have them connected like:
If you follow the ISP Header 6-pin and connect the
MISO to the MISO on the chip SCK to SCK on the chip?
i.e. not like using the MISO for communications.

I have been using a USBasp board for my ATTiny84 with great success.

Do you have a bootloader you plan on loading? Last time I loaded a bootloader I used optiboot but there are newer better bootloaders out there.

Next thought, do you really need a bootloader? I've been using boards without the bootloader. You only need the bootloader if you want to program it through the serial pins.

yes i have it connected pin to pin as in:miso to miso sck to sck reset to reset mosi to mosi and 5v and gnd respectively. i am using the bootloader in the arduino ide for atmega 328p

i don't think so. it is on a flight controller but the radio module is removed. It is an old oversky mul a flight controller I got several cheap to learn with and i can't seem to update the 328p. i used dozer's tutorial and the only thing different is i am using a usbtinyisp instead of the usbasp that he uses. i may remove the surface mount chip on one and try it that way to eliminate any other signal interference.

https://dozer260.blogspot.com/

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.