(Working) Code to interface 3 LoadCells to ADISense1000 and display values using the Labview code.
Fork of 4Bridge_ADISense1000_Example_copy by
sensor2_bridge-6w-pressure_config.c@2:2f9f9f7f0243, 2018-07-19 (annotated)
- Committer:
- RGurav
- Date:
- Thu Jul 19 13:25:33 2018 +0000
- Revision:
- 2:2f9f9f7f0243
- Child:
- 3:83d10123d1cd
(Working); Code to read values from bridge load cell
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RGurav | 2:2f9f9f7f0243 | 1 | /* |
RGurav | 2:2f9f9f7f0243 | 2 | Copyright 2017 (c) Analog Devices, Inc. |
RGurav | 2:2f9f9f7f0243 | 3 | |
RGurav | 2:2f9f9f7f0243 | 4 | All rights reserved. |
RGurav | 2:2f9f9f7f0243 | 5 | |
RGurav | 2:2f9f9f7f0243 | 6 | Redistribution and use in source and binary forms, with or without |
RGurav | 2:2f9f9f7f0243 | 7 | modification, are permitted provided that the following conditions are met: |
RGurav | 2:2f9f9f7f0243 | 8 | - Redistributions of source code must retain the above copyright |
RGurav | 2:2f9f9f7f0243 | 9 | notice, this list of conditions and the following disclaimer. |
RGurav | 2:2f9f9f7f0243 | 10 | - Redistributions in binary form must reproduce the above copyright |
RGurav | 2:2f9f9f7f0243 | 11 | notice, this list of conditions and the following disclaimer in |
RGurav | 2:2f9f9f7f0243 | 12 | the documentation and/or other materials provided with the |
RGurav | 2:2f9f9f7f0243 | 13 | distribution. |
RGurav | 2:2f9f9f7f0243 | 14 | - Neither the name of Analog Devices, Inc. nor the names of its |
RGurav | 2:2f9f9f7f0243 | 15 | contributors may be used to endorse or promote products derived |
RGurav | 2:2f9f9f7f0243 | 16 | from this software without specific prior written permission. |
RGurav | 2:2f9f9f7f0243 | 17 | - The use of this software may or may not infringe the patent rights |
RGurav | 2:2f9f9f7f0243 | 18 | of one or more patent holders. This license does not release you |
RGurav | 2:2f9f9f7f0243 | 19 | from the requirement that you obtain separate licenses from these |
RGurav | 2:2f9f9f7f0243 | 20 | patent holders to use this software. |
RGurav | 2:2f9f9f7f0243 | 21 | - Use of the software either in source or binary form, must be run |
RGurav | 2:2f9f9f7f0243 | 22 | on or directly connected to an Analog Devices Inc. component. |
RGurav | 2:2f9f9f7f0243 | 23 | |
RGurav | 2:2f9f9f7f0243 | 24 | THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR |
RGurav | 2:2f9f9f7f0243 | 25 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, |
RGurav | 2:2f9f9f7f0243 | 26 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
RGurav | 2:2f9f9f7f0243 | 27 | IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, |
RGurav | 2:2f9f9f7f0243 | 28 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
RGurav | 2:2f9f9f7f0243 | 29 | LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR |
RGurav | 2:2f9f9f7f0243 | 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
RGurav | 2:2f9f9f7f0243 | 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
RGurav | 2:2f9f9f7f0243 | 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
RGurav | 2:2f9f9f7f0243 | 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
RGurav | 2:2f9f9f7f0243 | 34 | * |
RGurav | 2:2f9f9f7f0243 | 35 | *****************************************************************************/ |
RGurav | 2:2f9f9f7f0243 | 36 | |
RGurav | 2:2f9f9f7f0243 | 37 | /*! |
RGurav | 2:2f9f9f7f0243 | 38 | ****************************************************************************** |
RGurav | 2:2f9f9f7f0243 | 39 | * @file: |
RGurav | 2:2f9f9f7f0243 | 40 | * @brief: |
RGurav | 2:2f9f9f7f0243 | 41 | *----------------------------------------------------------------------------- |
RGurav | 2:2f9f9f7f0243 | 42 | */ |
RGurav | 2:2f9f9f7f0243 | 43 | #include "adi_sense_config_types.h" |
RGurav | 2:2f9f9f7f0243 | 44 | |
RGurav | 2:2f9f9f7f0243 | 45 | ADI_SENSE_CONFIG sensor2_bridge_6w_pressure_config = { |
RGurav | 2:2f9f9f7f0243 | 46 | .versionId = { .major = 1, .minor = 4 }, |
RGurav | 2:2f9f9f7f0243 | 47 | .productId = ADI_SENSE_PRODUCT_ID_1000, |
RGurav | 2:2f9f9f7f0243 | 48 | .adisense1000 = { |
RGurav | 2:2f9f9f7f0243 | 49 | .power = { |
RGurav | 2:2f9f9f7f0243 | 50 | .powerMode = ADI_SENSE_1000_POWER_MODE_FULL, |
RGurav | 2:2f9f9f7f0243 | 51 | }, |
RGurav | 2:2f9f9f7f0243 | 52 | .measurement = { |
RGurav | 2:2f9f9f7f0243 | 53 | .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS, |
RGurav | 2:2f9f9f7f0243 | 54 | .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE, |
RGurav | 2:2f9f9f7f0243 | 55 | }, |
RGurav | 2:2f9f9f7f0243 | 56 | .channels = { |
RGurav | 2:2f9f9f7f0243 | 57 | [ADI_SENSE_1000_CHANNEL_ID_SENSOR_2] = { |
RGurav | 2:2f9f9f7f0243 | 58 | .enableChannel = true, |
RGurav | 2:2f9f9f7f0243 | 59 | .disablePublishing = false, |
RGurav | 2:2f9f9f7f0243 | 60 | .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, |
RGurav | 2:2f9f9f7f0243 | 61 | .measurementsPerCycle = 1, |
RGurav | 2:2f9f9f7f0243 | 62 | .extraSettlingTime = 20000, |
RGurav | 2:2f9f9f7f0243 | 63 | .adcChannelConfig = { |
RGurav | 2:2f9f9f7f0243 | 64 | .sensor = ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_2_DEF_L2, |
RGurav | 2:2f9f9f7f0243 | 65 | .gain = ADI_SENSE_1000_ADC_GAIN_1X, |
RGurav | 2:2f9f9f7f0243 | 66 | .filter = { |
RGurav | 2:2f9f9f7f0243 | 67 | .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, |
RGurav | 2:2f9f9f7f0243 | 68 | }, |
RGurav | 2:2f9f9f7f0243 | 69 | .reference = { |
RGurav | 2:2f9f9f7f0243 | 70 | .type = ADI_SENSE_1000_ADC_REFERENCE_BRIDGE_EXCITATION, |
RGurav | 2:2f9f9f7f0243 | 71 | .disableBuffer = false, |
RGurav | 2:2f9f9f7f0243 | 72 | }, |
RGurav | 2:2f9f9f7f0243 | 73 | .enableVbias = false, |
RGurav | 2:2f9f9f7f0243 | 74 | }, |
RGurav | 2:2f9f9f7f0243 | 75 | }, |
RGurav | 2:2f9f9f7f0243 | 76 | }, |
RGurav | 2:2f9f9f7f0243 | 77 | }, |
RGurav | 2:2f9f9f7f0243 | 78 | }; |
RGurav | 2:2f9f9f7f0243 | 79 |