Skip to Navigation

2.8 - Digital I/O

The LabJack U3 has up to 20 digital I/O channels. 16 are available from the flexible I/O lines, and 4 dedicated digital I/O (CIO0-CIO3) are available on the DB15 connector. The first 4 lines, FIO0-FIO3, are unavailable on the U3-HV. Each digital line can be individually configured as input, output-high, or output-low. The digital I/O use 3.3 volt logic and are 5 volt tolerant.

The LabJackUD driver uses the following bit numbers to specify all the digital lines:

0-7    FIO0-FIO7  (0-3 unavailable on U3-HV)
8-15   EIO0-EIO7
16-19  CIO0-CIO3

The 8 FIO lines appear on the built-in screw-terminals, while the 8 EIO and 4 CIO lines appear only on the DB15 connector. See the DB15 Section of this User’s Guide for more information.

All the digital I/O include an internal series resistor that provides overvoltage/short-circuit protection. These series resistors also limit the ability of these lines to sink or source current. Refer to the specifications in Appendix A.

All digital I/O on the U3 have 3 possible states: input, output-high, or output-low. Each bit of I/O can be configured individually. When configured as an input, a bit has a ~100 kΩ pull-up resistor to 3.3 volts (all digital I/O are 5 volt tolerant). When configured as output-high, a bit is connected to the internal 3.3 volt supply (through a series resistor). When configured as output-low, a bit is connected to GND (through a series resistor).

The power-up condition of the digital I/O can be configured by the user. From the factory, all digital I/O are configured to power-up as inputs. Note that even if the power-up default for a line is changed to output-high or output-low, there is a delay of about 5 ms at power-up where all digital I/O are in the factory default condition.

The low-level Feedback function (Section 5.2.5) writes and reads all digital I/O. For information about using digital I/O under the Windows LabJackUD driver, see Section 4.3.5. See Section 3.1 for timing information.

Many function parameters contain specific bits within a single integer parameter to write/read specific information. In particular, most digital I/O parameters contain the information for each bit of I/O in one integer, where each bit of I/O corresponds to the same bit in the parameter (e.g. the direction of FIO0 is set in bit 0 of parameter FIODir). For instance, in the low-level function ConfigU3, the parameter FIODirection is a single byte (8 bits) that writes/reads the power-up direction of each of the 8 FIO lines:

  • if FIODirection is 0, all FIO lines are input,
  • if FIODirection is 1 (20), FIO0 is output, FIO1-FIO7 are input,
  • if FIODirection is 5 (20 + 22), FIO0 and FIO2 are output, all other FIO lines are input,
  • if FIODirection is 255 (20 + … + 27), FIO0-FIO7 are output.
tags:

Comments

#1

 

If I connect an EIO digital line to the VSS (that is 5V) and then inadvertently set to output-low.

This is an equivalent of a ground connection through a 180 Ω resistance.

This will draw 5 V / 180 Ω= 0.028 A = 28 mA from the board. Is this lethal?

 

In other words, how much intensity can we safely draw from the digital outputs?

More generally is there some settings or hardware mistakes that will break the device and that we should be aware off?

 

#2

The U3 should not be able to damage itself.  You should be able to connect any I/O to anything else without causing damage.  Your example is perhaps the worst thing the U3 can do to itself, but the I/O line should be able to sink the 28 mA continuously without damage.

The most common mistakes that cause damage are when you connect things that have other power supplies, particularly higher voltage supplies or AC mains.