Example program for EVAL-AD4130
Dependencies: tempsensors sdp_k1_sdram
ad4130_thermocouple_config.c
00001 /*************************************************************************//** 00002 * @file ad4130_thermocouple_config.c 00003 * @brief Thermocouple user configurations file for AD4130 device 00004 ****************************************************************************** 00005 * Copyright (c) 2022 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *****************************************************************************/ 00012 00013 /******************************************************************************/ 00014 /***************************** Include Files **********************************/ 00015 /******************************************************************************/ 00016 00017 #include "app_config.h" 00018 00019 /******************************************************************************/ 00020 /********************** Macros and Constants Definition ***********************/ 00021 /******************************************************************************/ 00022 00023 /******************************************************************************/ 00024 /********************** Variables and User Defined Data Types *****************/ 00025 /******************************************************************************/ 00026 00027 /* AD4130 device initialization parameters */ 00028 struct ad413x_init_param ad4130_thermocouple_config_params = { 00029 .spi_init = &spi_init_params, 00030 00031 /* Setup (Preset) Configurations */ 00032 .preset = { 00033 // Setup 0 (Chn0) 00034 { 00035 .ref_buf = { 00036 .ref_buf_p_en = true, 00037 .ref_buf_m_en = true, 00038 }, 00039 .ref_sel = AD413X_REFOUT_AVSS, 00040 .gain = AD413X_GAIN_128, 00041 .filter = AD4130_FILTER_TYPE, 00042 .s_time = AD413X_32_MCLK 00043 }, 00044 // Setup 1 (Chn1) 00045 { 00046 .ref_buf = { 00047 .ref_buf_p_en = true, 00048 .ref_buf_m_en = true, 00049 }, 00050 #if defined(USE_CJC_AS_RTD) 00051 .ref_sel = AD413X_REFIN1, 00052 .iout0_exc_current = AD413X_EXC_200UA, 00053 #else 00054 .ref_sel = AD413X_REFOUT_AVSS, 00055 #endif 00056 .gain = AD413X_GAIN_1, 00057 .filter = AD4130_FILTER_TYPE, 00058 .s_time = AD413X_32_MCLK 00059 }, 00060 }, 00061 00062 /* Chnnel Configurations */ 00063 .ch = { 00064 // Chn0 (TC) 00065 { 00066 .preset = AD413X_PRESET_0, 00067 .enable = 1, 00068 .ain_p = AD413X_AIN2, 00069 .ain_m = AD413X_AIN3 00070 }, 00071 // Chn1 (CJC) 00072 { 00073 .preset = AD413X_PRESET_1, 00074 .enable = 1, 00075 .ain_p = AD413X_AIN4, 00076 .ain_m = AD413X_AIN5, 00077 #if defined(USE_CJC_AS_RTD) 00078 .iout0_exc_input = AD413X_AIN0, 00079 #endif 00080 }, 00081 }, 00082 00083 .chip_id = AD4130_8, 00084 .mclk = AD413X_INT_76_8_KHZ_OUT_OFF, 00085 .bipolar = true, 00086 .int_ref = AD413X_INTREF_1_25V, 00087 .standby_ctrl = { 00088 .standby_int_ref_en = true, 00089 .standby_vbias_en = true 00090 }, 00091 .v_bias = NO_OS_BIT(2), // V_Bias on AIN2 00092 .data_stat = 0, 00093 .spi_crc_en = 0 00094 };
Generated on Wed Jul 20 2022 12:42:25 by 1.7.2