Wiki

This version (10 Aug 2023 14:34) was approved by Stanca-Florina Pop.The Previously approved version (12 Dec 2022 12:48) is available.Diff

AD7616 User Guide

Overview

The AD7616 is a 16-bit, data acquisition system (DAS) that supports dual simultaneous sampling of 16 channels. The AD7616 operates from a single 5 V supply and can accommodate ±10 V, ±5 V, and ±2.5 V true bipolar input signals while sampling at throughput rates up to 1 MSPS per channel pair with 90 dB SNR. Higher SNR performance can be achieved with the on-chip oversampling mode; 92 dB for an oversampling ratio of 2.

The input clamp protection circuitry can tolerate voltages up to ±20 V. The AD7616 has 1 MΩ analog input impedance regardless of sampling frequency. The single supply operation, on-chip filtering, and high input impedance eliminate the need for driver op-amps and external bipolar supplies.

Each device contains analog input clamp protection, a dual, 16-bit charge redistribution successive approximation analog-to-digital converter (ADC), a flexible digital filter, a 2.5 V reference and reference buffer, and high-speed serial and parallel interfaces.

Applications:

  • Powerline monitoring
  • Protective relays
  • Multiphase motor control
  • Instrumentation and control systems
  • Data acquisition systems (DAS)

Supported Devices

Evaluation Boards

Supported Carriers

Other required hardware

Block Diagrams

  • AD7616_SDZ using the SERIAL interface

  • AD7616_SDZ using the PARALLEL interface

Required software

  • We're upgrading the Xilinx tools on every release. The supported version number can be found in our git repository .
  • An UART terminal (Tera Term/Hyperterminal), baud rate set to 115200.

Jumper setup

Jumper/Solder link Position Description
SL1 Unmounted Channel Sequencer Enable
SL2 Unmounted RC Enable Input
SL3 Mounted Selects 2 MISO mode
SL4 Unmounted Oversampling Ratio Selection OS2
SL5 Mounted If mounted, selects serial interface
SL6 Unmounted Oversampling Ratio Selection OS1
SL7 Unmounted Oversampling Ratio Selection OS0
LK40 A Onboard 5v0 power supply selected
LK41 A Onboard 3v3 power supply selected

Using the HDL reference design

In the ADI Reference Designs HDL User Guide can be found an in-depth presentation and instructions about the HDL design in general.

In the axi_ad7616's wiki page, can be found a detailed description of the core.

The data path of the HDL design is simple as follows:

  • the parallel interface is controlled by the axi_ad7616 IP core
  • the serial interface is controlled by the SPI Engine Framework
  • data is written into memory by a DMA (axi_dmac core)
  • all the control pins of the device are driven by GPIO's

In order to build the HDL design the user has to go through the following steps:

  1. Confirm that you have the right tools (see Release notes)
  2. Clone the HDL GitHub repository (see https://wiki.analog.com/resources/fpga/docs/git)
  3. Choose the required interface (see caption Switching between interface types)

Switching between interface types

Before the board power-up, the user has to choose the required device interface and setup. Depending on the required interface mode, some hardware modifications need to be done on the board and/or Tcl script:

In case of the SERIAL interface:

$ make SER_PAR_N=1

In case of the PARALLEL interface:

$ make SER_PAR_N=0
Because of the SDP-I-FMC the level of the VADJ in the carrier board needs to be set to 3.3V.

CPU/Memory interconnects addresses

Instance Address
axi_ad7616_dma 0x44a30000
ad7616_pwm_gen 0x44b00000
spi_ad7616_axi_regmap 0x44a00000
axi_ad7616 0x44a80000

Note:

  • spi_ad7616 is instantiated only for SER_PAR_N=1
  • axi_ad7616 is instantiated only for SER_PAR_N=0

PL Interrupts

Instance HDL interrupt Linux PsU interrupt
0 89
1 90
2 91
3 92
4 93
5 94
6 95
7 96
8 104
9 105
axi_ad7616 10 106
11 107
spi_ad7616 12 108
axi_ad7616_dma 13 109
14 110
15 111

Note:

  • spi_ad7616 is instantiated only for SER_PAR_N=1
  • axi_ad7616 is instantiated only for SER_PAR_N=0

GPIO signals

Ps7 EMIO offset = 54

GPIO Signal GPIO HDL GPIO EMIOn
adc_reset_n 97 43
adc_hw_rngsel 96-95 42-41
adc_os 94-92 40-38
adc_seq_en 91 37
adc_burst 90 36
adc_chsel 89-87 35-33
adc_crcen 86 32

No-OS Driver Description

Functions Declarations

Function Description
int32_t ad7616_read(ad7616_dev *dev, uint8_t reg_addr, uint16_t *reg_data);
SPI read from device.
int32_t ad7616_write(ad7616_dev *dev, uint8_t reg_addr, uint16_t reg_data);
SPI write to device.
int32_t ad7616_read_mask(ad7616_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t *data);
SPI read from device using a mask.
int32_t ad7616_write_mask(ad7616_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data);
SPI write to device using a mask.
int32_t ad7616_spi_read(ad7616_dev *dev, uint8_t reg_addr, uint16_t *reg_data);
SPI read from device.
int32_t ad7616_spi_write(ad7616_dev *dev, uint8_t reg_addr, uint16_t reg_data);
SPI write to device.
int32_t ad7616_par_read(ad7616_dev *dev, uint8_t reg_addr, uint16_t *reg_data);
PAR read from device.
int32_t ad7616_par_write(ad7616_dev *dev, uint8_t reg_addr, uint16_t reg_data);
PAR write to device.
int32_t ad7616_reset(ad7616_dev *dev);
Perform a full reset of the device.
int32_t ad7616_set_range(ad7616_dev *dev, ad7616_ch ch, ad7616_range range);
Set the analog input range for the selected analog input channel.
int32_t ad7616_set_mode(ad7616_dev *dev, ad7616_mode mode);
Set the operation mode (software or hardware).
int32_t ad7616_set_oversampling_ratio(ad7616_dev *dev, ad7616_osr osr);
Set the oversampling ratio.
int32_t ad7616_setup(ad7616_dev **device, adc_core *core, ad7616_init_param init_param);
Initialize the device.

Types Declarations

typedef enum {
    AD7616_SW,
    AD7616_HW,
} ad7616_mode;
 
typedef enum {
    AD7616_SERIAL,
    AD7616_PARALLEL,
} ad7616_interface;
 
typedef enum {
    AD7616_VA0,
    AD7616_VA1,
    AD7616_VA2,
    AD7616_VA3,
    AD7616_VA4,
    AD7616_VA5,
    AD7616_VA6,
    AD7616_VA7,
    AD7616_VB0,
    AD7616_VB1,
    AD7616_VB2,
    AD7616_VB3,
    AD7616_VB4,
    AD7616_VB5,
    AD7616_VB6,
    AD7616_VB7,
} ad7616_ch;
 
typedef enum {
    AD7616_2V5 = 1,
    AD7616_5V  = 2,
    AD7616_10V = 3,
} ad7616_range;
 
typedef enum {
    AD7616_OSR_0,
    AD7616_OSR_2,
    AD7616_OSR_4,
    AD7616_OSR_8,
    AD7616_OSR_16,
    AD7616_OSR_32,
    AD7616_OSR_64,
    AD7616_OSR_128,
} ad7616_osr;
 
typedef struct {
    /* SPI */
    spi_device          spi_dev;
    /* GPIO */
    gpio_device         gpio_dev;
    int8_t              gpio_hw_rngsel0;
    int8_t              gpio_hw_rngsel1;
    int8_t              gpio_reset;
    int8_t              gpio_os0;
    int8_t              gpio_os1;
    int8_t              gpio_os2;
    /* Device Settings */
    ad7616_interface    interface;
    ad7616_mode         mode;
    ad7616_range        va[8];
    ad7616_range        vb[8];
    ad7616_osr          osr;
    adc_core            *core;
} ad7616_dev;
 
typedef struct {
    /* SPI */
    uint8_t             spi_chip_select;
    spi_mode            spi_mode;
    spi_type            spi_type;
    uint32_t            spi_device_id;
    /* GPIO */
    gpio_type           gpio_type;
    uint32_t            gpio_device_id;
    int8_t              gpio_hw_rngsel0;
    int8_t              gpio_hw_rngsel1;
    int8_t              gpio_reset;
    int8_t              gpio_os0;
    int8_t              gpio_os1;
    int8_t              gpio_os2;
    /* Device Settings */
    ad7616_mode         mode;
    ad7616_range        va[8];
    ad7616_range        vb[8];
    ad7616_osr          osr;
} ad7616_init_param;

Create the SDK Project

To run the application the user has to create an Empty Application Project using Xilinx SDK, and have to copy all the design sources to the sw directory. (see SDK Software Setup for more detailed instructions) Another option for building the no-OS is using the Makefile. (see Build no-OS with GNU make)

HDL Downloads

No-OS Downloads

Support

Questions? Feel free to ask your questions in EngineerZone support forums.

resources/eval/user-guides/ad7616-sdz.txt · Last modified: 10 Aug 2023 14:33 by Stanca-Florina Pop