0
\$\begingroup\$

I am having this configuration set in my arduino uno: Programming ATtiny84 / ATTiny44 with Arduino Uno

I have even uploaded the blink LED program(using arduino sketchbook) and it works great at 8 MHz. Now I am trying to add an external 12 MHz crystal. I tried burning my internal crystal by using the command mentioned below but stuck with this error.

D:\software\avrdude>avrdude -c arduino -p t44 -P COM7 -U lfuse:w:0x60:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xe0

*update: I'm using arduino as ISP as my programmer

\$\endgroup\$
1
\$\begingroup\$

So you were able to use this setup to program the Tiny via the Arduino with Blink.ino. But you get a stk500 error with your other code.

Note that the IDE in "Arduino as ISP" is not talking Arduino Boot Loader. Rather the App loaded into the Arduino is to talk as ISP (likely AVR109) to avrdude.

Hence I think the "-c arduino" is likely incorrect and causing the observation.

Not sure what the -c needs to be. Either google it. Or in the IDE's preferences under the FILE menu enable verbose for upload and send the blink.ino and learn from the print of what arguments are being used with avrdude on the final program. Noting there may be one to upload the app with the ISP app into the UNO and then one to use the UNO as a programmer to the Tiny.

\$\endgroup\$
  • \$\begingroup\$ I gave the fuse command through command prompt and it requires its programmer to be defined. hence the "-c arduino" \$\endgroup\$ – Daniel Euchar Jan 30 '14 at 16:03
  • \$\begingroup\$ @mpflaga is right. You need -c stk500v1 \$\endgroup\$ – microtherion Jan 30 '14 at 21:54
0
\$\begingroup\$

The typical causes for this error are:

  • lack of good physical connection between the Arduino and the PC
  • incorrect board selected under tools->board
  • incorrect port selected under tools->serial port
  • software / driver glitch
  • the Arduino used as programmer is not running the ArduinoISP sketch

I would start troubleshooting by checking the USB cable and the settings for the port and board. The other thing to do is close and reopen the Arduino IDE as well and re-loading the ArduinoISP sketch.

Note that I have not checked if your fuse settings for the ATTiny are correct, as I think the error is on the programming Arduino side.

\$\endgroup\$
  • \$\begingroup\$ The arduino is running ArduinoISP sketch. I gave the fuse command through the command prompt and got that error. is it possible to give fuse command through IDE ? \$\endgroup\$ – Daniel Euchar Jan 30 '14 at 16:00
0
\$\begingroup\$

lfuse:w:0x60:m -U hfuse:w:0xdf:m -U efuse:w:0xff:

You have programmed CKSEL0,1,2,3 (all to 0) so the setting you applied is for external crystal (red rectangular) instead of crystal oscillator (green rectangular)

enter image description here

In order to revert the fuses you have to apply an external clock to CLKI (pin 2) and reprogram the device.
Note that CKDIV8 is set so the clock will be 1/8 of what you apply, the programmer should be setup accordingly since the programming speed needs to be 1/4th (or lower) of the core clock.

enter image description here

You can use several clock sources like a 555 timer or another AVR or a crystal oscillator like enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.