Go Down

Topic: Open Drain (Read 4 times) previous topic - next topic

Firefox

To put an Arduino Input/Output into Open Drain mode I assume I do the following.

Set the Pin as an Input

Send the Input HIGH to present a High Impedance at the Input

Send the Input LOW to Sink current

Can someone please confirm I have this right or otherwise.

MAS3

No.

Open drain means you have an output, so you'd need to set it up as such.
Setting it HIGH means it will put 5 volts to that pin.
Setting it LOW means it will connect it to GND (0 volts).
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Firefox

They (the electronics world) call it an Output!! but if you google Open Drain the explanation is that it can only Sink current or present a High Impedance so it cannot output anything. :) The Output definition is very confusing.

retrolefty


They (the electronics world) call it an Output!! but if you google Open Drain the explanation is that it can only Sink current or present a High Impedance so it cannot output anything. :) The Output definition is very confusing.


Open drain, like open collector outputs are used where the external circuitry determines what the HIGH output voltage needs to be and then the open drain output can turn it LOW by turning on and the output signal goes to ground. There is a real world place for open drain/open collector outputs Vs full push-pull output pins. Simply wiring an external pull-up resistor will convert a open drain/open collector output pin to a standard output that you seem more comfortable with.  ;)

One good example for the need of open drain output pins is the AVR chip's I2C clock and data pins when I2C is engaged. These two pins have to be able to switch from input or output mode to support bi-directional communications on these two pins, and they need to be open drain outputs so the external pull-up resistor can determine the logic voltage level to use with specific I2C chips.

Lefty

Grumpy_Mike


They (the electronics world) call it an Output!! but if you google Open Drain the explanation is that it can only Sink current or present a High Impedance so it cannot output anything. :) The Output definition is very confusing.

No it is not.

Sinking current IS an output. Just like sourcing current is an output.

There is no open drain or open collector configuration in an arduino. If you want one you have to use an external transistor or FET.

Go Up