Great channel, I use an Arduino to open a door automatically, and I don't know why every one or two weeks I have to reset the Arduino. I use a mechanical solution to solve the problem. Now I know WatchDog is the best solution :).
Thanks for the clear explanation. I have had the issue of the micro controller (PIC) entering an endless loop due to some kind of electromagnetic interference coming from a nearby appliance. I guess, enabling the watchdog timer is always a good idea. But the very fact that there is an option to disable it means that it may not be always required. In what situations is it desirable to disable the watchdog timer?
You can program the configuration fuses on the ATmega328p so that the watchdog timer is permanently enabled. The watchdog timer can also be used to generate an interrupt when it times out for timing applications and it is desirable to be able to disable this function during code development.
When doing developpement and correcting bugs it would be better to don't have the board resest at any moment. Once your project is finished you can chronometer the loop time and then choose the smallest watchdog for your code.
I'd like to see you use the WDT interrupt feature too. That sounds like it has some good debugging potential. I also have a challenge, if possible, can you come up with a way to single step an ATmega328? It's more of an abstract curiosity. I figure it's probably impossible without hardware emulation. I came across a guy that built a circuit to single step a 68k using a few simple tricks. Replicating that tutorial is on my list of stuff to try as a 68k is supposed to have a 400KHz absolute minimum clock. The idea got me wondering if this is possible with any basic uCs or if it is just an old MPU thing. Thanks for the upload. -Jake
I mostly program in Forth which is a "threaded" language and is very easy to debug. Some Forth implementations have a built in debugger and single stepper. If you search around there are some debugging tools for the AVR micros. sites.google.com/site/wayneholder/debugwire
Hello Sir, I need your help. I want to set watchdog timer for my arduino program. My condition is if digital read pin 5 goes low for max. 8 second then arduino should reset. Please guide me.
0033mer, I have a question about my RF POWER OUTPUT METER I saw in one of your videos running a LoRa radio, you response to my request would be greatly appreciated.
I there a way to use the watch dog to kind of look back and figure out what happened or is it just to get the micro back doing what it is supposed to do.
The program is written in Forth as I do not use the Arduino IDE. Check out other videos on my channel for more examples. Forth has been used by NASA in their space probes and satellites for many years. Check out the Forth.com website. www.forth.com/resources/space-applications/
I am very new to Arduino.so i can't replicate the code which was shows in u r video, in Arduino IDE.kindly share the code in proper format it will be very much helpful me🙏
@@0033mer Could you please assist me in converting this code for the Arduino IDE? I'm specifically looking for this feature for my ATtiny85 remote control power consumption.
@@0033mer Could you please assist me in converting this code for the Arduino IDE? I'm specifically looking for this feature for my ATtiny85 remote control power consumption.