So I know a short from your positive power rail to GND will cause a reset in an embedded system with a microcontroller. Let's say the power supply is +5V from a linear regulator.
What I want to know is can I somehow SAFELY short an output pin straight to ground in order to reset the micro? Here is what I'm thinking:
1) Connect an I/O pin of my micro directly to GND via a high-valued series resistor, maybe ~100K. At all times in the program the I/O pin will be at logic 0, so essentially it's a straight connection from GND to GND, aka nothing.
2) To power cycle the whole circuit (thus resetting the micro), I simply output a logic 1 on the I/O line of the micro, which will create a small current between the 5V rail and ground, determined by the series resistor. The pulse is nearly instantaneous this way because as soon as the power goes down the micro also resets and thus the I/O line of the micro drops immediately to 0V, thereby instantly releasing the reset pulse. Then the micro boots up again. At speeds that fast and with a low-current pulse, I have a hard time believing the regulator would sustain any damage or get heated up. But would such a low current even cause the power to cycle like that in the first place? If not, would it work if I connected the I/O pin to the base of an NPN transistor and connected the collector to 5V and the emitter to GND? This would create a very quick high-current pulse from 5V to ground through the transistor, resetting the power.
Basically I'm trying to figure out the best way to very quickly remove power from the circuit (without damaging anything or removing the power source from the circuit) in order to reset the micro. Thoughts?
What I want to know is can I somehow SAFELY short an output pin straight to ground in order to reset the micro? Here is what I'm thinking:
1) Connect an I/O pin of my micro directly to GND via a high-valued series resistor, maybe ~100K. At all times in the program the I/O pin will be at logic 0, so essentially it's a straight connection from GND to GND, aka nothing.
2) To power cycle the whole circuit (thus resetting the micro), I simply output a logic 1 on the I/O line of the micro, which will create a small current between the 5V rail and ground, determined by the series resistor. The pulse is nearly instantaneous this way because as soon as the power goes down the micro also resets and thus the I/O line of the micro drops immediately to 0V, thereby instantly releasing the reset pulse. Then the micro boots up again. At speeds that fast and with a low-current pulse, I have a hard time believing the regulator would sustain any damage or get heated up. But would such a low current even cause the power to cycle like that in the first place? If not, would it work if I connected the I/O pin to the base of an NPN transistor and connected the collector to 5V and the emitter to GND? This would create a very quick high-current pulse from 5V to ground through the transistor, resetting the power.
Basically I'm trying to figure out the best way to very quickly remove power from the circuit (without damaging anything or removing the power source from the circuit) in order to reset the micro. Thoughts?