captainhannes
New Member
Hi all,
I've been doing AVR stuff for quite some time, but 2 weeks ago
I had a strange issue:
I had an ATTiny45, programmed it as usual with my programmer
(fuses unchanged - so it ran on internal clock) with a simple
test prg. (compiler cdk-avr):
int main(void) {
sbi(DDRB,PB2);
while (1) {
cbi(PORTB,PB2);
sbi(PORTB,PB2);
}
}
All worked well, then I changed the fuses to external clock (Xtal).
I verified that the oscillator is working (scope) - all seemed normal.
Then I tried to shoot a new program, but avrdude said:
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
I then checked my programmer - all my devel boards with the
ATmega16/32 responded (I use this programmer since 5 years).
Now, I can't get it to respond, nor shoot a new prg. Assuming
that avrdude didn't overwrite the flash, the old simple prg.
should be still there, but there is no sign of activity on PB2.
(Xtal osc. is still working)
I know that the ATtiny45 is an el-cheapo device, so buying a
new one is no problem, but I'm curious what went wrong.
Any thoughts very welcome.
Thanks!
I've been doing AVR stuff for quite some time, but 2 weeks ago
I had a strange issue:
I had an ATTiny45, programmed it as usual with my programmer
(fuses unchanged - so it ran on internal clock) with a simple
test prg. (compiler cdk-avr):
int main(void) {
sbi(DDRB,PB2);
while (1) {
cbi(PORTB,PB2);
sbi(PORTB,PB2);
}
}
All worked well, then I changed the fuses to external clock (Xtal).
I verified that the oscillator is working (scope) - all seemed normal.
Then I tried to shoot a new program, but avrdude said:
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
I then checked my programmer - all my devel boards with the
ATmega16/32 responded (I use this programmer since 5 years).
Now, I can't get it to respond, nor shoot a new prg. Assuming
that avrdude didn't overwrite the flash, the old simple prg.
should be still there, but there is no sign of activity on PB2.
(Xtal osc. is still working)
I know that the ATtiny45 is an el-cheapo device, so buying a
new one is no problem, but I'm curious what went wrong.
Any thoughts very welcome.
Thanks!