I wanted to port a simple program from an Attiny85 to the cheaper Attiny13. To make sure everything would work properly I started trying to upload a simple blink program to the MCU but could not get the USBtiny to communicate with the MCU, I would always get the
initialization failed, rc=-1 message.
Since my issue was with establishing connection with the MCU I ditched the hex file and just ran
avrdude -c usbtiny -p t13. I had everything set up so that I could just switch an Attiny85 for the Attiny13 since their pinouts are identical. The tiny85 worked exactly as expected, having no issues answering back and being programmed.
Researching online I tried the
-B option for AVRdude with different values thinking it could have something to to with the clock speed, but always got the same initialization error.
After messing around some time I decided to probe the serial lines with an oscilloscope, and to my surprise I found that when running the avrdude command with the Attiny13 in place, the logic levels became really weird, having a high voltage of 5V and low voltage of approximately 4V instead of 0V. Under the EXACT same conditions tha Attiny85 didn't yield these strange voltages. You can check the scope trace images, first one is with the Attiny85 and the second with the Attiny13.
My set up/toolchain consists of a fresh WinAVR install and Sparkfun Pocket AVR programmer (USBtinyISP). Both the Attiny13 and Attiny85 are new from the same supplier, in SOIC packages so I'm using them on a breakout board. Tried a second Attiny13 chip but results were the same.