The AD7193 is a low noise, complete analog front end for high precision measurement applications. It 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 interface directly to the ADC.
The device can be configured to have four differential inputs or eight pseudo differential inputs. The on-chip channel sequencer allows several channels to be enabled simultaneously, and the AD7193 sequentially converts on each enabled channel, simplifying communication with the part. The on-chip 4.92 MHz clock can be used as the clock source to the ADC or, alternatively, an external clock or crystal can be used. The output data rate from the part can be varied from 4.7 Hz to 4.8 kHz.
The device has a very flexible digital filter, including a fast settling option. Variables such as output data rate and settling time are dependent on the option selected. The AD7193 also includes a zero latency option.
The part operates with a power supply from 3 V to 5.25 V. It consumes a current of 4.65 mA, and it is available in a 28-lead TSSOP package and a 32-lead LFCSP package.
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 different microcontroller platforms.
The driver contains two parts:
The Communication Driver has a standard interface, so the AD7193 driver can be used exactly as it is provided.
There are three functions which are called by the AD7193 driver:
SPI driver architecture
The following functions are implemented in this version of AD7193 driver:
|unsigned char AD7193_Init(void)||Checks if the AD7139 part is present.|
|void AD7193_SetRegisterValue(unsigned char registerAddress, unsigned long registerValue, unsigned char bytesNumber, unsigned char modifyCS)||Writes data into a register.|
|unsigned long AD7193_GetRegisterValue(unsigned char registerAddress, unsigned char bytesNumber, unsigned char modifyCS)||Reads the value of a register.|
|void AD7193_Reset(void)||Resets the device.|
|void AD7193_SetPower(unsigned char pwrMode)||Set device to idle or power-down.|
|void AD7193_WaitRdyGoLow(void)||Waits for RDY pin to go low.|
|void AD7193_ChannelSelect(unsigned short channel)||Selects the channel to be enabled.|
|void AD7193_Calibrate(unsigned char mode, unsigned char channel)||Performs the given calibration to the specified channel.|
|void AD7193_RangeSetup(unsigned char polarity, unsigned char range)||Selects the polarity of the conversion and the ADC input range.|
|unsigned long AD7193_SingleConversion(void)||Returns the result of a single conversion.|
|unsigned long AD7193_ContinuousReadAvg(unsigned char sampleNumber)||Returns the average of several conversion results.|
|unsigned long AD7193_TemperatureRead(void)||Read data from temperature sensor and converts it to Celsius degrees.|
|float AD7193_ConvertToVolts(unsigned long rawData, float vRef)||Converts 24-bit raw data to volts.|
This section contains a description of the steps required to run the AD7193 demonstration project on a Renesas RL78G13 platform.
A PmodAD5 has to be connected to the PMOD1 connector, pins 1 to 6 (see image below).
The reference project:
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.
This section contains a description of the steps required to run the AD7193 demonstration project on a Renesas RX62N platform.
A PmodAD5 has to be interfaced with the Renesas Demonstration Kit (RDK) for RX62N:
PmodAD5 Pin 1 (CS) → YRDKRX62N J8 connector Pin 15 PmodAD5 Pin 2 (MOSI) → YRDKRX62N J8 connector Pin 19 PmodAD5 Pin 3 (MISO) → YRDKRX62N J8 connector Pin 22 PmodAD5 Pin 4 (CLK) → YRDKRX62N J8 connector Pin 20 PmodAD5 Pin 5 (GND) → YRDKRX62N J8 connector Pin 4 PmodAD5 Pin 6 (VCC) → YRDKRX62N J8 connector Pin 3
The reference project:
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.