Go Down

Topic: Atmega8 is periodically resetting itself after writing bootloader (Read 1 time) previous topic - next topic


OK, I have a single-sided Arduino S3V.3 R.2 with an Atmega 8.
I burned the bootloader with Arduino 0007 using 9V battery power and the dapa parallel programmer cable. (http://arduino.cc/en/Hacking/ParallelProgrammer)
Also, I had to temporarily remove the resistor of pin13 LED because it drew too much current from my weak LPT1.

Then everything seemed fine:

Code: [Select]
Atmel AVR ATmega8 is found.
Writing lock bits ...
Reinitializing device
Atmel AVR ATmega8 is found.

Lock Bits set to 0xff
Atmel AVR ATmega8 is found.

Fuse Low Byte set to 0xdf

Fuse High Byte set to 0xca
Atmel AVR ATmega8 is found.
Erasing device ...
Reinitializing device
Atmel AVR ATmega8 is found.
Uploading: flash
Verifying: flash
Atmel AVR ATmega8 is found.
Writing lock bits ...
Reinitializing device
Atmel AVR ATmega8 is found.

Lock Bits set to 0xcf

But when the board is powered up or resetted, LED13 blinks shortly, as it should, then waits for approx. 9 seconds and blinks again, and so on...

Even with nothing but 9V connected to the board, Auto Reset jumper off, serial jumper off and 120ohm resistor from Reset to +5V. Reset pin is at about 4.6V constantly.

When I try to upload a sketch via COM, LED13 also blinks in the same intervals, also while TX LED is flashing - needless to say I'm getting "programmer not responding".

What could I do? I couldn't find people to have experienced this problem before here!

P.S.: Why are the lock bits for Atmega8 0xcf in Arduino 0007, but 0x0F in Arduino 0022 and the online documentation??!?

I tried to burn the bootloader in 0007 with the lock bits changed to 0x0F, but in the end I got "Warning: lock bits write=0x0F read=0xcf"
so I did it again with 0xcf.


Avrdude has a peculiar way of reporting back 'reserved' bits. Have a look at: http://www.engbedded.com/fusecalc

Do you have decoupling capacitors connected between Vcc and GND (100nF + 10µF) ?


Apr 11, 2011, 04:21 pm Last Edit: Apr 11, 2011, 04:23 pm by spycatcher2k Reason: 1
Have you got a 10k resistor from +5v to pin 1? if not then its floating - causing random resets.

Also the bootloader should blinks every second not every 9. You may have the wrong fuse settings. Also you don't mention a crystal/resinator in your setup, are you using one? if not you chip is running at 1Mhz - if you want to update to 8Mhz (with no crystal) or 16Mhz (with crystal), you need to change the fuse bits.  

For 8Mhz - No ext crystal
High fuse - 0xD9
Low fuse - 0x64

For 16Mhz - Ext crystal
High fuse - 0xD9
Low fuse - 0xCA

Remember lock bits - unlock=0x3F

Hope this helps

http://www.uk-pcb.co.uk - UK Based PCB Fab & Assembly Company
Design & Assembly work undertaken - Arduino repairs & testing - PM for details. Arduino & C# PC programming.

Go Up