Not sure if this is the right section but what is a soft reset of the Arduino please?
oh its super easy
none
Osgeld, excuse my ignorance but what are you saying
He is saying ther is no way to perform a reset on an arduino simply with software.
Some folks jump to address zero (the RESET vector) to preform a "soft reset" but this is a very bad idea. While it "resets" the C run-time, it leaves the hardware (e.g. timers, I/O pins, etcetera) as they were before the "reset".
Using the Watchdog to reset the processor is a far better choice.
In any case you shouldn't need to do a soft reset. Why do you want to?
Thank you for the explanation Mike and Coding Badly, so presumably it is a reset via software and not advisable.
Nick –
the question was in reference to a thread about some problems people are having with Marco_c’s Parola library here LED matrix display - MD_Parola, MD_MAX72xx and MD_MAXPanel - Exhibition / Gallery - Arduino Forum Reply #29 and I was curious as to what it was, seeing as Google did not turn anything up for me.
wabbitguy:
strykeroz:
Thanks for sharing your experiences,
Geoffyou can simply disconnect Vcc at the Parola, give it second or two, plug it back in, then do a soft reset on the Arduino. That should work as well.
Mel
He appeared to be referring (by my reading) of actually hitting the Reset button.
Thanks Nick.
Who would of known that a soft reset, which is apparently a term known by both Coding Badly and Grumpy Mike, would mean the same as just plain old pressing the reset button XD Thanks for clearing that up for me
and have a great weekend.
As others have said,
You can reset the AVR in software which will reset everything inside the AVR just like
a power up or hardware reset.
The thing you can't do is reset any externally attached hardware.
i.e. shields, lcds, shift registers, etc...
Attached is an example sketch that includes a function to do a s/w reset of the AVR.
Keep in mind that if you have an old bootloader it won't work since those were not properly
clearing the watchdog bits.
--- bill
resetArduino.zip (868 Bytes)
Thanks Bill, I think that I bit off more than I can chew with this question Never a dull moment in Arduinoworld
Pedro147:
Thanks Nick.
Who would of known that a soft reset, which is apparently a term known by both Coding Badly and Grumpy Mike, would mean the same as just plain old pressing the reset button XD Thanks for clearing that up for me
and have a great weekend.
You too.
you can simply disconnect Vcc at the Parola, give it second or two, plug it back in, then do a soft reset on the Arduino. That should work as well.
How do you "do a soft reset" with your hands? Note he says "it should work" not that it "does work".
Grumpy_Mike:
He is saying ther is no way to perform a reset on an arduino simply with software.
He knows the term (as do I). And he says "no way".
Pedro147:
...what is a soft reset of the Arduino please?
Do you mean this?
//declaration
void (*resetFunc) (void) = 0; //declare reset function @ address 0
//calling
resetFunc();
Despite the name of the function, it isn't a reset, it's simply a jump to the same place a reset would eventually go.
This may or may not be good enough for the purposes of the OP
Despite the name of the function, it isn't a reset, it's simply a jump to the same place a reset would eventually go.
Edit:
A non-soft
It's certainly soft.Then we must name it for what it is:
A non-soft but not hard pseudo reset... Or, NSNHPR
Update: Certainly Soft but Not Hard Pseudo Reset... CSNHPR
(I used to work for MaBell... We had entire departments to make up this crap.)
Finally, that one is marked complete! (Again)
Pedro147:
Who would of known that a soft reset, which is apparently a term known by both Coding Badly and Grumpy Mike, would mean the same as just plain old pressing the reset button
The thing is that it doesn't. That author you quote was misunderstanding the term and using it incorrectly. There is no need to press the reset button once you have applied a power cycle, it basically does the same thing.
Some processors have the facility of performing a software reset. Some even pulse the hardware reset pin when doing this to allow other things connected to it to be reset at the same time. This is done by a specific software command. The processors used in the Arduino do not have this facility.
If you need to do this then you can arrange an output pin to pulse the reset line. However you can't just connect an output to the reset line because as soon as it starts to reset, it turns into an input and so doesn't drive the reset line low for long enough. So you have to stretch the pulse with either a simple capacitor or better a monostable like an NE555 or a 74LS123.
A non-soft
It's certainly soft.