Hi,
I have tried connecting and reconnection the serial monitor whilst run a sketch on the Arduino. For some reason the registers and parameters all reset on every connection. (On the built in serial monitor and HyperTerminal)
Can anyone suggest why please?
As well as using my own variable which reset, millis() and micro() also reset.
The sketch code is below, All suggestions taken!
Thanks
Pete
#include <MsTimer2.h>
unsigned long time;
unsigned long time1 = 0;
unsigned long time_diff;
unsigned long micro;
The action of opening up the serial monitor in the Arduino IDE causes the DTR signal to reset the AVR processor via the auto-reset feature on the Arduino board.
This of course causes the program to start from the beginning with all variables initialized, just as if you pressed the reset button on your Arduino.
to avoid the auto-reset via the DTR signal you have two options:
A) put a 120 Ohm resistor between +5V and RESET
B) cut the wire between the RESET-EN jumper and replace it by a switch
Before you do any of the changes you should know that auto-reset is needed to upload new sketches because it activates the boot loader so you don't want to disable auto-reset permanently.
Hi,
Thanks for your reply!
MikeT - I will look into replacing it with a switch!
Can anyone point me in the direction of a PCB layout diagram for the Arduino 2009 and Diecimila model?
Thanks