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:
Function | Description |
---|---|
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. |
float 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. |
HW Platform(s):
This section contains a description of the steps required to run the AD7193 demonstration project on a Digilent Cerebot MX3cK platform.
The AD7193 demonstration project for PIC32MX320F128H consists of three parts: the AD7193 Driver, the PmodAD5 Demo for PIC32MX320F128H and the PIC32MX320F128H Common Drivers.
All three parts have to be downloaded.
A PmodAD5 has to be connected to the JE connector of Cerebot MX3cK development board.
The following commands were implemented in this version of AD7193 reference project for Cerebot MX3cK board.
Command | Description |
---|---|
help? | Displays all available commands. |
reset! | Resets the AD7193. |
polarity? | Displays the polarity value. |
polarity= | Sets the polarity value. Accepted values: 0 - Bipolar mode. 1 - Unipolar mode. |
range? | Displays the range value. |
range= | Sets the range value. Accepted values: 0 - Gain=1. (Input voltage range must be +/-2500mV) 3 - Gain=8. (Input voltage range must be +/-312.5mV) 4 - Gain=16. (Input voltage range must be +/-156.2mV) 5 - Gain=32. (Input voltage range must be +/-78.12mV) 6 - Gain=64. (Input voltage range must be +/-39.06mV) 7 - Gain=128.(Input voltage range must be +/-19.53mV) |
pseudoBit? | Displays the Pseudo Bit value (AD7193_REG_CONF). |
pseudoBit= | Sets the Pseudo Bit Value (AD7193_REG_CONF). Accepted values: 0 - Disables the pseudo differential measuring. 1 - Enables the pseudo differential measuring. |
register? | Displays the value of the data register (AD7193_REG_DATA) for specified channel. Accepted values: 0..7 - selected channel. |
voltage? | Displays the voltage applied to specified channel. Accepted values: 0..7 - selected channel. |
temperature? | Displays the temperature. |
Commands can be executed using a serial terminal connected to the UART1 peripheral of PIC32MX320F128H.
The following image shows a generic list of commands in a serial terminal connected to processor’s UART peripheral.
This section presents the steps for developing a software application that will run on the Digilent Cerebot MX3cK development board 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 Digilent Cerebot MC7 platform.
Following commands were implemented in this version of AD7193 reference project for Cerebot MC7 board.
Command | Description |
---|---|
help? | Displays all available commands. |
reset= | Resets the AD7193. |
mode? | Displays the selected operating mode. |
mode= | Selects the AD7193's operating mode. Accepted values: 0 - 3. |
pseudo? | Displays the Pseudo Bit value (AD7193_REG_CONF). |
pseudo= | Sets the Pseudo Bit Value (AD7193_REG_CONF). Accepted values: 0, 1. |
channel? | Displays the enabled channel. |
channel= | Enables one channel on the AD7193. Accepted values: 0 – 7. |
data? | Initiates a conversion and displays the value of the data register (AD7193_REG_DATA). |
voltage? | Initiates a conversion and displays the voltage applied to enabled channel. |
temperature? | Displays the temperature. |
Commands can be executed using a serial terminal connected to the UART1 peripheral of dsPIC33FJ128MC706A.
The following image shows a list of commands in a serial terminal connected to processor’s UART peripheral.
This section presents the steps for developing a software application that will run on the Digilent Cerebot MC7 development board for controlling and monitoring the operation of the ADI part.
This section contains a description of the steps required to run the AD7193 chipKIT demonstration project on a Digilent Cerebot MX3cK platform.
Following commands were implemented in this version of AD7193 chipKIT reference project for Cerebot MX3cK board.
Command | Description |
---|---|
help? | Displays all available commands. |
reset= | Resets the AD7193. |
mode? | Displays the selected operating mode. |
mode= | Selects the AD7193's operating mode. Accepted values: 0 - 3. |
pseudo? | Displays the Pseudo Bit value (AD7193_REG_CONF). |
pseudo= | Sets the Pseudo Bit Value (AD7193_REG_CONF). Accepted values: 0, 1. |
channel? | Displays the enabled channel. |
channel= | Enables one channel on the AD7193. Accepted values: 0 – 7. |
data? | Initiates a conversion and displays the value of the data register (AD7193_REG_DATA). |
voltage? | Initiates a conversion and displays the voltage applied to enabled channel. |
temperature? | Displays the temperature. |
Commands can be executed using the serial monitor.
Carriage return has to be selected as a line ending character. The required baud rate is 9600 baud.
The following image shows a list of commands in the serial monitor.
This section presents the steps for developing a chipKIT application that will run on the Digilent Cerebot MX3cK development board for controlling and monitoring the operation of the ADI part.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !