This is a simple program to read temp reading using 2 wire RTD sensor with the measureware kit.

Fork of ADISense1000_Example_FW by Analog Devices

Committer:
RGurav
Date:
Wed Jul 18 11:40:48 2018 +0000
Revision:
1:ae66eccef75f
connect 2 wire RTD to CJC_0 and read data using Tera

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RGurav 1:ae66eccef75f 1 /*!
RGurav 1:ae66eccef75f 2 ******************************************************************************
RGurav 1:ae66eccef75f 3 * @file: config.c
RGurav 1:ae66eccef75f 4 * @brief:
RGurav 1:ae66eccef75f 5 *-----------------------------------------------------------------------------
RGurav 1:ae66eccef75f 6 *
RGurav 1:ae66eccef75f 7 Copyright (c) 2018 Analog Devices, Inc.
RGurav 1:ae66eccef75f 8
RGurav 1:ae66eccef75f 9 All rights reserved.
RGurav 1:ae66eccef75f 10
RGurav 1:ae66eccef75f 11 Redistribution and use in source and binary forms, with or without modification,
RGurav 1:ae66eccef75f 12 are permitted provided that the following conditions are met:
RGurav 1:ae66eccef75f 13 - Redistributions of source code must retain the above copyright notice,
RGurav 1:ae66eccef75f 14 this list of conditions and the following disclaimer.
RGurav 1:ae66eccef75f 15 - Redistributions in binary form must reproduce the above copyright notice,
RGurav 1:ae66eccef75f 16 this list of conditions and the following disclaimer in the documentation
RGurav 1:ae66eccef75f 17 and/or other materials provided with the distribution.
RGurav 1:ae66eccef75f 18 - Modified versions of the software must be conspicuously marked as such.
RGurav 1:ae66eccef75f 19 - This software is licensed solely and exclusively for use with processors
RGurav 1:ae66eccef75f 20 manufactured by or for Analog Devices, Inc.
RGurav 1:ae66eccef75f 21 - This software may not be combined or merged with other code in any manner
RGurav 1:ae66eccef75f 22 that would cause the software to become subject to terms and conditions
RGurav 1:ae66eccef75f 23 which differ from those listed here.
RGurav 1:ae66eccef75f 24 - Neither the name of Analog Devices, Inc. nor the names of its
RGurav 1:ae66eccef75f 25 contributors may be used to endorse or promote products derived
RGurav 1:ae66eccef75f 26 from this software without specific prior written permission.
RGurav 1:ae66eccef75f 27 - The use of this software may or may not infringe the patent rights of one
RGurav 1:ae66eccef75f 28 or more patent holders. This license does not release you from the
RGurav 1:ae66eccef75f 29 requirement that you obtain separate licenses from these patent holders
RGurav 1:ae66eccef75f 30 to use this software.
RGurav 1:ae66eccef75f 31
RGurav 1:ae66eccef75f 32 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. AND CONTRIBUTORS "AS IS" AND ANY
RGurav 1:ae66eccef75f 33 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
RGurav 1:ae66eccef75f 34 TITLE, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
RGurav 1:ae66eccef75f 35 NO EVENT SHALL ANALOG DEVICES, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
RGurav 1:ae66eccef75f 36 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR CONSEQUENTIAL DAMAGES
RGurav 1:ae66eccef75f 37 (INCLUDING, BUT NOT LIMITED TO, DAMAGES ARISING OUT OF CLAIMS OF INTELLECTUAL
RGurav 1:ae66eccef75f 38 PROPERTY RIGHTS INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
RGurav 1:ae66eccef75f 39 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
RGurav 1:ae66eccef75f 40 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
RGurav 1:ae66eccef75f 41 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
RGurav 1:ae66eccef75f 42 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RGurav 1:ae66eccef75f 43 *
RGurav 1:ae66eccef75f 44 *****************************************************************************/
RGurav 1:ae66eccef75f 45
RGurav 1:ae66eccef75f 46 #include "inc/adi_sense_config_types.h"
RGurav 1:ae66eccef75f 47
RGurav 1:ae66eccef75f 48 ADI_SENSE_CONFIG config =
RGurav 1:ae66eccef75f 49 {
RGurav 1:ae66eccef75f 50 .versionId = { .major = 1, .minor = 4 },
RGurav 1:ae66eccef75f 51 .productId = ADI_SENSE_PRODUCT_ID_1000,
RGurav 1:ae66eccef75f 52 .adisense1000 =
RGurav 1:ae66eccef75f 53 {
RGurav 1:ae66eccef75f 54 .power =
RGurav 1:ae66eccef75f 55 {
RGurav 1:ae66eccef75f 56 .powerMode = ADI_SENSE_1000_POWER_MODE_FULL,
RGurav 1:ae66eccef75f 57 .supplyVoltage = 3.3,
RGurav 1:ae66eccef75f 58 },
RGurav 1:ae66eccef75f 59 .measurement =
RGurav 1:ae66eccef75f 60 {
RGurav 1:ae66eccef75f 61 .operatingMode = ADI_SENSE_1000_OPERATING_MODE_CONTINUOUS,
RGurav 1:ae66eccef75f 62 .dataReadyMode = ADI_SENSE_1000_DATAREADY_PER_CYCLE,
RGurav 1:ae66eccef75f 63 .cycleInterval = 0,
RGurav 1:ae66eccef75f 64 },
RGurav 1:ae66eccef75f 65 .channels =
RGurav 1:ae66eccef75f 66 {
RGurav 1:ae66eccef75f 67 [ADI_SENSE_1000_CHANNEL_ID_CJC_0] =
RGurav 1:ae66eccef75f 68 {
RGurav 1:ae66eccef75f 69 .enableChannel = true,
RGurav 1:ae66eccef75f 70 .disablePublishing = false,
RGurav 1:ae66eccef75f 71 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
RGurav 1:ae66eccef75f 72 .measurementsPerCycle = 1,
RGurav 1:ae66eccef75f 73 .extraSettlingTime = 0.0000,
RGurav 1:ae66eccef75f 74 .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS,
RGurav 1:ae66eccef75f 75 .adcChannelConfig =
RGurav 1:ae66eccef75f 76 {
RGurav 1:ae66eccef75f 77 .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1,
RGurav 1:ae66eccef75f 78 .gain = ADI_SENSE_1000_ADC_GAIN_32X,
RGurav 1:ae66eccef75f 79 .current =
RGurav 1:ae66eccef75f 80 {
RGurav 1:ae66eccef75f 81 .outputLevel = ADI_SENSE_1000_ADC_EXC_CURRENT_500uA,
RGurav 1:ae66eccef75f 82 .swapOption = ADI_SENSE_1000_ADC_EXC_CURRENT_SWAP_NONE,
RGurav 1:ae66eccef75f 83 },
RGurav 1:ae66eccef75f 84 .filter =
RGurav 1:ae66eccef75f 85 {
RGurav 1:ae66eccef75f 86 .type = ADI_SENSE_1000_ADC_FILTER_SINC4,
RGurav 1:ae66eccef75f 87 .fs = 2047,
RGurav 1:ae66eccef75f 88 },
RGurav 1:ae66eccef75f 89 .reference =
RGurav 1:ae66eccef75f 90 {
RGurav 1:ae66eccef75f 91 .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1,
RGurav 1:ae66eccef75f 92 .disableBuffer = false,
RGurav 1:ae66eccef75f 93 },
RGurav 1:ae66eccef75f 94 .enableVbias = false,
RGurav 1:ae66eccef75f 95 },
RGurav 1:ae66eccef75f 96 },
RGurav 1:ae66eccef75f 97
RGurav 1:ae66eccef75f 98 },
RGurav 1:ae66eccef75f 99 },
RGurav 1:ae66eccef75f 100 };
RGurav 1:ae66eccef75f 101