Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
digitalin open drain
to use digitalin, we can set mode(pull up ,pull down, pull none) but what dose it mean open drain? how to use this mode?
2 Answers
10 years, 2 months ago.
On I2C pins there is better opendrain than on other pins (no idea what the actualy difference is), but opendrain is something you use on an output, not an input. Since DigitalOut can't set mode, you should try it with DigitalInOut.
10 years, 2 months ago.
You can use the open drain configuration with I2C compliant pins SDA, SCLK.
The datasheet states: - All GPIOs support a new, configurable open-drain operating mode. - Most pins can also be configured as open-drain outputs or to have a pull-up, pull-down, or no resistor enabled.
However "Fig 38. Standard I/O pin configuration with analog input" has no open-drain enable for pin configured as digital input.
So, this means it is an error as regards input.