USB-GPIO Interface Adapters Comparison


USB-GPIO module allows you to use the adapter pins as general purpose input/output lines. In this article we compare USB-GPIO interface of several interface adapters. The comparison chart includes adapters from the cheapest on the market to the most powerful ones. Our article can help you choose the right USB-GPIO adapter for you.

All USB GPIO adapters listed below are interfaced using the same API. Depending to your initial intent you can either order the cheapest one (DLN-1) or the most powerful (DLN-4S). If you decide in the future that you need another USB GPIO adapter, you can easily switch to the new one.

All USB GPIO adapters support asynchronous interface to overcome the USB latency problem, which significantly reduces the communication bandwidth. We have found no competitive USB GPIO adapter that provides the solution for this problem.

USB GPIO Interface

USB GPIO Adapter
DLN-1

DLN-2

DLN-4M

DLN-4S
Digital I/O Pins 32 32 48 48
Pull-up Resistors
All pins, except I2C pins

All pins, except I2C pins

All pins

All pins
Debounce Filter
Open Drain Mode
I2C pins only

I2C pins only
ADC Module
4 10-bit analog inputs

8 10-bit analog inputs

4 10-bit analog inputs
4 12-bit analog inputs

4 10-bit analog inputs
4 12-bit analog inputs
USB Interface
Full Speed (12MHz)

Full Speed (12MHz)

High Speed (480MHz)

High Speed (480MHz)
PWM Module
2 full range pins

2 full range pins

4 full range pins

4 full range pins
Pulse Counter Module
Interfaces
Synchronous Interface



Asynchronous Interface



Event-driven Interface
Additional Interfaces I2C Master Interface
SPI Master Interface
ADC, PWM
Pulse Counter
I2C Master Interface
SPI Master Interface
ADC, PWM
Pulse Counter
I2C Master Interface
SPI Master Interface
ADC, PWM
Pulse Counter
UART
I2C Master Interface
I2C Slave Interface
SPI Master Interface
SPI Slave Interface
ADC, PWM
Pulse Counter
UART
PC USB Host Powered



GPIO GUI Demo Examples



Supported Operation Systems
RoHS Compliant
Price
(PCB board without enclosure)
$58.70 $79.40 $116 $187
Price
(Adapter with enclosure)
$140.90 $211.90

Digital Inputs and Digital Outputs

Each USB-GPIO adapter is equipped with a certain number of pins that can be used as digital inputs or digital outputs. The pins can be configured individually or as parts of the port. You may set output values for digital outputs and get current values both for inputs and outputs.

  • DLN-1 and DLN-2 USB-GPIO interface adapters have 32 GPIO pins.
  • DLN-4M and DLN-4S USB-GPIO interface adapters each have 48 GPIO pins.

ADC Module

Some USB-GPIO Interface Adapters have several analog inputs connected to an Analog to Digital Converter (ADC). Analog to digital conversion has many applications. You can acquire data from various analog sensors and save it to your PC for further processing. You can also implement a real time analog data processing in your software. Combined with other USB-GPIO adapter modules you can implement feedback control over your hardware. Analog to digital conversion is well utilized for external analog signal reading such as current, voltage, temperature, distance, pressure, or even color information.

Analog to Digital Converter inputs can generate events. If you adjust low or high threshold value, the adapter will send events once this threshold is crossed.

  • DLN-4M and DLN-4S each have 2 ADC modules. The first one has 4 10-bit channels and the second one has 4 12-bit channels. DLN-4M or DLN-4S USB-GPIO adapter can be used to measure voltage from 0 V to VDD (positive supply voltage). Since VDD can be configured as 3.3 V, the ADC can be used to measure voltage from 0 V to 3.3 V. You can use either VDD or external supply as the reference voltage.

PWM Module

Pulse width modulation (PWM) is a method for binary signals generation, which has 2 signal periods (high and low). Pulse Width Modulation can be used to control analog circuits with digital outputs of the processor. PWM is employed in a wide variety of applications, ranging from measurement and communications to power control and conversion. Pulse width modulation is also used to reduce the total power delivered to a load without resulting in loss, which normally occurs when a power source is limited by a resistive element. The underlying principle in the whole process is that the average power delivered is directly proportional to the duty cycle modulation.

PWM module is present in DlN-1, DLN-2, DLN-4M and DLN-4S USB-GPIO adapters.

Pull-up Resistors

Pull-up resistors are used to ensure that inputs to I/O lines settle at expected levels, if external devices are disconnected or high-impedance.

  • DLN-1 and DLN-2 USB-GPIO interface adapter equipped with embedded pull-up resistors, except I2C pins.
  • DLN-4M and DLN-4S USB-GPIO adapters are equipped with an embedded pull-up resistor for each of the pins.
  • Every pull-up resistor can be adjusted individually. External pull-ups on SCL and SDA are present for I2C bus operation.

Open Drain Mode

Open drain mode 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 high level. 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.

  • This mode is only available in DLN-4M and DLN-4S USB-GPIO adapters. Each of the pins can be configured as open drain or push-pull.
  • DLN-1 and DLN-2 adapters don't support open drain mode in GPIO interface module. Open drain mode only supported in I2C interface module.

Debounce Filter

Contact bounce may cause sending numerous events. To avoid it, debounce filter can be implemented in the USB-GPIO adapter. The new value is only accepted if it is stable for a predefined period of time. This period is called a Debounce Interval.

  • DLN-1 and DLN-2 USB-GPIO interface adapters do not support debounce filtering.
  • In DLN-4M and DLN-4S USB-GPIO interface adapters the debounce interval is adjusted in microseconds only once for all the pins. You can turn the debounce filtering on/off for each pin individually.

Event Driven Interface

One of the most exciting features of some USB-GPIO interface adapters is the ability to send asynchronous events. You can preconfigure event generation condition and continue with your regular tasks. When such condition is met, the adapter sends an event to your application. For some of the event types the event period can be defined. In this case the adapter will send recurrent events.

Without events, your application must poll the state of the input pin in loop, checking to see if any change has occurred. Polling requires a significant amount of CPU power, overloads the USB bus and can fail to detect changes if they occur too quickly.

Different modules of a USB-GPIO interface adapter can be configured to send events. We are now going to review the digital input events. Similar events can be configured for other modules of a compatible USB-GPIO interface adapter.

A DLN-series adapters can be configured to send DLN_GPIO_EVENT events. They are generated when the level on an I/O meets specified requirements. Digital inputs events are configured using the DLN_GPIO_PORT_CONFIG structure.

  1. DLN_GPIO_EVENT_LEVEL_LOW

    Events are generated when low level (logical 0) is detected on the digital input line. If the event period parameter is 0, a single event is generated, when the level on the line changes from logical 1 to logical 0. If the event period is non-zero, the device will send recurrent events every "event period" milliseconds, while low level is present on the line.



  2. DLN_GPIO_EVENT_LEVEL_HIGH

    Events are generated when high level (logical 1) is detected on the digital input line. If the event period parameter is 0, a single event is generated, when the level on the line changes from logical 0 to logical 1. If the event period is non-zero, the device will send recurrent events every "event period" milliseconds, while high level is present on the line.



  3. DLN_GPIO_EVENT_CHANGE

    Events are generated when the level on the digital input line changes. If the event period parameter is 0, a single event is generated, when the level on the line changes. If a user defines the non-zero event period parameter, the device will send recurrent events every "event period" milliseconds.



  4. GPIO_IN_EV_FALLING

    Events are generated when the level on the digital input line changes from high level (logical 1) to low level (logical 0) (this event type is only available for GPIO-24 USB-GPIO interface adapter).



  5. GPIO_IN_EV_RISING

    Events are generated when the level on the digital input line changes from low level (logical 0) to high level (logical 1) (this event type is only available for GPIO-24 USB-GPIO interface adapter).



  6. DLN_GPIO_EVENT_ALWAYS

    Events are generated continuously, regardless of the signal level. A user must define the non-zero event period parameter. The device sends the event every "event period" milliseconds. The event contains the current value on the input line (this event type is only available for DLN-4M and DLN-4S USB-GPIO interface adapters).


  • DLN-1, DLN-2, DLN-4M and DLN-4S USB-GPIO adapters support the event driven interface.

Supported Operation Systems

All listed USB-GPIO interface adapters can be used in MS Windows environment.

We are currently working on adding support of other operation systems.

USB Interface

  • DLN-1 and DLN-2 USB-GPIO adapters use full-speed (12 MHz) USB interface.
  • Since DLN-4M and DLN-4S adapters are based on USB high-speed (480 MHz) interface, they allow much faster GPIO operation.

RoHS

The Directive on the restriction of the use of certain hazardous substances in electrical and electronic equipment 2002/95/EC (commonly referred to as the Restriction of Hazardous Substances Directive or RoHS) was adopted in February 2003 by the European Union. This directive restricts the use of six hazardous materials in the manufacture of various types of electronic and electrical equipment.

All other Diolan products, including DLN-1, DLN-2, DLN-4M and DLN-4S USB-GPIO adapters are RoHS compliant.