Example Code

Hardware Abstraction of an Analogue to Digital Converter

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Download All

Overview
    As part of the AE Projects 2012, our team were tasked with the creation of an automated test system for an I2C controlled Analogue to Digital Converter.

 

Description

    In this example, I've used LabVIEW Object Oriented Programming (LVOOP) to implement three levels of abstraction:

  • Abstraction of the ADC Device Under Test (DUT).
  • Abstraction of communication protocol used to talk to the ADC.
  • Finally, abstraction of the physical test hardware used to communicate with the ADC

Requirements
    Software
        LabVIEW 2012 (or compatible)
        NI-HSDIO driver which is compatible with your hardware and version of LabVIEW
    Hardware
        AD-7992 ADC or a simulated auxillary ADC.

 

Instructions
    1.We can choose between whether we want to interact with Analog Devices' AD-7992, or a simulated version of an ADC, the AUX-ADC.
    2.The AD-7992 uses the I2C communication protocol in order to be interacted with. With LVOOP, we Dynamically Dispatch (swap at runtime) the I2C Communication Protocol as the means of communication.
    3.The I2C Communication Protocol in this instance uses an NI-HSDIO device in order to output communication data. The NI-HSDIO device is a type of Buffered Digital Interface.

 

    What results is an extremely powerful architecture that can allow us to create code that operates indepednantly of the ADC, the communication protocol and the physical test hardware itself.

 

Additional Information or References 

ADC.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.