Re: Inputs left floating at the very start
- From: Spehro Pefhany <speffSNIP@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 03 May 2008 09:59:01 -0400
On Sat, 3 May 2008 05:37:16 -0700 (PDT), the renowned Tomás Ó hÉilidhe
<toe@xxxxxxxxxxx> wrote:
In college, I was always told not to leave input pins floating on a
device such as a 74HCT chip. I was told that the device might behave
erratically if any of its inputs are floating.
I have the PIC16F684. One of its inputs goes to the data input of a
shift register, and the other goes to the clock input of the same
shift register.
On the shift regsiter, there's an RC circuit on the master reset with
a charge time of about a microsecond (which is plenty slow enough to
have it set to all zeroes initially).
When the PIC boots up, all of its IO pins are set as inputs initially.
What I'm concerned about though is that shift register's input pins
must be either high or low, so I'm wondering if I'll get erratic
behaviour at the very start because the pins are effectively floating?
Another thing to consider is that there is a period of time at
power-on when the power has not yet stabilized to a level within the
guaranteed region of operation. Parts can get up to mischief during
this time (and there is an often much longer duration period at power
down that novice designers sometimes fail to consider). As far as the
few tens of msec on power-up, it's usually not a concern (for one
exception, it could greatly increase power consumption for a brief
moment and cause a very low power battery powered device being
supplied by a nearly dead battery to fail to start- perhaps some times
and not others).
If you're concerned about it you can use pull-up or pull-down
resistors. If you have a supervisory/reset circuit that is guaranteed
to hold the proper state at the LOWEST possible voltage where
'trouble' can occur, then the combination of that, hardware reset on
your SR and pull-up/pull-down resistors should be enough.
To use Mike's example, suppose your SR drives a relay which controls
your home-built giant rooftop chemical laser focused on a nearby
orphanage. The relay is guaranteed not to pull in below 3V. Your SR
and supervisor is guaranteed to hold the SR outputs low above 3V, all
the way up to 5V. After a couple hundred msec delay from your
supervisor circuit your PIC clock will be up and running in a stable
fashion, the clock and data pins will still be pulled low (say) by the
resistors (and driven high-Z by the low /MCLR input controlled by the
supervisory circuit, and the PIC will start up and take over driving
the pins low after the program starts running and sets the ports &
data direction registers (TRIS). On the way down, the supervisory
circuit will immediately drive /MCLR low and drive the SR outputs low
as soon as the voltage drops below its threshold (which should be
higher than the minimum voltage the parts will operate at), and keeps
it there at least until there's not enough voltage to pull in the
laser control contactor. Of course you'd probably want to add a bit
more circuitry and more safeties in an actual safety-critical system,
or even if it was 'only' data that could be corrupted.
In general, simple RC circuits are not a good idea unless you don't
really care if the thing works every time.
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.
- References:
- Inputs left floating at the very start
- From: Tomás Ó hÉilidhe
- Inputs left floating at the very start
- Prev by Date: Re: Inputs left floating at the very start
- Next by Date: Re: Inputs left floating at the very start
- Previous by thread: Re: Inputs left floating at the very start
- Next by thread: Re: Inputs left floating at the very start
- Index(es):
Relevant Pages
|