From the course: Data Acquisition with LabVIEW

Digital signal fundamentals - LabVIEW Tutorial

From the course: Data Acquisition with LabVIEW

Digital signal fundamentals

- [Narrator] In addition to analog input and output, most multi-function DAC devices include some number of digital input/output, or DIO, lines as well. Digital refers to how computers communicate and represent information as binary values that can be in one of two states. One or zero, true or false, on or off. These are all terms that are used to describe how data is represented within a computer, but true and false are just abstract concepts. The purpose of a DAC device is to interface with real things in the physical world. So we need a way to represent these binary states as a signal that can be physically measured and generated. If you dig down into it, the way computers actually represent these two possible states is by using one of two voltages, a high voltage that usually represents the Boolean value of true, and low voltage representing the opposite value of false. It's fairly common to see 3.3 or five volts used to represent the high voltage, and zero to represent the low voltage. Now keep in mind that this digital signal, which we think of in terms of true or false, is actually being represented by an analog signal, which has a continuous range of possible voltage, and will be impacted by noise and other device imperfections. It's not realistic to expect the voltage representing our digital signal to be exactly zero volts, or exactly five volts, just somewhere close. So we define a range of low and high voltages. For example, in the common TTL, or transistor-transistor logic family, anything between zero and 0.8 volts represents the low value, and anything from two volts up to the supply voltage, which is usually five volts, is considered high. If the voltage is in between those two ranges, it's considered uncertain and could potentially be interpreted either way, which can cause problems. So make sure the digital signals you provide as inputs to your DAC device fall within the acceptable ranges. Those acceptable ranges can differ between devices, so you should always refer to its spec sheet. Looking at the digital input section of the spec sheet for my USB 6001, I see that the minimum high input voltage, labeled VIH, is 2.3 volts, and that the maximum low input voltage, VIL, is 0.8 volts. On the digital output side of things, each DAC device will have a certain amount of current that it can source or sync to connected loads, so be sure to check your device specifications to see what it's capable of to avoid accidentally damaging it. My USB 6001 has 13 digital I/O lines, which, like many DAC devices, are bi-directional, meaning they can be individually configured to serve as either an input or an output. They all share the same ground reference, which is available on two terminals named D Ground, and there's also this 5 volt terminal which can be used as a reference for the digital high voltage. In addition to addressing each of those lines individually, they can alternatively be configured and used as a single port, which is a collection of digital lines. In fact, the naming convention for each of the lines is based on their associated port. My USB 6001 has three ports. Port zero has eight lines, numbered zero through seven. Port one has four lines, and port two has the remaining one line. When addressing the DIO lines as a port, all of the lines within that port will be either an input or an output, and the way your write and read data to and from the port is as a single numeric value rather than individual Boolean values for each line. Notice that these two lines also have a secondary name, PFI 0 and PFI 1. PFI stands for programmable function interface. In addition to regular digital I/O purposes, PFI lines can also be used to pass special digital signals, like triggers, counters, and clocks, in and out of the device.

Contents