Pages: [1]   Go Down
Author Topic: Re-setting the Arduino  (Read 315 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
Can't seem to find answer to this question on this site.
I am wondering if the UNO or Meag can be software programmed to re-set itself and a given period of time?

Thank for the help  smiley
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8108
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can connect an output pin to the Reset pin and set it LOW to reset the processor.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 16568
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
Can't seem to find answer to this question on this site.
I am wondering if the UNO or Meag can be software programmed to re-set itself and a given period of time?

Thank for the help  smiley

Yes it can using the watch dog timer facility. Try searching on WDT and you should be able to fine examples. I wouldn't recommend that on mega boards unless you replace the bootloader code for the mega with the latest bootloader version as the bootloader that comes with the board does not handle WDT interrupts correctly.


Lefty
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 16568
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can connect an output pin to the Reset pin and set it LOW to reset the processor.

No you can't. Upon reset all I/O pins revert to input pins thus removing the 0vdc to the reset pin for a shorter period then the minimum required reset pulse length. The AVR datasheet explicitly advises not to try and use that method. The WDT is easy to use and will properly reset the chip.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks will try lefty's method.  smiley
Logged

BHZ, MG, Brazil
Offline Offline
Sr. Member
****
Karma: 10
Posts: 346
Android developer; Arduino enthusiast
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To do it without software, you can use a RTC like Maxim's DS1337+ . Basically, you program the DS1337+ to generate an interrupt at a given interval or specified time, which would be the RESET signal (actually it will need a transistor to bring RST low when the interrupt happens)

I find this to be a much better approach to WDT, although it is a bit more complex hardware-wise. The reasons is: if you depend entirely on software and the software fails, the Arduino won't reset.
Logged

Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 6
Posts: 256
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could also modify John's method to work by making the digital pin trigger a one shot circuit that pulls the reset low.  You can fairly easily configure a 555 to be a one shot (mono-stable) oscillator. 

This is just another way to do this and may be better or worse based on your design.  That said, I think everyone should configure a 555 at least once, so if you haven't done so yet this might be your chance.

A decent place to start:
http://www.instructables.com/id/Make-an-LED-Blaster/step2/Build-the-555-ic-one-shot-timer/
Logged

Pages: [1]   Go Up
Jump to: