I have an Uno and after uploading a sketch, the board resets and runs the sketch. But if I disconnect USB (turning off the device) and connect external power, the sketch will not run on startup without triggering the reset pin on either the Atmega328 or the Atmega8. Any idea why this might happen?
(deleted)
monkey123:
the sketch will not run on startup without triggering the reset pin on either the Atmega328 or the Atmega8. Any idea why this might happen?
The Uno does not have an ATmega8.
and connect external power, the sketch will not run on startup without triggering the reset pin
Likely the fuse setting relating to the clock startup is not correct. The following link details the Arduino Uno settings:
http://forum.arduino.cc/index.php?topic=71580.0
If the fuses are correct, you may have "dirty" external power - try batteries. The bulk filter capacitor on the Uno may be defective. You may have contamination on the board due to regular handling. Body salts and oils over time can create problems - you can clean with 99% alcohol available from the pharmacy/chemist. Allow the board to thoroughly dry before powering.
Ray
It doesn't matter what code I put on it. If it makes a difference, I flashed the firmware onto the AtMega8 and optiboot onto the AtMega328. I can upload sketches with the Arduino environment over USB just fine, and when I do the sketch boots up.
Is there a way to get the USB/Serial chip to send a reset command to the 328 on startup? Or should it already be doing it?