My AVR dragon seems to not be working correctly. It all start the other day. I was messing around with a 20x32 shift register driven LED with a attiny2313 using debug wire and everything was going fine at first, it was loading the program into the memory and everything. After a while however, it stopped working correctly. It would have trouble loading the program and entering debug wire. It would then give me a "avr dragon:usb connection skipped. Each instance of avr studio can only have one active USB device at a time." I read that this is a common error and tried restarting AVR studio which didn't seem to work. I then created a new project and that seemed to fix it.
So I continued debugging a couple times, and noticed that the program wasn't running correctly, it was randomly jumping out of loops to random spots in the program (at least that's what the yellow arrow told me when I stepped through). I've noticed this has happened before when my optimization was set at "Os" but I checked and it was set at lowest "O0." Then after restarting the debug cycle the thing would not work anymore. It wasn't the same however, this time it gave me the error "Unable to connect to device. This could be caused....." with neither option making it work (retry debugwire connection, use spi to enable debugwire interface). The avr dragon options are greyed out, so even if I wanted to disable debugwire it won't let me.
So I tried some other attiny2313s (I have like 3 others), ones which have never been programmed. The spi interface won't work, I can't enable debugwire, when I try to read the fuses or any of the ISP mode settings I get "A problem occured when executing the command, make sure that you are using the correct......" None of them can be programmed or configured.
Here are some things I tried, none of which resolved the issue. Created new project, restarting AVR, checking optimization level, verified target voltage of 5.4 V, tried setting ISP clock frequency really super low.
A couple more details, using AVR studio version 4.18 build 684, avr-gcc compiler "C:\WinAVR-20100110\bin\avr-gcc.exe", on Windows 7 professional x64.
Sorry for such a long post, but figured I'd give you the whole story so it might be easier to help me solve this. Not really sure what is going on...