Go Down

Topic: Upload sketch only once! (Read 4195 times) previous topic - next topic

a.periz

I have already tried this, too.
Do you think that using avrdude directly without the ide could be a solution for the boot loader error?
I searched on web about this problem and I found another person who can upload a sketch only ones and was a problem with fuses...
This is the link: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1268700386/0

Thank you

Coding Badly

Quote
Do you think that using avrdude directly without the ide could be a solution for the boot loader error?


It is not a direct solution; the IDE runs AVRDUDE just as you would.  But using AVRDUDE would give you more control and may help isolate the problem.

Do you have another processor (like a DIP 328) + breadboard that you could use to prove that the software and ISP are working correctly?

spycatcher2k

Give it a try, Remember to unlock the chip before writing the bootloader, and lock the chip when finished. also unplug the board and reinsert it after locking it.

Drew.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

johnwasser

From that other string:

"After programming the bootloader (with the STK500 programmer),  I remove the ISP cable and move the serial connector to the second DB9 on the STK500.  This port is cabled into the '328 via a 2 wire jumper (rx/tx).  I then use the Arduino IDE to upload the sketch.  It works once, but only once."

If that is what you are doing, using a serial connection to upload sketches and not the ICSP connection, you need to manually reset the target system just before the sketch loads.  That is what the auto-reset on the Arduino does for you. To implement auto-reset on a target machine you need the DTR signal from the PC to get to the reset pin through a capacitor.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

a.periz

In my board there is the FT232 and I have connected the DTR pin just like in the arduino board.
This is the circuit:

IC11 is the FT232 and C33, C28 are both 100nF.

Thank for your help!

johnwasser

I just looked at the Arduino Mega 2560 reference design schematic (http://arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf) an they use a 22pf capacitor to connect Reset to ground where you are using 100nf (your C28).  I wonder if that might be enough to make auto-reset not work or not work reliably.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

a.periz

That's it!!  :)
Now it works!

Thank you very much!!

Andrea

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy