Shop OBEX P1 Docs P2 Docs Learn Events
When a pin is used as an input can it take 5V? — Parallax Forums

When a pin is used as an input can it take 5V?

KyeKye Posts: 2,200
edited 2009-05-28 01:45 in Propeller 1
Sorry to ask this question again, but I'm having trouble understanding the difference between a pin used as an input to look at a 5V line and a pin with a resistor in front of it to look at a 5V line.

Why is a resitor needed if the pin is an input? Since there's no current flow, no voltage is dropped across the resistor and thus it doesn't really do anything.

Thus,·is a resistor needed or not? I hear that putting 5V on the propeller chip's pins will break it but when the pin is in input mode it shouldn't matter.

Thanks, for helping to clear this up.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-05-27 17:12
    Kye, there are input protection ("substrate") diodes, which have the cathode connected to the +Vdd and the anode connected to the input pin, so when the input is more than a few tenths of a volt higher than the power supply, those diodes conduct. Without a current limiting resistor, that current increases exponentially with increasing voltage. There is a similar diode on the negative side, connected to Vss, which conducts when the input pin drops below Vss.

    Some chips have a different circuit, with "5 volt tolerant inputs", but that is not the case with the Prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • KyeKye Posts: 2,200
    edited 2009-05-27 17:44
    Ah, okay, I see. (Would be nice if this information was published).

    So, I should use a resistor value of 120 ohms or greater to keep the current below 40mA? I plan can use 240 ohms however instead.

    Also, should I worry about this for 3.3V inputs, or will this not be a problem?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • jazzedjazzed Posts: 11,803
    edited 2009-05-27 18:05
    My experience is that 220 Ohms in series is way too small. I use 1.8K or 2.2K Ohm resistors. Some suggest 1K, but I'm paranoid since I've seen that cause problems too on one of my boards.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-27 18:10
    Kye,

    The relevant info is published; it's in the datasheet. As stated there, the maximum current allowed through the protection diodes is +/-500uA. That implies a series resistor of 2.2K or more to protect against a 5V input.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-05-27 19:13
    Kye, There is an extensive reference thread on this subject HOW TO SAFELY INTERFACE A 5V SIGNAL TO THE PROPELLER? .

    attachment.php?attachmentid=41531

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • KyeKye Posts: 2,200
    edited 2009-05-27 19:37
    Cool, thanks for the help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • KyeKye Posts: 2,200
    edited 2009-05-27 21:00
    Hey, I was looking at the schematic for the demo board and it only uses 100 ohm series resistors. Are they needed or only for precaution? Since, the 10K resistor drops about all the voltage across itself. The PS2 protocol is open drain so they shouldn't be needed·right?

    (Trying to cut down parts on a design, that is why I am asking these questions).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • jazzedjazzed Posts: 11,803
    edited 2009-05-28 01:30
    I would normally use a stronger pull-up on open drain. Maybe you have identified why 2/3 of my keyboards won't work with the protoboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-28 01:45
    Kye,

    Many times I have given the same solution:
    www.sparkfun.com/commerce/product_info.php?products_id=8745

    This absolutely takes the guesswork out of the picture. Use it and move on to other problems.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
Sign In or Register to comment.