0

So I bought a cheap USBasp programmer off ebay and tried to program an attiny2313. Avrdude said the flash was uploaded and verified, but the led did not blink. I checked the output of the pins with my voltmeter, got nothing. I tried a few other versions of the blink program for attiny2313 and got the same results. Then I made the mistake of trying to reset the fuses and immediately bricked the chip.

I tried the process again, being more careful about the fuses and got the same results. Checked my wiring multiple times the leds themselves etc. no blink. Then I tried programming an atmega8 and I could not get any response whatsoever. The programmer didn't recognize the chip.

I tried resetting the clock on both chips. I kept getting a 'could not set sck' clock speed error, but at the same time avrdude said that it successfully reset the clock speed. I tried resetting the clock related fuses on the second attiny2313 and bricked another chip.

Is there any possible way my programmer could be able to reset the fuses, but not program the chip? Because I know the fuses were reset, I could no longer recognize or program the chips right after the commands went through. But my programs just aren't producing any outputs.

At this point I'm totally lost.

Tried a couple of other programs and got one uploaded and confirmed by avrdude, but the leds still don't flash. I've tried swapping them and the resistors and checked my wiring multiple times.

Danny
  • 31
  • 3
  • 1
    I think this question may be better suited for http://electronics.stackexchange.com/. However, I was faced by such a situation once and after a few minutes realized that the RESET pin was not grounded. Check the wiring and rewire from scratch. – bluefog Apr 25 '15 at 04:44
  • 1. there are sites dedicated to AVR and MCU's I would start looking here http://www.avrfreaks.net/ the bluefogs link is also good and I think that I saw also some MCU site on SE 2. is you MCU running properly? (have clock, correct voltages,...) 3. is your blinking program fuctional? (set the pins correctly for output, have you pull up/down resistors for Open Collector input/outputs?) Is you chip functional (does not take much to burn it to oblivion)? Try to get your hands on working programmer and read your device to confirm the programming ... – Spektre Apr 25 '15 at 08:12
  • have not used 8 bit atmels in ages so this may be bogus but if they have Bootloader like the 32bit MCUs and your programmer uses it (cheap ISP does) then if you wrongly set fuses and overwrite bootloader then you render your chip unprogrammable with ISP until you program the bootloader again to it with standard full programmer (not ISP) newer chips use JTAG, the old 8 bit uses parallel programing interface see datasheet in worst case you could try to programm it by LPT – Spektre Apr 25 '15 at 08:18
  • I have an ATTINY2313 and USBasp here. If you want to post your code and/or hex file I can give them a try. – bigjosh Apr 25 '15 at 21:33
  • :100000000C9434000C943E000C943E000C943E0082 :100010000C943E000C943E000C943E000C943E0068 :100020000C943E000C943E000C943E000C943E0058 :100030000C943E000C943E000C943E000C943E0048 :100040000C943E000C943E000C943E000C943E0038 :100050000C943E000C943E000C943E000C943E0028 :100060000C943E000C943E0011241FBECFEFD8E04C :10007000DEBFCDBF0E945C000C9466000C940000B3 :10008000CF93DF9300D0CDB7DEB7882381F01A82FB :10009000198229813A812239334039F029813A8104 :1000A0002F5F3F4F3A832983F4CF8150EECF0F90DB :1000B0000F90DF91CF910895569A5E9A88EC0E9436 :1000C00040005E9888EC0E944000F7CFF894FFCF84 :00000001FF – Danny Apr 26 '15 at 14:54
  • the last value :00000001FF should be on a new line, but I was having trouble formatting the comment. – Danny Apr 26 '15 at 14:56

1 Answers1

0

Do not be miss-led by the "could not set sck" message. This can typically be safely ignored. If AVRDUDE said the the flash was verified, then it is very likely that the specified hexfile was successfully loaded into flash memory on the chip.

You should not need to change any of the fuses from their factory defaults to get your LED blinker to work. While I do not think it is possible to "brick" an ATTINY2313, you can put the chip into a a state where you would need more than your USBasp to reprogram it back to factory default.

More likely something mundane is happening like the program you are loading is not actually blinking the LED pin (code is wrong, or programming the wrong file) as expected or the LED is not connected correctly.

bigjosh
  • 1,273
  • 13
  • 19