Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ATmega8 with bootloader loses the program

Status
Not open for further replies.

thebadtall

Full Member level 6
Full Member level 6
Joined
May 17, 2012
Messages
339
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,308
Location
Hellas
Visit site
Activity points
3,605
Hello. I have loaded the arduino bootloader on the ATmega8 and ater I load the sketch it runs smooth.
The sketch is a "Hello World" LCD test.

After a couple of days the program does not load at all and I need to re-upload it, but the bootloader is fine.

I use a 16MHz crystal with 2 18pico capacitors, 100nF capacitor on the VCC to GND close to the uC, 100nF capacitor on the AVCC to GND also close to chip, 7805 regulator with 220uF on the 12v side and 100uF on the 5v side along withn 100nF ceramic caps.

The pin1 is connected to 10Kohm resistor and the resistor to +5v.

I don not know where is the problem, and I dont know what to do. Is there some way to "lock" the uploaded code?
Can you suggest me some solution ?
Thank you
 

Hi,

Yes that sounds a strange one.

When your program does not run, have you Read the chip to see if any of your program code is there at all; it might just be a fault in the bootloader code somehow not pointing to the correct starting point ..??

Have not done much with AT bootloaders but the standard Arduino is a mega 328, so will that be ok for a mega 8, different memory sizes ??
 
I upload the bootloader of version 0.22 back when the very first arduinos used to have ATmega8.
The program runs ok at first time, and maybe the second time i power it on. The third however it will not start at all.
It does that on 4 atmega8's that i have
 

I wonder if it can be an incompatibility of the ide/compiler with the old boot loader you describe.
Other causes could be a power supply problem (maybe slow rising) or the mcu entering the boot loader instead of running the code
 
The cause seems to be the unfiltered dac power supply . Wich after replacing the 100nF capacitor on the avcc gnd pins it stop resetting. ( The previous avcc capacitor was failed )
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top