Reset and SLEEP
Bill Chennault
Posts: 1,198
All--
If I drive the RES pin low then let it float on a Stamp, will that awaken it from SLEEP? My plan is to keep Ugly Buster's BS2p40 master awake and to put all the slave BS2s to sleep until the master needs them.
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
If I drive the RES pin low then let it float on a Stamp, will that awaken it from SLEEP? My plan is to keep Ugly Buster's BS2p40 master awake and to put all the slave BS2s to sleep until the master needs them.
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Comments
If it's ok to start the slaves over from the beginning, you could certainly use a reset to terminate the SLEEP. It's just that you'd lose the contents of any variables. You could store any status information in the EEPROM using WRITE statements before the slave goes to SLEEP.
Post Edited (Mike Green) : 3/6/2008 4:46:52 PM GMT
Thanks for the help. In my CURRENT experiments, a reset would work fine. Later, NAP will be necessary as you described.
The only slave pins used as outputs (in this configuration) are the ones (one per slave)·used to control HB-25s. Should they be tied to Vss or Vdd via a 4.7k resistor? Plus, I do not know when a line should be pulled up or down. If you have time, would you please explain it for me?
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Is the logic to pull a line high or low based on the idea that you do not want to "activate" the connected circuit during idle periods? And, is the sole reason we do not want a line (in many cases) left floating because such a line MIGHT assume a high or low status?
Or, is there an encyclopedia's worth of material and years of experience necessary to understand this technique?
As always . . . thanks.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Basically, when a line is left floating because it's in input mode (or just not connected), it's literally floating in a sea of static charges and induced currents from nearby conductors and other magnetic and electric field sources. If the voltage of the line is above the circuit's threshold, it's treated as a logic one. If it's below the threshold, it's treated as a logic zero. If it's right around the threshold, who knows what value it will have, but the input circuitry will "leak" a relatively high amount of current ... enough to shorten battery life if you're running off batteries.
Try an experiment some time. Connect a Stamp or Propeller pin to a piece of insulated wire sticking up in the air and let the pin be in input mode. Write a program to sense the value of that I/O pin and turn on an LED if the pin is a logic high. Then bring your hand near the wire or rub some fur (wool cloth) on some rubber nearby and see what happens.
What a neat idea for a fun·little·experiment!
Thank you, as well, for the explanation.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
You will see that in1 follows the 010101... pattern output by p0 exactly, even though there is no connection between them. The connection is simply the parasitic capacitance between the pins and wiring.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I will never know much about electronics, but I now know more.
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.