Library for interfacing Analog Devices AD7195 2/4-Channel 24-Bit ∑-Δ ADC.
The AD7195 is a low noise, complete analog front end for high precision measurement applications and contains a low noise, 24-bit sigma-delta (Σ-Δ) analog-to-digital converter (ADC). The on-chip low noise gain stage means that signals of small amplitude can be interfaced directly to the ADC. The AD7195 contains ac excitation, which is used to remove dc-induced offsets from bridge sensors.
Features:
typical SPI clock speed to be used
configuration of clock polarity and clock phase for the AD7195
Initializes SPI communication with the AD7195
First of all the CS port and SPI interface are copied to the transferred device handle. The used CS pin is configured as output and set to high to avoid data transfer at the beginning. Then the AD7195 is reset by writing 40-Bits consecutive 1s to the SPI interface. Afterwards the ID and configuration register are checked to ensure that the AD7195 was initialised correctly
absolute maximum SPI clock speed (5MHz)
Available register (Address | R/W | Default | Description)
Communications register configuration bits
Status Register register bits
Indication which channel is being converted by the ADC (Status Register, bit 0-2)
Mode Register configuration bits (operating mode, output data rate and clock source)
Operating mode (Mode Register, bit 13-15 )
Clock source (Mode Register, bit 18-19 )
Filter output data rate (Mode Register, bit 0-9 )
When chop is disabled and continuous conversion mode is selected Output Data Rate = (MCLK/1024)/FS where FS is the decimal equivalent of the code in Bit FS0 to Bit FS9 and is in the range 1 to 1023, and MCLK is the master clock frequency. With a nominal MCLK of 4.92 MHz, this results in an output data rate from 4.69 Hz to 4.8 kHz. With chop disabled, the first notch frequency is equal to the output data rate when converting on a single channel.
When chop is enabled Output Data Rate = (MCLK/1024)/(N × FS) where FS is the decimal equivalent of the code in Bit FS0 to Bit FS9 and is in the range 1 to 1023, and MCLK is the master clock frequency. With a nominal MCLK of 4.92 MHz, this results in a conversion rate from 4.69/N Hz to 4.8/N kHz, where N is the order of the sinc filter. The sinc filter’s first notch frequency is equal to N × output data rate. The chopping introduces notches at odd integer multiples of (output data rate/2).
Configuration Register configuration bits ( unipolar or bipolar mode, enable or disable the buffer, enable or disable the burnout currents, select the gain, and select the analog input channel)
Channel select bits (Configuration Register, bit 8-15)
Gain Select Bits (Configuration Register, bit 0-2)
GPOCON Register configuration bits (open or close the bridge power-down switch)
Reads register of AD7195
Writes register of AD7195