Just at my wits end here. Have purchased and assembled a USBtinyISP after failing to program a Atmega328 chip using the UNO, on both I get the same behavior. The dreaded:
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
With both UNO and USBtinyISP I can see and program an Attiny85 with no problems at all using straight avrdude and the Arduino IDE. I have checked, double checked all the wiring (heck I've done this 50 times over!), but no luck whatsoever. I have placed and removed capacitors between VCC and ground as well as the reset pin and ground. I held it over my head and placed it under my chair I even tried avrdude while facing all four compass points and reciting poetry but no luck. The next step is to sacrifice a chicken.
I have no idea what to try next (other than the chicken)
Can anyone please offer some practical advice on how I can move past this roadblock. I'm very excited to move to the next step, but have been stalled at this point for some time now.
Many thanks for jumping in. This has been a real headbanger, and I've become convinced I don't know enough to know what I don't know. My early successes with UNO, and then moving to the Attiny (even surface mount - yeah!) gave me a false sense of confidence. I am mega-humbled by this little black chip sitting in my breadboard.
I quickly posted my question, but didn't really provide any details of my setup.
Macbook Pro running Sierra OS
USB is 3.0 (I've read that may make a difference?)
Installed avrdude with AvrMacPack
Prefer to work with the Adafruit USBtinyISP kit, but also have a couple of UNOs.
Avrdude works nicely and as I mentioned recognizes the attiny.
The Atmega 328 chips were purchased in a 5-pack online. But I have also tested by pulling the same chips out of my UNO to the same result.
Thanks again for any input.
Below is the verbose output you suggested
Cs-MacBook-Pro:~ ceraum$ avrdude -c usbtiny -p m328p -v
avrdude: Version 6.3, compiled on Sep 17 2016 at 02:19:28
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/usr/local/Cellar/avrdude/6.3/etc/avrdude.conf"
User configuration file is "/Users/ceraum/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:020
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
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 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 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 : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported
avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
First I had to learn a bit more, and the key to my issue was the Atmega chips I had purchased had the Arduino bootloader pre-installed. I thought that would have been a good thing, but of course this is what I meant when I said I didn't know what I didn't know.
Turns out the chips require an external 16 Mhz crystal. Since I don't have any crystals laying around, I thought I might be out of luck, but I came across a wonderful page:
Nick Gammon has done a great job explaining how to burn a new boot loader with both board detector and programming sketches available. The key for me was to use his suggestion and software, which generates a clock signal on pin 9 of the UNO which can be used to stabilize the chip for programming by connecting to pin 9 of the Atmega. Simply brilliant.
After burning the new bootloader which sets the fuses for internal 8 Mhz the chip is recognized by avrdude and I feel like I'm off to the races.
Now it's time for a beer to celebrate - I feel it's just what the doctor would order.