USB-IO Interface Adapter GPIO-24
USB-IO interface adapter GPIO-24 allows to connect various hardware devices to your PC. Easy installation and plug-and-play support makes GPIO-24 adapter an ideal solution to add USB interface to your HW. This product is not recommended for new design. Please take a look at DLN-series adapters to find the product that fulfil your requirements.
USB-IO Interface Adapter has 24 I/O pins that can be used as:
Most of the USB-IO interface adapters support only so-called polling interface. In a polling interface, the client software calls the adapter periodically to retrieve current levels on the I/O pins.
For example: you want to be notified when the voltage on the analog input reaches 4.2V or frequency goes below 500 kHz. With polling approach you have to check the value each x seconds. You have to create an additional thread or timer in your application and to overload the USB bus with each call. And what if frequency goes below 500 kHz immediately after your last poll? Your application will be notified about this only after your next poll. So, to get better latency, you need to poll more frequently, overloading still further your application and the USB bus.
GPIO-24 differs from most of other low-cost USB-IO adapter by the event-driven interface. It means that the USB-IO interface adapter can notify your PC software immediately after the input value has changed. The event-driven interface is very flexible. The conditions of an event generation can be configured for every GPIO-24 module independently. For example, ADC module can send events when the voltage on the analog input descends below predefined value. Or rises above, say, 4.7V.
Would you like to analyze changes over time? No problem, USB-IO adapter can send events periodically with the predefined repeat interval.
Besides the event-driven interface, the polling interface is also supported by the GPIO-24 adapter.
USB-IO Interface Adapter GPIO-24 contains the following user-configurable modules:
- Digital Inputs and Digital Outputs (General Purpose Digital I/O)
Each of the 24 I/O pins can serve as a general purpose digital input or digital output. You may set output values for digital outputs and get current values both for inputs and outputs. With GPIO-24 event-driven interface your application can be notified when the input value changes. You can also configure the USB-IO adapter to send events only after specific changes (e.g. when input value changes from logical "1" to "0"). Event sending condition is configured for each digital input pin independently.
- Analog Inputs (ADC Module)
5 of the I/O pins can be used as analog inputs connected to 10-bit analog-to-digital converter (ADC). The ADC module is most commonly used to detect variations in voltage, light, temperature or pressure. It can also be used to read switches, potentiometers and other analog devices.
The ADC module can measure input voltage relatively to either internal or external voltage reference. At any time you can read the voltage on the analog inputs. Besides, the USB-IO adapter may send events containing the analog input values. Events are send either periodically with the predefined repeat interval or when the voltage reaches the user defined limits. The limits are specified as low and high threshold values. These limits are constantly compared with the input voltage. The ADC module can generate events when the input voltage:
- descends below the low threshold value;
- rises above the high threshold value;
- leaves the interval specified by low and high threshold values;
- reaches the interval specified by low and high threshold values.
- Comparators Module
The USB-IO interface adapter has user-configurable comparators module, which consists of 2 comparators. Each comparator compares two voltages and switches its output to indicate which voltage is greater. Comparator module uses 4 I/O pins as analog inputs and 2 I/O pins as digital outputs. The comparator outputs are also available for PC-side software. The comparator inputs can be selected from the analog inputs or from the on-board voltage reference. The comparator voltage reference is a 16-tap resistor ladder network that provides a selectable reference voltage.
At any time you can request the comparison results of both comparators. What is more, you can configure the USB-IO adapter to send periodically events with the results of comparison. The comparator module can also send events to notify the user when the comparison result changes.
- Pulse-Width Modulation (PWM) module
USB-IO adapter may produce pulse-width modulation (PWM) output. Any of 24 USB-IO interface adapter I/O pins can be switched into low-frequency PWM mode with configured high time and low time periods. High time is a time period when the output equals to 1, low time - when the output equals to 0. These periods are specified in milliseconds in the range from 1 to 65535 ms (65.535 seconds).
Besides, 2 I/O pins can be configured into the high-frequency PWM (HPWM) mode. The HPWM signal can be generated with the frequency in the range from 1470 Hz to 500 kHz.
Sometimes it is more convenient to send single pulses on demand. Single pulses can be generated on any of the 24 I/O pins. The user can specify the length and logical level of the pulse.
- Frequency Counter Module
USB-IO adapter can measure frequency of a digital signal on specified I/O pins. Frequency counter module with 2 counters is used for this purpose. Frequency is measured by counting the number of pulses on the corresponding I/O pin per second. You can read the current frequency at any time. To enable continuous frequency monitoring, the USB-IO interface adapter may periodically send events with current frequency. Or USB-GPIO adapter may send events only when the user-defined measurement limits are reached. To do so, specify a threshold frequency and select the condition of the event generation. The event can be generated:
- when the frequency is lower than the threshold value;
- when the frequency is higher than the threshold value;
- when the frequency is equal to the threshold value;
- when the frequency is not equal to the threshold value.
- Pulse Counter Module
The USB-IO interface adapter can count pulses with the help of the pulse counter module. The module consists of 2 pulse counters, that can be configured independently.
Each of the pulse counters can operate in one of the 3 modes. They are:
- Free Run Mode - Pulses are counted continuously. You can suspend, resume or reset the counter and get the number of pulses at any time;
- Time Based Mode - Pulses are counted during the user-defined time period. When the predefined time period is exceeded, the counting starts again from 0 and USB-IO adapter sends an event to PC. The event contains the number of pulses detected during this period;
- Pulse Based Mode - Pulses are counted until the number of pulses reaches the user-defined value. Then the counting starts again from 0 and USB-IO adapter sends an event to PC. The event contains time elapsed from the moment you started the counter.
- Weak Pull Up Resistors
USB-IO interface adapter has weak pull-up resistors on some of the I/O pins. Weak pull-up resistors are used to ensure that adapter digital inputs assume a high logic value (logical one) while external devices are disconnected. The USB-IO adapter pull-ups are automatically turned off when I/O pins are configured as digital outputs or analog inputs. In other configurations the pull-up resistors are software controlled.