Shop OBEX P1 Docs P2 Docs Learn Events
Does anybody have experience with floating pins? — Parallax Forums

Does anybody have experience with floating pins?

iQuitiQuit Posts: 78
edited 2010-05-14 02:46 in Propeller 1
Was wondering if anybody knows the state of a floating pin on a Propeller.
Given...

temp := INa

and nothing connected to any pin, would temp read all zeros, or some random value.

I will test this tonight when I get home, but just curious if anyone has some personal experience with this. I'm a new Student of Spin (SoS), so
go easy with my lack of knowledge. smilewinkgrin.gif

Dan := thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"She may not be very pretty now, but she was somebody's baby once." Bugs Bunny

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2010-05-13 20:38
    Hi iQuit.

    Random.

    BUT with little wire as antenna it is possible it will read Yours AC Power net frequency.

    Regards

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • BigFootBigFoot Posts: 259
    edited 2010-05-13 22:22
    It is not a good idea to leave any of the I/O pins floating. The propeller can take more that 1.6
    seconds to look for a PC, update its firmware then load the EEprom into its ram.

    All the I/O pins are floating during this period and critical lines like chip selects can toggle. This
    could for instance, initialize a display improperly or send corrupted data to an SD Card.

    Russ
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-05-13 22:36
    The spector of open pins is not just a Prop thing. I have had AVR bits that do not work, but with a sheet of ali foil earthed under a sheet of paper were perfectly happy again. If it isn't used tie it (not a useful answer when still experimenting).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • iQuitiQuit Posts: 78
    edited 2010-05-13 23:19
    I was afraid that I couldn't rely on a floating pin to read zero, or a low state. Drat! This would have made things easier.

    Thanks for the information. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-13 23:26
    If you have a digital multimeter which btw you should have if you like to experiment, then selecting the AC voltage range (or even DC) and touching one of the probes will indicate some voltage. Sometimes that voltage can even read 50 volts or more. What's happening? The other end is not end connected either. Very very simply all objects such as the human body, bits of wire, even short bits of wire such as from a chip to it's package pin "receive" EM radiation. If that "antenna" has a low impedance across it's "inputs" (not just ground) then that resultant voltage will be much less than if the input impedance is high.

    Try the same experiment with a 1K resistor across the inputs of your DMM and you will see this is so. Knowing that CMOS inputs are very high impedance, even higher than your DMM, then you will understand why they should not be left "floating" as the signal will appear to be random and extremely variable. There is also another reason too in that CMOS inputs are designed for on/off signals and not for voltages in between these limits so they can start to draw more "crowbar" power from the supply when they are in this state.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • iQuitiQuit Posts: 78
    edited 2010-05-14 00:37
    Very interesting.
    Given the code below, the value stored in temp is quite stable at 00000000, until I touch a wire attached to one of the pins--I'm using a demo board.
    While holding the wire, the bit toggles, very fast, between 0 and 1. I would expect this. However, I did not expect the floating pins to be so stable at zero when floating.
    And there didn't seem to be any cross-talk between two wires next to each other while only touching just one of them.
    Of course, I don't think this would make a very good design, but interesting non-the-less.

    CON                  
     _clkmode  = xtal1 + pll16x
     _xinfreq  = 5_000_000
    OBJ
     pst : "Parallax Serial Terminal"      
    PUB go | temp
     pst.Start(115200)
     DIRa[noparse][[/noparse]7..0]~
     
     repeat
      temp:= INa[noparse][[/noparse]7..0]
      waitcnt(clkfreq/100 + cnt)
      pst.clear
      pst.bin(temp, 8)
    
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • localrogerlocalroger Posts: 3,452
    edited 2010-05-14 00:41
    On every Propeller board I've ever used, unused inputs seem to go pretty reliably to 0 as long as they're not connected to enough wire to act as an antenna. I suspect that there is a very slight, very high impedance, but deliberate pulldown built into the output. Maybe someone should ask Chip?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-14 01:05
    In a dry environment it is quite common that the electrostatic charges can be induced on floating pins. If the static electricity discharges then you have an ESD condition which could damage the device. However way before any discharge the floating pin can see a logic high. So pins don't just float high by themselves but DIP packs have much longer connections in the lead frame so they are more susceptible to noise. Flux or other residue on the board can be conductive and to a floating pin it's almost as good as a short.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • w8anw8an Posts: 176
    edited 2010-05-14 01:12
    A true high impedance (hi-Z) input should have no load on any sensing device. This means that there cannot be any pull-up or pull-down logic on the input because that would affect the value being monitored. You really need to put something on the line if you want a known value.

    .Steve
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-14 02:46
    w8an said...
    A true high impedance (hi-Z) input should have no load on any sensing device. This means that there cannot be any pull-up or pull-down logic on the input because that would affect the value being monitored. You really need to put something on the line if you want a known value.

    .Steve
    Steve, that sounds plain confusing for anyone who might not be sure of what is and what isn't.

    CMOS is intrinsically high-impedance or more correctly high-resistance (as there is capacitance) but it is not the aim of a CMOS input to place no load on any "sensing device".

    Pull-ups and pull-downs are necessary though because these inputs may be left floating when driven by an open-collector type signal or a switch etc. They may also be necessary if the pin is configured as an output but during reset and before software can change it to an output it's indeterminate state might cause problems to the device pin that it is supposed to be driving as that device pin would be left floating too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
Sign In or Register to comment.