I just noticed that when I upload the code to the Arduino and open the Serial monitor it resets and I don't know why. I searched it on the internet and some said that this is normal but my Arduino didn't do that since I bought it (a week ago), it just started doing it today and i'ts really annoying, please help me.
Which Arduino? Which operating system.
Most AVR based Arduinos reset when you open the serial port. In a number of terminal programs you can influence the behaviour, in others (like serial monitor) you can't.
Mine says Arduino UNO R3 ATMEGA328P. The most weird thing is that a few days ago it didn't restart after opening the Serial monitor. Somehow, from today, it does...
The lack of a reset was the unusual behavior. What you are seeing now is the unexpected behavior.
The reason for this auto-reset circuit is to allow easy uploads to the Uno. With the original Arduino boards, you had to manually reset the board at the right time to make an upload. This is the origin of the practice of putting reset buttons on this class of Arduino board, even though that button is very rarely used.
It is possible to disable the auto reset, but you might find you miss the easy uploads. And this Serial Monitor reset behavior is often useful also. Without it, you would miss all the text that was printed between the time the program started running and when the Serial Monitor opened.
Did you have any sort of circuitry or shield connected to your board before when the reset wasn't happening? It might have interfered with the auto-reset.
You mean "expected"??
Although that makes sense a lot and would be very helpful (never thought of that) it makes me mad as I wasn't dealing with that situation.
Yes I've tried many circuits and projects and it wasn't resetting every time I opend the Serial Monitor.
Sometimes I've accidentally plugged in wires into wrong pins. Could that have interfered with the auto-reset??
Is there any way to "RESET" the Arduino UNO module? (I mean like getting it to its first state, as it it was brought to me from the box.)
Thanks a lot for the reply!
Just use another terminal program. The only convenience of serial monitor is that it is controlled by the IDE and hence doesn't interfere with uploads. The IDE can't control other terminal programs so you must close the port yourself before the upload.
The expected behaviour is that the board resets when you open the serial port. It does that when you open the port for upload or when you open the serial port by opening the serial monitor. So it sounds far more like it was an issue with the PC software than with the board.
Correct. I apologize for any confusion caused by my typo.
Well, there is a chance that one of those unspecified circuits were disabling the auto-reset circuit. It must be able to pull the reset pin LOW, so if you have something connected to that pin that prevents it from going low then it can't reset.
It doesn't really work that way. The only exceptions would be:
- The bootloader program that facilitates the upload on the ATmega328P
- The firmware on the ATmega16U2 USB chip on official Uno boards and true clones.
In extremely rare circumstances, the firmware can become corrupted and reflashing the firmware will restore that program to its normal state.
However, I am very doubtful that this is the cause of the behavior you're seeing. Flashing the firmware is a very complex process. Since the current behavior of the board is as expected, I don't see any reason to mess with that.
No problem, I'm glad I realized that though
I see. I think I've misconnected something to the reset pin once...
Well you're right. Better not to mess around with it as it works as it should be. Thanks a lot for the help!!!
I've never used any other terminal programs so I'm not familiar with them. So reinstalling the Arduino program will make any difference?
I doubt that re-installing the Arduino IDE will change the behaviour.
I did ask earlier which OS? I often use RealTerm under Windows; it an be configured to suppress the DTR signal when opening a serial port. There are plenty others.
Now that I'm thinking off it, maybe it always did an auto-reset. Maybe because I was using recently a code which delayed the lcd with a "Loading" word at the begging and after opening the Serial monitor it resets. In other codes where there was no delay that auto-reset should be so fast that I didn't notice.
I apologize to everyone for my fault.
Thanks anyway for all your valuable help!
This thread is finally closed.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.