From: Erich W. <ew....@na...> - 2012-01-14 17:27:27
|
Hello, On 01/14/2012 08:12 AM, Robert Epprecht wrote: > Erich Waelde<ew....@na...> writes: > >>> One key difference between the duemilanove and the uno is its >>> connection from serial (controller) to the USB plug of the board. > >> So it seems to me, connecting to the uno will cause it to reset. > correct > >> Strange concept. > > As far as I know all arduinos do that on linux and maybe osx. > If it does not show up under some conditions (like a given > arduino model) i think it might be a timing hazard. No, this feature has been introduced at some point as "Automatic (Software) Reset" it seems. It is definitely absent on duemilanove boards. One way to eliminate this behaviour is to cut the trace (Leiterbahn) between the two pads labeled "RESET EN". As for the amforth-upload.py script, I assume that reading characters until the ok-prompt is seen *before* sending bytes would help as well. However, the automatic software reset implies that I cannot connect to an already running controller (something I routinely do) without causing a reset. I can see, why they did this, and I'm grateful that cutting a trace will solve this for me. YMMV. Cheers, Erich http://store.nkcelectronics.com/arduino-diecimila.html |Automatic (Software) Reset | |Rather than requiring a physical press of the reset button before |an upload, the Arduino Uno is designed in a way that allows it to |be reset by software running on a connected computer. One of the |hardware flow control lines (DTR) of the ATmega8U2 is connected to |the reset line of the ATmega328 via a 100 nanofarad capacitor. |When this line is asserted (taken low), the reset line drops long |enough to reset the chip. The Arduino software uses this |capability to allow you to upload code by simply pressing the |upload button in the Arduino environment. This means that the |bootloader can have a shorter timeout, as the lowering of DTR can |be well-coordinated with the start of the upload. | |This setup has other implications. When the Uno is connected to |either a computer running Mac OS X or Linux, it resets each time a |connection is made to it from software (via USB). For the |following half-second or so, the bootloader is running on the Uno. |While it is programmed to ignore malformed data (i.e. anything |besides an upload of new code), it will intercept the first few |bytes of data sent to the board after a connection is opened. If a |sketch running on the board receives one-time configuration or |other data when it first starts, make sure that the software with |which it communicates waits a second after opening the connection |and before sending this data. | |The Uno contains a trace that can be cut to disable the |auto-reset. The pads on either side of the trace can be soldered |together to re-enable it. It's labeled "RESET-EN". You may also be |able to disable the auto-reset by connecting a 110 ohm resistor |from 5V to the reset line; see this forum thread for details. |