Hi all! made it through tutorial 2 - LED blinking and life is good. moved on to tutorial 3 and when I went to the cmd prompt and entered “avrdude -p m168 -P lpt1 -c stk200 -U lfuse:r:-:h -U hfuse:r:-:h” I continually get
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
double check connections and try again, or use -F to override this check.
so after double, triple, quadruple checking my connections and still recieving the same message, I attempted to do tutorial 2 over again and got the exact same message in WinAVR as well. WTF? nothing has changed since tutorial 2, all connections seem fine - do I need to reset the micro before I can re-program? what does the error message I am getting mean? do I need to use the -F to override? very confused… thank you in advance to any brave soul that can shed light on this conundrum.
This sounds like maybe you accidently changed the fuses settings in a former programming attempt. As a matter of fact, aside of the lock fuses, you can turn of the serial programming capability of the ATmega. Should that have happened, there’s no way to reprogram that thing with an ordinary ISP.
I haven’t read through the tutorials, but do you remember what commands exactly you have used regarding avrdude so far?
the only commands that I have used in AVRdude are whatever were produced by the Blink1Mhz.c file that is used in tutorial 2. everything went smoothly and I moved on to tutorial 3 and no dice. painfully perplexing… wonder if the ol’ AVR was damaged somehow?
It’s entirely possible that something messed up and you blew the wrong fuse, or messed up the bootloader (assuming you’re using one).
What tutorial are you using?
Where are you located? If its near someone on this forum I’m sure none of use would mind a bar visit to bring a programmer and determine what exactly is going on with your AVR.
Hey everyone! thanks for all of your responses! As painful as it is for me to admit, It turned out that my LPT1 port was disabled. the crazy part is that I did manage to get through tutorial 2 in that condition - the LED did blink. Can’t answer that one.
So now my latest issue, I made it through tutorial 3 and got my LED going @ 16MHz. for whatever reason, to satisfy curiosity I guess, I turned my board off - removed the crystal - and turned it back on. Yep, LED quit blinking - answered that question. so I turned the board off and replaced the crystal, turned the board on again and… no LED action. alright, umm… maybe I can get the internal oscillator rocking again. Negatory. I’m getting the same error that I got earlier.
so, that being said, my question is “does removing the crystal when the AVR is looking for it cause bad things to happen?” “did I potentially juice that little puppy?” “Is there a ghost in my machine?”
I’m in the Boulder,CO area if anyone is interested in helping me out.
Removing the crystal should not have changed anything in relation to the fuses or anything. If the AVR is set to use an external crystal and there is no crystal, it should not even boot up.
Does this AVR have the arduino boot loader? By default, the arduino boot loader blinks the led, so that may have been what you were seeing initially.
alright, after a little bit of fiddling around, I have gotten it to work. I think what may have happened, is that when I put the crystal back in, I put it in the wrong spot. this caused (as krphop correctly deduced) the AVR to not boot and consequently not fire up the ol’ LED and not allow my ISP to work. That is an interesting detail though, that the AVR cannot be programmed in that condition. short of buying another crystal, would there be a way to reclaim control of my AVR if the dog ate my crystal? Anyway, thanks for all of the help - I hereby declare this thread dead (except the dog/crystal detail) !
There is an alternate programming method called High Voltage programming which allows you to program the device without its own clock running.
Luckily, the trend in most cases is to do away with the need for external clocks or fuse bits, and make everything software selectable (xmega, msp430, etc).