Re: Inputs left floating at the very start



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
.



Relevant Pages

  • Re: Query on ALE pin of 8051.
    ... till date my program wasn't executing at all. ... > ground and after floating it, the circuit was running fine. ... For the same reason that you wouldn't short the two pins of a battery ...
    (comp.arch.embedded)
  • Re: hp officejet 4110 all-in-one
    ... a common mistake is to strip it down without taking notice. ... you can trace the circuitry to get an idea of what the pins ... trace the circuit board following the guessed IC's external connections, ...
    (sci.electronics.misc)
  • Re: Problem with 555 Monostable Circuit
    ... In my sample circuit I have decreased the RC values just for testing. ... For testing I am using 22K for the resistor, and 33uf for the cap ... Pins 1,2,5 also go to the - on my cap ... after the falling edge the output ...
    (sci.electronics.basics)
  • Re: Another gameroom wiring Question
    ... common circuit with a mini fridge & a dehumidifier. ... than 2 DMD pins going at once & the fridge compressor or the ... 20A circuit at 80% rated can handle 6 pins easily with no other loads. ...
    (rec.games.pinball)
  • Re: leaving pin floating
    ... James Beck wrote: ... Is it so bad to leave an input pin floating? ... Floating pins can cause a lot of noise spikes and you just never know ... And appropriate for most commercial designs. ...
    (sci.electronics.design)