0

I want to burn the arduino bootloader with arduino IDE, but I cant get it done. And here is my circuit: I have marked the way I connect the ISP port and the chip.

enter image description here

I choose Arduino NG/older as the board and Atmega8 as the processor, but when I start to burn the bootloader to the chip the LED on the usbasp just blink once and an error was given:

Arduino:1.6.5 Hourly Build 2015/05/15 06:16 (Windows 7), 板:"Arduino NG or older, ATmega8"

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: programm enable: target doesn't answer. 1 

烧录引导程序出错。

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.

What should go wrong? I have check the connection many times and replace a chip as well, and I even add a 12M crystal(with 22pF caps) but things still keep the same.

EDIT

I do the flowing things as advise:

  1. short the jp3 jumper of the usbasp to make a slow commiuncation. And remove the crystal.
  2. I just found the way I connect the isp port might be wrong. so I changed it as flowing enter image description here

And my actually circuit is like this: enter image description here

But got no luck, things still the same :-(

migrated from electronics.stackexchange.com May 16 '15 at 19:44

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

1

Did you set the SLOW SCK jumper on the USBasp Programmer? Completely new ATMegas use the internal RC-Oscillator at a frequency of 8MHz, but the divide clock by 8 fuse is set too. That means that (before burning the fuses) the AVR is running at a clock frequency of 1MHz and the standard SCK clockrate of the USBasp is too high for this clock frequency. Therefore, you need to set the SLOW SCK jumper to get a lower SCK clockrate.

  • Thanks for advice, is the the one marked as jp3 on the usbasp board? I just shorted it and tried again, things still got no luck, I have detailed in my edit, please check – armnotstrong May 16 '15 at 17:46
  • @armnotstrong The connection in your edit seams correct to me, but as I read you have removed the external crystal. Once the burning process sets the fuses (at the beginning) you need to have an external clock source (so a crystal). As far as I know there should be no problem when using a 12MHz crystal instead of an 16MHz one. – Simon M. Laube May 16 '15 at 17:52
  • @armnotstrong One additional note: According to the original schematic of the USBasp (fischl.de/usbasp) JP1 is the SLOW SCK jumper, not JP3. JP3 is the VCC jumper for target supply, which you will need too, when using the above circuit. – Simon M. Laube May 16 '15 at 17:54
  • Thanks Simon, so what should do is a) add the crystal back. b) short the JP1 instead of JP3, right? Weird thing is JP1 seemed to be a double switch on my board, according to the mark on the side, it's a switch of the voltage(3.3v/5v) – armnotstrong May 16 '15 at 17:59
  • @armnotstrong Well, it seems that you do not have the original USBasp board (see link above). If so, we would need the exact schematic of your USBasp board. Otherwise if you have the original board then you will have to do the following things: a) short JP1 (slow sck) and JP3 (supply the target ATMega with 5V) b) add the crystal c) burn the bootloader – Simon M. Laube May 16 '15 at 18:04
0

You forgot the Pull Up resistor for Reset.

Using 12Mhz crystal is not a good idea because the Atmega8 config probably uses 8Mhz or 16Mhz, and the fuses which are burned during the bootloader process (yes, they burn fuses first, and THEN load the bootloader) will not expect there to be a 12Mhz crystal, so any further communication can fail because of this too.

  • USBasp actively drives the reset line, and ISP doesn't require the bootloader to run. – Ignacio Vazquez-Abrams May 16 '15 at 17:03
  • Thanks for advice, I just make a resistor value of 10k on the #1 pin as a pull up from VCC, tried again, got no luck :-( – armnotstrong May 16 '15 at 17:47

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.