Overview
This page will discuss advanced features of the DIO that are available on T-Series devices.
Masked DIO Operations
Digital I/O "Bank" registers allow you to read or set the direction and state of multiple lines using a single operation. These registers function as bitmasks, where each bit in the written value corresponds to a specific I/O line (e.g., Bit 0 = DIO0, Bit 3 = DIO3).
Note: If a specific DIO line is not present on your device, its corresponding bit in the register is ignored.
Core Masked Registers
-
DIO_INHIBIT: A protection mask. When a bit is set (1) in this register, the corresponding bits in
DIO_STATEandDIO_DIRECTIONare "locked" and will be ignored during writes. -
DIO_DIRECTION: Sets the line as an Input (0) or Output (1).
-
DIO_STATE: * Writes: Sets the output state (High/Low) for lines configured as Outputs.
-
Reads: Returns the current state of all lines.
-
-
Note: Unlike single-line registers, bank registers do not automatically switch set the direction of a line. You must explicitly set the direction.
Reading Behavior
When reading a line that is set to input, the voltage on the pin will be interpreted as a logic high or low.
When reading a line set to output the follow behaviors may be observed:
-
When reading the state of an output, the actual voltage, as measured behind the protection resistors (see the “Protection” section above), will be used to determine whether the line is logic high or low.
-
The voltage is read behind the protection resistors. This creates a voltage divider with the output circuitry. That divider causes the following behaviors:
-
An output-high will read HIGH even when the screw terminal is shorted to GND. Connecting a negative voltage may cause an output-high to read LOW.
-
A CIO or EIO line set to output-low will read HIGH when shorted to VS.
-
A FIO line set to output-low will read LOW when shorted to VS.
-
-
At this time is it not possible to read the latches that control whether the IO is attempting to drive high or low.
Examples
Pull-ups and Pull-downs
Every digital I/O (DIO) line on T-Series devices includes internal resistors to ensure that inputs remain in a known state (High or Low) when not actively driven by an external signal. Without these, an unconnected input is "floating" and may toggle randomly.
Types
Due to differences in how the hardware is implemented, the electrical behavior of the pull-up or pull-down varies. Below is list of types and the
Because hardware implementation varies by device and pin, the electrical behavior of these resistors differs:
-
Simple (Fixed): These resistors are 100 kΩ, always active, and cannot be disabled in software.
-
Switched Flex Lines (Controllable): These are ≈17.5 kΩ and are connected to 2.2 V. They default on and can be disabled via software.
-
Switched Pull-Up (Controllable): These are ≈5 kΩ, default on, and can be disabled via software.
-
Switched Pull-Down (Controllable): These are ≈94 kΩ, default off, and can be enabled via software.
Device Compatibility & Specifications
The following table outlines the resistor configurations in each device:
Technical Notes
-
Fixed Pull-Ups (100 kΩ): These are connected to 3.3 V and are always active. Note that on some lines, the lower voltage may cause small loads to pull the line low enough that it fails to register as a High state.
-
Flex Line Pull-Ups (≈17.5 kΩ): These are connected to 2.2 V. They can be switched off to prevent interference with sensitive analog signals. See Section 13.1 for instructions on toggling these via software.
-
Switched Pull-Up: These have a 5 kΩ pull-up which defaults ON and can be disabled.
-
Switched Pull-Down: These have a 94 kΩ pull-down which defaults OFF and can be enabled.
-
Measurement Method: All impedance values were determined by creating a voltage divider using a 22 kΩ reference resistor to either GND (for pull-ups) or 3.3 V (for pull-downs).
Boot-up Defaults
The states and directions of that the IO lines will be set to during boot-up can be configured see 24.0 Device Configuration for more information.