What is an "open drain" ?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Let me see if I can make it clearer. Forget all the technical terms like "drain" and "sink" and "source". Just think of switches:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2010&stc=1&d=118956013 6">

    The top pair of switches are like an "open drain" or "open collector". When the switch is open, nothing can happen. When the switch is closed, whatever is connected to it is connected to ground. The "open circuit" end of the switch can give you either an open circuit (when open) or a connection to ground (when closed).

    The bottom pair of switches show the effect of a "pull-up resistor". Now, when the switch is open, the voltage at "A" is 5 volts. When the switch is closed, the voltage at "A" is 0 volts. The switch can give you either 5 volts (when open) or a connection to ground (when closed).

    Hope this helps!
    Attached Images Attached Images  
    Last edited by RussMartin; - 12th September 2007 at 06:52.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  2. #2
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    I'd like to use this pin to just read a simple TTL (+5v or 0v) input just like I'd do with any other pin. Does this "open drain" mean it'll behave strange?
    OK, open drain has to do only when a pin is used as an output. When you want to use the pin as an input then you are fine, the pin works completely the same as any other input pin.

    Also, what if I want to use it as an output and drive something like an LED?
    It can work as an output, but only as a switch to ground (as Russ's pic correctly shows). If you connect your LED from + power thru an appropriate resistor then to the open drain pin all will work fine.

  3. #3
    Join Date
    Jan 2013
    Posts
    1


    Did you find this post helpful? Yes | No

    Default Re: What is an "open drain" ?

    thanq sir...

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts