My project is using an optoisolator package with a couple of spare channels. I was wondering if I were to use a channel to connect the reset to ground by setting a digital pin to HIGH.
What happens to the HIGH digital pin as the board resets? If it stays or goes HIGH at any point I guess the board will continually reset?
Is there a way to wire up some form of interrupt to the power supply provided externally to the VCC pin on the power jumper? I was thinking a relay or something, but the same problem would exist about the trigger pin staying HIGH.
Thanks for the feedback Lefty.
I did see a fair few articles, some using machine code JMP command, some hard-wiring pulses to things but this being bad… I was just wondering of an opto would work because of the complete circuit isolation.
I think I have an answer to the reset conundrum that’ll beat the software gurus though I have implemented a serial protocol for setting and getting variables that control my application, also some command will interact with the bluetooth modem but require a restart to take effect. If you can justify having a reset button (instead of just removing power and re-applying it) then it would be nice to be able to call it remotely over the serial link
It's nothing to do with isolation, more a timing thing so the optos won't help. Use
asm ("jmp 0");
To restart the chip, not quite the same as hard reset but usually good enough.
So I ask you why you need to initiate a reset as that is usually a case of not having proper program structure to begin with, as there is usually never a real need to perform a hardware reset that can't be solved by proper software?
Ooo, there's an echo in here
some command will interact with the bluetooth modem but require a restart to take effect.
The Arduino is reset or the BT module? If the BT then none of the above applies. If the Arduino you must be storing information in EEPROM or other non-volatile memory or there is no point.
Yeah timing is important. Just a theoretical question I guess.
The Arduino is reset or the BT module?
When I got the BT module I wanted to change the baud rate which required a reset on the BT module. After sending the comand from my PC via a serial terminal I reset the arduino then reconnected my serial terminal at the new baud rate and it worked. Thinking about it I'm not sure it should have worked, but that's how I think I remember it
I agree though, the reset button is not the answer to bad code, but the device does have a reset button. Pulling the power cable and sticking it back in would have saved a few cents on the board so someone thought it important??
p.s. don't forget the immortal words... "You'l never need more than 640k". The fact that so many people are asking about it would indicate it mildly important to the community, even if that specific part of the community is a bunch of noobs.
p.p.s... got another one... having a software reset would allow the IDE to upload sketches over a bluetooth module without the need for flow control.