From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Programming the AD7995

Code and Documents

Attachment

Introduction

The AD7991/AD7995/AD7999 are 12-/10-/8-bit, low power, successive approximation ADCs with an I2C®-compatible interface. Each part

operates from a single 2.7 V to 5.5 V power supply and features a 1 μs conversion time. Each AD7991/AD7995/AD7999 provides a 2-wire serial interface compatible with I2C interfaces.

These devices have four single-ended analog input channels, or three single-ended analog input channels and one reference input channel (see image below).

http://www.analog.com/static/imported-files/images/Product_Descriptions/3887054274496234198AD7991_95_99.gif

Example

The LabVIEW 2009 VI attached to this document uses the NI-8451 to write and read from the configuration registers on the AD7995, that is the VI will read the register corresponding to a channel on the AD7995. The VI will also work for the AD7991 and AD7999.

Simply input the address for the device and the configuration register to read from into the inputs.

Additional Notes

The I2C bus is a two-wire half-duplex serial interface.  The  two lines, Serial Data (SDA) and Serial Clock (SCL), are both  bidirectional.

Each device connected to the I2C bus has a unique 7-bit I2C  address to facilitate identification and communication by the master.  Commonly,

the upper four bits are fixed and assigned to specific  categories of devices (for example, 1010 is assigned to serial EEPROMs).  The three

lower bits are programmable through hardware address pins,  allowing up to eight devices of the same type to be connected to a  single I2C bus.

Each device on the bus (both master and slave) can be a receiver  and/or transmitter.

The Analog to Digital chips discussed in this article are Analog Devices chips.

Christian A
National Instruments
Applications Engineer

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

Contributors