[FIXED] Problem burning bootloader

Hi everyone, I decided to build my own serial arduino board (as per http://www.arduino.cc/en/Main/StandaloneAssembly). However, I couldnt get my hands on a 16Mhz crystal, so i used a 10Mhz one instead. I also built a parallel programmer. Trouble came when I tried burning the bootloader with the Arduino software (using the parallel port programmer). it fails with:

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA8 is 1E 93 07
avrdude: AVR device not responding
 ***failed;  
avrdude: verification error, first mismatch at byte 0x0000
         0xca != 0xff
avrdude: verification error; content mismatch

I also tried burning the bootloader with uisp (ATmegaBOOT.hex is the bootloader for atmega8 downloaded from svn.arduino.cc):

sudo uisp -dprog=dapa -dpart=ATmega8 if=./ATmegaBOOT.hex -dlpt=0x378 --erase --upload

Here, it seems everything went fine according to the output:

Atmel AVR ATmega8 is found.
Erasing device ...
Reinitializing device
Atmel AVR ATmega8 is found.
Uploading: flash

However, the LED (connected to SCK Atmega8 pin 19) never blinks when I reset the board. It only turns on when I connect the parallel port programmer, and it flashes two or three times when I use uisp (it doesnt flash at all when I use the arduino software).

Now the question is: Does this happen because I m using a 10Mhz crystal instead of a 16mhz crystal ? I did check the board a couple of times with a multimeter, and I dont think there are any issues... Help would be greatly appreciated. Gilles

Which version of Arduino software are you using? With version 0010 the device signature seems to fail sometimes. Can you try version 0011 with the same parallel programmer?

With UISP, I used this three command lines with DOS, in this order, one at a time (you used only the last one):

uisp -v=4 -dpart=atmega8 -dprog=dapa -dlpt=0x378 --wr_lock=0xFF
uisp -v=4 -dpart=atmega8 -dprog=dapa -dlpt=0x378 --wr_fuse_l=0xdf --wr_fuse_h=0xca
uisp -v=4 -dpart=atmega8 -dprog=dapa -dlpt=0x378 --erase --upload --verify if=bootloader\ATmegaBOOT.hex

You must change/adapt the command to use with linux.

I'm not sure, but with the 10MHz crystal I think you can burn the bootloader, but the timing will be changed.

The led must flash very softly with parallel programmer while bootloading using both: Arduino IDE or UISP.

Adilson, Thanks for your tips. The problem was in my board's design. I fixed it, and now it works. I can burn the bootloader using the parallel programmer both from the arduino software (i m using Arduino 0011 alpha) and from uisp (using the 3 commands you gave me). thanks for your help ! Gilles

I have the same behaviour trying to burn the bootloader. Can you explain what was the board design error that you made? I also have a STK200 programmer that works with the uisp.

On a side note, what are the fuse settings for atmega168 using the same uisp commands?

I have the same behaviour trying to burn the bootloader. Can you explain what was the board design error that you made? I also have a STK200 programmer that works with the uisp.

I simply forgot to ground pin 8 of the ATmega8...

On a side note, what are the fuse settings for atmega168 using the same uisp commands?

According to http://www.arduino.cc/en/Hacking/Bootloader (bottom of the page), the fuse high byte should be set to 0xdd and low byte to 0xff.