Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
LTC2482.h
Go to the documentation of this file.
1
/*!
2
LTC2482: 16-Bit Delta-Sigma ADC with Easy Drive Input Current Cancellation.
3
4
@verbatim
5
6
The LTC2480 is a 16-Bit Delta-Sigma ADC with Easy Drive Input Current Cancellation.
7
The LTC2482 allows a wide common mode input range (0V to VCC) independent of the
8
reference voltage. The reference can be as low as 100mV or can be tied directly to
9
VCC. The noise level is 600nV RMS independent of VREF . This allows direct
10
digitization of low level signals with 16-bit accuracy. The LTC2482 includes an on-chip
11
trimmed oscillator, eliminating the need for external crystals or oscillators and
12
provides 87dB rejection of 50Hz and 60Hz line frequency noise. Absolute accuracy and low
13
drift are automatically maintained through continuous, transparent, offset and
14
full-scale calibration.
15
16
Example Code:
17
18
Read ADC input.
19
20
LTC2482_read(LTC2482_CS, &adc_code); // Throws out last reading
21
LTC2482_read(LTC2482_CS, &adc_code); // Obtains the current reading and stores to adc_code variable
22
23
display_code = adc_code >> 4;
24
display_code = display_code & 0xFFFF;
25
26
// Convert adc_code to voltage
27
adc_voltage = LTC2482_code_to_voltage(display_code, vref);
28
29
@endverbatim
30
31
http://www.linear.com/product/LTC2482
32
33
http://www.linear.com/product/LTC2482#demoboards
34
35
36
Copyright 2018(c) Analog Devices, Inc.
37
38
All rights reserved.
39
40
Redistribution and use in source and binary forms, with or without
41
modification, are permitted provided that the following conditions are met:
42
- Redistributions of source code must retain the above copyright
43
notice, this list of conditions and the following disclaimer.
44
- Redistributions in binary form must reproduce the above copyright
45
notice, this list of conditions and the following disclaimer in
46
the documentation and/or other materials provided with the
47
distribution.
48
- Neither the name of Analog Devices, Inc. nor the names of its
49
contributors may be used to endorse or promote products derived
50
from this software without specific prior written permission.
51
- The use of this software may or may not infringe the patent rights
52
of one or more patent holders. This license does not release you
53
from the requirement that you obtain separate licenses from these
54
patent holders to use this software.
55
- Use of the software either in source or binary form, must be run
56
on or directly connected to an Analog Devices Inc. component.
57
58
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
59
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
60
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61
IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
62
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
63
LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
64
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
65
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
66
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
67
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68
*/
69
70
/*! @file
71
@ingroup LTC2482
72
Header for LTC2482: 16-Bit Delta-Sigma ADC with Easy Drive Input Current Cancellation.
73
*/
74
75
#ifndef LTC2482_H
76
#define LTC2482_H
77
78
//! Define the SPI CS pin
79
#ifndef LTC2482_CS
80
#define LTC2482_CS QUIKEVAL_CS
81
#endif
82
83
//! Reads the LTC2482 and returns 24-bit data
84
//! @return void
85
void
LTC2482_read
(uint8_t cs,
//!< Chip Select Pin
86
uint32_t *ptr_adc_code
//!< Returns code read from ADC (from previous conversion)
87
);
88
89
//! Calculates the LTC2482 input voltage given the binary data, reference voltage and input gain.
90
//! @return Floating point voltage
91
float
LTC2482_code_to_voltage
(uint32_t
adc_code
,
//!< Raw ADC code
92
float
vref
//!< Reference voltage
93
);
94
95
96
#endif // LTC2482_H
LTC2482_read
void LTC2482_read(uint8_t cs, uint32_t *ptr_adc_code)
Reads the LTC2482 and returns 24-bit data.
Definition:
LTC2482.cpp:72
vref
float vref
Definition:
LTC2492_Thermocouple_Meter.ino:129
adc_code
static uint32_t adc_code
Definition:
DC2071AA.ino:113
LTC2482_code_to_voltage
float LTC2482_code_to_voltage(uint32_t adc_code, float vref)
Calculates the LTC2482 input voltage given the binary data, reference voltage and input gain...
Definition:
LTC2482.cpp:84
LTSketchbook
libraries
LTC2482
LTC2482.h
Generated on Thu Mar 19 2020 10:59:26 for Linduino by
1.8.13