This is an old revision of the document!
The AD7792 is a low power, low noise, complete analog front end for high precision measurement applications. The AD7792 contains a low noise 16-bit Σ-Δ ADC with three differential analog inputs. The on-chip, low noise instrumentation amplifier means that signals of small amplitude can be interfaced directly to the ADC. With a gain setting of 64, the rms noise is 40 nV when the update rate equals 4.17 Hz.
The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. Here you can find a generic driver which can be used as a base for any microcontroller platform and also specific drivers for Renesas platforms.
The driver contains two parts:
The Communication Driver has a standard interface, so the AD7792 driver can be used exactly as it is provided. There are three functions which are called by the AD7792 driver:
The implementation of these three functions depends on the used microcontroller.
The following functions are implemented in this version of AD7792 driver:
|unsigned char AD7792_Init(void)||Initialize AD7792 and check if the device is present.|
|void AD7792_Reset(void)||Sends 32 consecutive 1's on SPI in order to reset the part.|
|unsigned long AD7792_GetRegisterValue(unsigned char regAddress, unsigned char size)||Reads the value of the selected register.|
|void AD7792_SetRegisterValue(unsigned char regAddress, unsigned long regValue, unsigned char size)||Writes a value to the register.|
|void AD7792_WaitRdyGoLow(void)||Waits for RDY pin to go low.|
|void AD7792_SetMode(unsigned long mode)||Sets the operating mode of AD7792.|
|void AD7792_SetChannel(unsigned long channel)||Selects the channel of AD7792.|
|void AD7792_SetGain(unsigned long gain)||Sets the gain of the In-Amp.|
|void AD7792_SetIntReference(unsigned char type)||Sets the reference source for the ADC.|
|void AD7792_Calibrate(unsigned char mode, unsigned char channel)||Performs the given calibration to the specified channel.|
|unsigned long AD7792_SingleConversion(void)||Returns the result of a single conversion.|
|unsigned long AD7792_ContinuousReadAvg(unsigned char sampleNumber)||Returns the average of several conversion results.|
This section contains a description of the steps required to run the AD7792 demonstration project on a Renesas RL78G13 platform.
An EVAL-AD7792EBZ has to be interfaced with the Renesas Demonstration Kit (RDK) for RL78G13:
EVAL-AD7792EBZ J2 connector connector CS → YRDKRL78G13 J11 connector Pin 1 EVAL-AD7792EBZ J2 connector connector DIN → YRDKRL78G13 J11 connector Pin 2 EVAL-AD7792EBZ J2 connector connector DOUT → YRDKRL78G13 J11 connector Pin 3 EVAL-AD7792EBZ J2 connector connector SCLK → YRDKRL78G13 J11 connector Pin 4 EVAL-AD7792EBZ J3 connector connector AGND → YRDKRL78G13 J11 connector Pin 5 EVAL-AD7792EBZ J3 connector connector AVDD → YRDKRL78G13 J11 connector Pin 6
With the Applilet3 for RL78G13 tool the following peripherals have to be configured:
Choose to generate the Transmit/receive function for the CSI10 and configure the interface with the following settings:
Configure TM00 as an interval timer:
Disable the watchdog timer:
The reference project initializes the device, calibrates it and performs single and continuous reads of an analog signal. The results are displayed on the LCD.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RL78G13 for controlling and monitoring the operation of the ADI part.
Two software applications have to be used: Applilet3 for RL78G13 (a tool that automatically generates device drivers for MCU peripheral functions) and IAR Embedded Workbench for Renesas RL78 (the integrated development environment).
This section contains a description of the steps required to run the AD7792 demonstration project on a Renesas RX62N platform.
An EVAL-AD7792EBZ board has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
EVAL-AD7792EBZ J2 connector Pin DOUT → YRDKRX62N J8 connector Pin 22 EVAL-AD7792EBZ J2 connector Pin DIN → YRDKRX62N J8 connector Pin 19 EVAL-AD7792EBZ J2 connector Pin SCLK → YRDKRX62N J8 connector Pin 20 EVAL-AD7792EBZ J2 connector Pin CS → YRDKRX62N J8 connector Pin 15 EVAL-AD7792EBZ J3 connector Pin AVDD → YRDKRX62N J8 connector Pin 3 EVAL-AD7792EBZ J3 connector Pin AGND → YRDKRX62N J8 connector Pin 4
The demo program samples channel 1 at 16.7 Hz. The ADC is configured to work in bipolar mode and the gain of the In-Amp is set to 1. The hex values of the configuration and data registers are displayed on the LCD. The value of the Data register is also formatted to be displayed in mV.
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RX62N for controlling and monitoring the operation of the ADI part.