Home » Cable And Satellite TV » Open Drain Mode

Open Drain Mode


USB to SPI bus

Most of DLN-series interface adapters support several buses. The most common of them are USB to SPI bus, USB to I2C bus and most notably GPIO. General Purpose Input-Output is a simple generic interface, which is widely-supported. The most powerful DLN-series USB-GPIO adapter (DLN-4) has 48 GPIO pins available.

Each of these pins can be independently programmed in open drain mode. This feature permits several outputs to be connected on a single I/O line.

An open drain terminal is connected to ground in the low voltage (logic 0) state, but has high impedance in the logic 1 state. This prohibits current flow, but as a result, such a device requires an external (or embedded) pull-up resistor connected to the positive voltage rail (logic 1). If all outputs attached to the line are in the high-impedance (i.e., logic 1) state, the pull-up resistor will hold the wire in a high voltage state. If 1 or more of the device outputs are in the ground (i.e., logic 0) state, they will sink current and pull the line voltage near ground.

Open Drain mode can be activated for each GPIO pin individually using the DlnGpioPinOpendrainEnable(). In order to disable Open Drain mode for a single pin call the DlnGpioPinOpendrainDisable() function. Current state of the mode can be retrieved using the DlnGpioPinOpendrainIsEnabled(). Open Drain can also be enabled or disabled using the DlnGpioPortSetCfg() function.

To do this you must specify the corresponding handle and port values, as well as configure validFields, mask and config parameters.

When a DLN-series USB-GPIO interface adapter is reset, the open drain mode is disabled on all pins. Open Drain mode is also vital for USB-I2C operation, also supported by most DLN-4 adapters. USB-SPI functioning makes no use of Open Drain mode.

Leave a Reply