ad4020

Each device class in this module supports multiple parts, as follows:

ad4020: ad4020, ad4021, ad4022

ad4000: ad4000, ad4004, ad4008

ad4001: ad4001, ad4005

ad4002: ad4002, ad4006, ad4010

ad4003: ad4003, ad4007, ad4011

By default, the device_name parameter in the class constructor is the same as the class name (e.g. “ad4001” for the ad4001). To use the class with another supported model, the name must be given when instantiating the object. For example, if working with an ad4007 with a URI of “10.2.5.222”, use the ad4003 class, but specify the device_name parameter explicitly:

import adi
adc = adi.ad4003(uri="ip:10.2.5.222", device_name="ad4007")
...

Supported Drivers

The class adi.ad4020 supports the following IIO drivers:

ad4020.compatible_parts = ['ad4020', 'ad4021', 'ad4022']

Class API

class adi.ad4020(uri='', device_name='', device_index=0)

Bases: rx_chan_comp

AD4020 device

channel = []

Dynamic Attributes

The ad4020 class supports a variable number of channels depending on the hardware configuration. Therefore, the channel property interfaces are dynamically generated. They are available on an initiated object as attributes with names voltage0, voltage1, etc. They will be instances of the ad4020_channel class.

class adi.ad4020.ad4020_channel(ctrl, channel_name)

Bases: attribute

AD4020 channel

property raw

AD4020 channel raw value

property scale

AD4020 channel scale