Like the generation method discussed above, the method for receiving LVDS signals with the NI 655X requires only a few special settings.
For an example of what happens if the correct settings are not used, assume both ends of an LVDS signal were wired directly to two input terminals on the NI 655X, each with 50 Ω input impedance. The circuit would look like Figure 5.
Figure 5. Circuit Diagram of NI 655X receiving LVDS signal - Ground Terminated
In this example, the driver’s constant current source attempts to push 3.5 mA through the positive wire. With a 50 Ω terminating resistor to ground, the voltage at the receiver is 175 mV, well below the desired LVDS common-mode voltage of 1.2 V. The negative leg is pulled to ground by the other 50 Ω resistor, forcing the voltage to be 0 V. Many LVDS drivers consider this to be an “open-fault” condition and stop functioning. You must change the circuit to prevent this open-fault condition.
Correcting the circuit requires you to complete the following two steps:
- Generate a static voltage of 1.2 V on every NI 655X channel that is acquiring LVDS data.
- Set the NI 655X acquisition voltage high and low levels to 1.2 V.
Keep in mind that the NI 655X can simultaneously acquire a dynamic signal and generate a static voltage on the same channel. After you complete these steps, the channel electronics for each channel look like Figure 6.
Figure 6. NI 655X Channel Electronics
The variable voltage driver places 1.2 V on the output. If two such channels are combined with an LVDS driver, Figure 5 becomes the circuit shown in Figure 7.
Figure 7. LVDS Circuit Diagram - Correct Termination
The two terminating resistors are both connected to 1.2 V, providing a complete current path with appropriate voltages. Depending on the LVDS device that you use, some current may be drawn through the negative leg of the signal, so the resulting voltage on channel 1 will be less than 1.2 V. The driver also inverts the signal, causing channel 0 to see the lower voltage (figure 8).
Figure 8. LVDS Circuit Diagram - Inverted Signals
In this way, the voltage at channel 0 can toggle between 1.375 V and some voltage less than 1.2 V. Since the acquisition voltages on the NI 655X were set to 1.2 V, the comparators can detect these voltage changes, thereby reporting the correct sequence of 1’s and 0’s.
Creating this configuration requires only a small modification to a regular acquisition program. The LabVIEW code in Figure 9 initializes a generation session, assigns channels 0 and 1 as static generation channels, and sets one of the generation voltages to 1.2 V. The high-level voltage was used in this case, but either level may be used. Finally, the corresponding logic state is written to both of the channels, placing 1.2 V at the output of the variable voltage drivers for both channels.
Figure 9. LabVIEW Code Demonstrating Static Voltage Generation
To acquire the signal, set up a normal acquisition. The only necessary change is to the acquisition high and low voltage settings. As mentioned earlier, NI recommends you set both acquisition voltage levels to 1.2 V, as shown in Figure 10.
Figure 10. LabVIEW Code Demonstrating Dynamic Acquisition
Combining the dynamic acquisition and static generation programs into a single VI is simple. Just ensure that the static voltage being generated on the channels is not cleared until after the acquisition has finished. To do this, wire the error cluster so that you ensure the proper order of execution. Do not close the generation session until after the acquisition is complete. Figure 11 shows one possible configuration for a combination VI.
Figure 11. Combined Code for Static Generation and Dynamic Acquisition