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!
Bookmarks