Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
AD7190.h File Reference
Header file of AD7190 Driver. More...
Go to the source code of this file.
Functions | |
| void | AD7190_SetRegisterValue (unsigned char registerAddress, unsigned long registerValue, unsigned char bytesNumber) |
| Writes data into a register. | |
| unsigned long | AD7190_GetRegisterValue (unsigned char registerAddress, unsigned char bytesNumber) |
| Reads the value of a register. | |
| unsigned char | AD7190_Init (unsigned int speed) |
| Checks if the AD7190 part is present. | |
| void | AD7190_Reset (void) |
| Resets the device. | |
| void | AD7190_SetPower (unsigned char pwrMode) |
| Set device to idle or power-down. | |
| void | AD7190_WaitRdyGoLow (void) |
| Waits for RDY pin to go low. | |
| void | AD7190_ChannelSelect (unsigned short channel) |
| Selects the channel to be enabled. | |
| void | AD7190_Calibrate (unsigned char mode, unsigned char channel) |
| Performs the given calibration to the specified channel. | |
| void | AD7190_RangeSetup (unsigned char polarity, unsigned char range) |
| Selects the polarity of the conversion and the ADC input range. | |
| unsigned long | AD7190_SingleConversion (void) |
| Returns the result of a single conversion. | |
| unsigned long | AD7190_ContinuousReadAvg (unsigned char sampleNumber) |
| Returns the average of several conversion results. | |
| unsigned long | AD7190_TemperatureRead (void) |
| Read data from temperature sensor and converts it to Celsius degrees. | |
Detailed Description
Header file of AD7190 Driver.
Copyright 2012(c) Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SVN Revision: 903
Definition in file AD7190.h.
Function Documentation
| void AD7190_Calibrate | ( | unsigned char | mode, |
| unsigned char | channel | ||
| ) |
Performs the given calibration to the specified channel.
- Parameters:
-
mode - Calibration type. channel - Channel to be calibrated.
- Returns:
- none.
Definition at line 211 of file AD7190.cpp.
| void AD7190_ChannelSelect | ( | unsigned short | channel ) |
Selects the channel to be enabled.
- Parameters:
-
channel - Selects a channel.
- Returns:
- none.
Definition at line 192 of file AD7190.cpp.
| unsigned long AD7190_ContinuousReadAvg | ( | unsigned char | sampleNumber ) |
Returns the average of several conversion results.
- Returns:
- samplesAverage - The average of the conversion results.
Definition at line 279 of file AD7190.cpp.
| unsigned long AD7190_GetRegisterValue | ( | unsigned char | registerAddress, |
| unsigned char | bytesNumber | ||
| ) |
Reads the value of a register.
- Parameters:
-
registerAddress - Address of the register. bytesNumber - Number of bytes that will be read.
- Returns:
- buffer - Value of the register.
Definition at line 85 of file AD7190.cpp.
| unsigned char AD7190_Init | ( | unsigned int | speed ) |
Checks if the AD7190 part is present.
- Returns:
- status - Indicates if the part is present or not. 1 for ok , 0 for error
Definition at line 109 of file AD7190.cpp.
| void AD7190_RangeSetup | ( | unsigned char | polarity, |
| unsigned char | range | ||
| ) |
Selects the polarity of the conversion and the ADC input range.
- Parameters:
-
polarity - Polarity select bit. Example: 0 - bipolar operation is selected. 1 - unipolar operation is selected. range - Gain select bits. These bits are written by the user to select the ADC input range.
- Returns:
- none.
Definition at line 237 of file AD7190.cpp.
| void AD7190_Reset | ( | void | ) |
| void AD7190_SetPower | ( | unsigned char | pwrMode ) |
Set device to idle or power-down.
- Parameters:
-
pwrMode - Selects idle mode or power-down mode. Example: 0 - power-down 1 - idle
- Returns:
- none.
Definition at line 159 of file AD7190.cpp.
| void AD7190_SetRegisterValue | ( | unsigned char | registerAddress, |
| unsigned long | registerValue, | ||
| unsigned char | bytesNumber | ||
| ) |
Writes data into a register.
- Parameters:
-
registerAddress - Address of the register. registerValue - Data value to write. bytesNumber - Number of bytes to be written.
- Returns:
- none.
Definition at line 58 of file AD7190.cpp.
| unsigned long AD7190_SingleConversion | ( | void | ) |
Returns the result of a single conversion.
- Returns:
- regData - Result of a single analog-to-digital conversion.
Definition at line 256 of file AD7190.cpp.
| unsigned long AD7190_TemperatureRead | ( | void | ) |
Read data from temperature sensor and converts it to Celsius degrees.
- Returns:
- temperature - Celsius degrees.
Definition at line 306 of file AD7190.cpp.
| void AD7190_WaitRdyGoLow | ( | void | ) |
Waits for RDY pin to go low.
timeOutCnt related to CPU clock
- Returns:
- none.
Definition at line 177 of file AD7190.cpp.
Generated on Sun Jul 17 2022 14:10:57 by
1.7.2