ATtiny2313 Problems continuing

Ok so for the past months or so i have not been able to get my AT tiny 2313 micro controller programmed via an Arduino Uno as an ISP programmer. I have troubleshooted the Arduino, and ruled out that this is the problem.
I have tried this many times and i finally figured out that to keep the programmer in sync, i have to make sure that there is no current going through the micro controller until just before I press enter via the terminal to execute AVRdude. So, after all this troubleshooting and double checking my wiring, performing multiple erase cycles, and every time i get this error:

Ryans-MacBook-Pro:larson_extend ryanjblajda$ avrdude -p attiny2313 -c avrisp -P /dev/tty.usbmodemfa131 -U flash:v:larsonextend.hex -F

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
avrdude: verifying flash memory against larsonextend.hex:
avrdude: load data flash data from input file larsonextend.hex:
avrdude: input file larsonextend.hex auto detected as Intel Hex
avrdude: input file larsonextend.hex contains 1510 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.39s

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

avrdude: safemode: Fuses OK

avrdude done. Thank you.

i really would like to finish this sometime in the near future.... Any help would be awesome.

What is the output from this...

avrdude -v -p attiny2313 -c stk500 -P /dev/tty.usbmodemfa131

the reply i got from avrdude was this

Ryans-MacBook-Pro:~ ryanjblajda$ avrdude -v -p attiny2313 -c stk500 -P /dev/tty.usbmodemfa131

avrdude: Version 5.3.1.osxintelhack, compiled on Feb  1 2007 at 22:30:12
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/Users/ryanjblajda/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port            : /dev/tty.usbmodemfa131
         Using Programmer      : stk500
avrdude: successfully opened stk500v1 device -- please use -c stk500v1
         AVR Part              : ATtiny2313
         Chip Erase delay      : 9000 us
         PAGEL                 : PD4
         BS2                   : PD6
         RESET disposition     : possible i/o
         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     6     4    0 no        128    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      2048   32     64  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500
         Hardware Version: 3
         Firmware Version: 3.3
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

sounds to me like the programmer still can't talk to the target chip. All 0s for the device signature isn't a good sign, I definitely wouldn't override that, it's a different matter if it's returning a valid (but unrecognized) signature.

In your checks to make sure the programmer is working right did you program other non-ATtiny2313 chips with it successfully?

I have not been able to program any of the 2 ATtiny2313 chips i have. I have gotten this response every time now that i finally got the Arduino to be in sync with the micro controller:

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

so i don't know why it keeps telling me this, as far as i know the chips have not been damaged, and i performed an erase cycle to see if that might be the problem, but i am out of my league with this AVR stuff....all help is appreciated.

When I've seen that, I've had the spi pins hooked up wrong, or no power/ground to the target chip.

a little more explanation would be helpful....

I've has MOSI and MISO backwards, or the reset wire in the wrong spot, or the clock pin in the wrong spot.
I'll drag out a 2313 later tonight or tomorrow morning and see if I can make it work and report back.

i just tried programming it again, using the -F override, and got this...

Ryans-MacBook-Pro:larson_extend ryanjblajda$ avrdude -p attiny2313 -c stk500v1 -P /dev/tty.usbmodemfa131 -U flash:w:larsonextend.hex:i -F

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATtiny2313 is 1E 91 0A
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: reading input file "larsonextend.hex"
avrdude: writing flash (1510 bytes):

Writing | ################################################## | 100% 0.78s

avrdude: 1510 bytes of flash written
avrdude: verifying flash memory against larsonextend.hex:
avrdude: load data flash data from input file larsonextend.hex:
avrdude: input file larsonextend.hex contains 1510 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.39s

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

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

I'm going to upload a picture too of my wiring...

so heres a crappy wiring picture, but ill get a better one.

I'm bashing my head against grabbing atmega328 chips instead of 328P, and trying to get arduinoISP working again. I'm spoiled by my USBtinyISP now. I highly recommend one, very nice to have!

Anyway, I think I'm getting close to the attiny2313 end of things.

EDIT:
Silly me, I forgot to set the fuses on the atmega328. No wonder I couldn't upload to it except via usbtinyisp. Whoops.

Progress!

Finally got that mess figured out, from the pic it looks like you have it wired correctly, so try this:
Use the AVRDUDE that comes with the Arduino IDE, rather than a standalone one.

I cannot make ArduinoISP function with a downloaded avrdude, but with the Arduino IDE's avrdude it works great.
So, try this:

bobnova@bobnova-P67A-UD4-B3:~$ /home/bobnova/Desktop/arduino-0022/hardware/tools/avrdude -C/home/bobnova/Desktop/arduino-0022/hardware/tools/avrdude.conf -v  -pattiny2313 -cstk500v1 -P/dev/ttyUSB1 -b19200 -Uflash:w:/tmp/build1438157481466733455.tmp/Blink.cpp.hex

Obviously you'll need to remove the "-Uflash:w:/tmp/build1438157481466733455.tmp/Blink.cpp.hex" as that file won't exist on your box, your device path (-P /dev/whatever), and the path to your Arduino IDE will be different, so edit those in/out, but that may work better, it certainly did for me.

Something you can try for giggles is putting an LED (with resistor, of course) on each of the three signaling wires. Use a decently sized resistor so it doesn't drag the output down too much.
That'll show whether or not something is coming out those pins headed towards the attiny2313.

okay cool thanks i will try that tomorrow morning.

@Bobnova,
if i can't get this to work is there any chance i could mail you my attiny2313's and have you program them?? i would pay for shipping and stuff both ways..... it would only need to be mailed through regular mail most likely...

Sure, I don't mind doing that.

Fixing bugs may rack up some postage charges, it might be worth it to you to buy an ISP of some sort. There are $7 flavors on ebay that should work.

ok sweet thanks! i may look into buying an iso programmer but, I'm low on money, and they won't be here till like september if i order one on eBay.

This is what I got: USBtinyISP AVR Programmer Kit (USB SpokePOV Dongle) [v2.0] : ID 46 : $22.00 : Adafruit Industries, Unique & fun DIY electronics and kits
I love it.
Sparkfun has a flavor for $15, but a lot of windows 64bit and OSX and Linux people have reported issues I guess.
Mine works great in Ubuntu-11.04.

Hey Bobnova i tried to use the avrdude that was in the Arduino folder, but it still didn't work, so could you personal message me your address so i can mail these 2 ATtiny2313's to you? I really appreciate it,

Ryan Blajda

Sent you a PM.

sweet thanks