precision-converters-firmware
ad7124_regs_configs.h
Go to the documentation of this file.
1 /***************************************************************************//*
2  * @file ad7124_reg_app_config.h
3  * @brief Register configurations global defines
4  * @details
5 ******************************************************************************
6  * Copyright (c) 2021 Analog Devices, Inc. All Rights Reserved.
7  *
8  * This software is proprietary to Analog Devices, Inc. and its licensors.
9  * By using this software you agree to the terms of the associated
10  * Analog Devices Software License Agreement.
11 ******************************************************************************/
12 
13 #ifndef AD7124_REGS_CONFIGS_H_
14 #define AD7124_REGS_CONFIGS_H_
15 
16 /******************************************************************************/
17 /***************************** Include Files **********************************/
18 /******************************************************************************/
19 
20 #include "app_config.h"
21 #include "ad7124.h"
22 
23 /******************************************************************************/
24 /********************* Macros and Constants Definitions ***********************/
25 /******************************************************************************/
26 
27 /* 2-wire RTD configurations */
28 #define RTD1_2WIRE_IOUT0 0 // AIN0
29 #define RTD2_2WIRE_IOUT0 1 // AIN1
30 #define RTD3_2WIRE_IOUT0 8 // AIN8
31 #define RTD4_2WIRE_IOUT0 11 // AIN11
32 #define RTD5_2WIRE_IOUT0 14 // AIN14
33 
34 #define RTD1_2WIRE_AINP 2 // AIN2
35 #define RTD2_2WIRE_AINP 4 // AIN4
36 #define RTD3_2WIRE_AINP 6 // AIN6
37 #define RTD4_2WIRE_AINP 9 // AIN9
38 #define RTD5_2WIRE_AINP 12 // AIN12
39 
40 #define RTD1_2WIRE_AINM 3 // AIN3
41 #define RTD2_2WIRE_AINM 5 // AIN5
42 #define RTD3_2WIRE_AINM 7 // AIN7
43 #define RTD4_2WIRE_AINM 10 // AIN10
44 #define RTD5_2WIRE_AINM 13 // AIN13
45 
46 #define RTD_2WIRE_GAIN_VALUE 4 // Gain=16
47 
48 /* 3-wire RTD configurations */
49 #define RTD1_3WIRE_IOUT0 0 // AIN0
50 #define RTD2_3WIRE_IOUT0 6 // AIN6
51 #define RTD3_3WIRE_IOUT0 10 // AIN10
52 #define RTD4_3WIRE_IOUT0 14 // AIN14
53 
54 #define RTD1_3WIRE_IOUT1 1 // AIN1
55 #define RTD2_3WIRE_IOUT1 7 // AIN7
56 #define RTD3_3WIRE_IOUT1 11 // AIN11
57 #define RTD4_3WIRE_IOUT1 15 // AIN15
58 
59 #define RTD1_3WIRE_AINP 2 // AIN2
60 #define RTD2_3WIRE_AINP 4 // AIN4
61 #define RTD3_3WIRE_AINP 8 // AIN8
62 #define RTD4_3WIRE_AINP 12 // AIN12
63 
64 #define RTD1_3WIRE_AINM 3 // AIN3
65 #define RTD2_3WIRE_AINM 5 // AIN5
66 #define RTD3_3WIRE_AINM 9 // AIN9
67 #define RTD4_3WIRE_AINM 13 // AIN13
68 
69 #define SINGLE_3WIRE_RTD_GAIN 4 // Gain=16
70 #define MULTI_3WIRE_RTD_GAIN 5 // Gain=32
71 #define RTD_3WIRE_EXC_MEASURE_GAIN 0 // Gain=1
72 
73 /* 3-wire RTD excitation current measurement inputs (for calibration) */
74 #if defined(AD7124_8)
75 #define RTD_3WIRE_EXC_MEASURE_AINP 14 // AIN14
76 #define RTD_3WIRE_EXC_MEASURE_AINM 15 // AIN15
77 #else
78 #define RTD_3WIRE_EXC_MEASURE_AINP 6 // AIN6
79 #define RTD_3WIRE_EXC_MEASURE_AINM 7 // AIN7
80 #endif
81 
82 /* 4-wire RTD configurations */
83 #define RTD1_4WIRE_IOUT0 0 // AIN0
84 #define RTD2_4WIRE_IOUT0 1 // AIN1
85 #define RTD3_4WIRE_IOUT0 8 // AIN8
86 #define RTD4_4WIRE_IOUT0 11 // AIN11
87 #define RTD5_4WIRE_IOUT0 14 // AIN14
88 
89 #define RTD1_4WIRE_AINP 2 // AIN2
90 #define RTD2_4WIRE_AINP 4 // AIN4
91 #define RTD3_4WIRE_AINP 6 // AIN6
92 #define RTD4_4WIRE_AINP 9 // AIN9
93 #define RTD5_4WIRE_AINP 12 // AIN12
94 
95 #define RTD1_4WIRE_AINM 3 // AIN3
96 #define RTD2_4WIRE_AINM 5 // AIN5
97 #define RTD3_4WIRE_AINM 7 // AIN7
98 #define RTD4_4WIRE_AINM 10 // AIN10
99 #define RTD5_4WIRE_AINM 13 // AIN13
100 
101 #define RTD_4WIRE_GAIN_VALUE 4 // Gain=16
102 
103 /* RTD common configurations */
104 #define RTD_IOUT0_500UA_EXC 4 // 500uA IOUT0 excitation current
105 #define RTD_IOUT1_500UA_EXC 4 // 500uA IOUT1 excitation current
106 #define RTD_IOUT0_250UA_EXC 3 // 250uA IOUT0 excitation current
107 #define RTD_IOUT1_250UA_EXC 3 // 250uA IOUT1 excitation current
108 #define RTD_IOUT_EXC_OFF 0 // Excitation current is off
109 
110 
111 /* NTC Thermistor configurations */
112 #define NTC1_THERMISTOR_AINP 0 // AIN0
113 #define NTC2_THERMISTOR_AINP 2 // AIN2
114 #define NTC3_THERMISTOR_AINP 4 // AIN4
115 #define NTC4_THERMISTOR_AINP 6 // AIN6
116 #define NTC5_THERMISTOR_AINP 8 // AIN8
117 #define NTC6_THERMISTOR_AINP 10 // AIN10
118 #define NTC7_THERMISTOR_AINP 12 // AIN12
119 #define NTC8_THERMISTOR_AINP 14 // AIN14
120 
121 #define NTC1_THERMISTOR_AINM 1 // AIN1
122 #define NTC2_THERMISTOR_AINM 3 // AIN3
123 #define NTC3_THERMISTOR_AINM 5 // AIN5
124 #define NTC4_THERMISTOR_AINM 7 // AIN7
125 #define NTC5_THERMISTOR_AINM 9 // AIN9
126 #define NTC6_THERMISTOR_AINM 11 // AIN11
127 #define NTC7_THERMISTOR_AINM 13 // AIN13
128 #define NTC8_THERMISTOR_AINM 15 // AIN15
129 
130 /* NTC Thermistor common configurations */
131 #define THERMISTOR_GAIN_VALUE 0 // Gain=1
132 
133 
134 /* Thermocouple configurations */
135 #define THERMOCOUPLE1_AINP 2 // AIN2
136 #define THERMOCOUPLE2_AINP 6 // AIN6
137 #define THERMOCOUPLE3_AINP 8 // AIN8
138 #define THERMOCOUPLE4_AINP 10 // AIN10
139 #define THERMOCOUPLE5_AINP 12 // AIN12
140 #define THERMOCOUPLE6_AINP 14 // AIN14
141 
142 #define THERMOCOUPLE1_AINM 3 // AIN3
143 #define THERMOCOUPLE2_AINM 7 // AIN7
144 #define THERMOCOUPLE3_AINM 9 // AIN9
145 #define THERMOCOUPLE4_AINM 11 // AIN11
146 #define THERMOCOUPLE5_AINM 13 // AIN13
147 #define THERMOCOUPLE6_AINM 15 // AIN15
148 
149 /* Thermocouple common configurations */
150 #define THERMOCOUPLE_GAIN_VALUE 7 // Gain=128
151 
152 /* Cold Junction configurations for thermocouple compensation */
153 /* Note: RTD to be used is either 2-wire or 4-wire */
154 #define CJC_RTD_AINP 4 // AIN4
155 #define CJC_RTD_AINM 5 // AIN5
156 #define CJC_RTD_IOUT0 1 // AIN1
157 #define CJC_RTD_IOUT0_EXC RTD_IOUT0_500UA_EXC // 500uA
158 
159 #define CJC_PTC_THERMISTOR_AINP 4 // AIN4
160 #define CJC_PTC_THERMISTOR_AINM 5 // AIN5
161 #define CJC_PTC_THERMISTOR_IOUT0 1 // AIN1
162 #define CJC_PTC_THERMISTOR_IOUT0_EXC 4 // 500uA
163 
164 #define RTD_PT1000_GAIN_VALUE 0 // Gain=1
165 
166 
167 /* ADC internal calibration configurations */
168 #define ADC_CALIBRATION_GAIN 1 // Gain = 2
169 #define ADC_CALIBRATION_PWR_MODE 0 // Low power mode
170 #define ADC_CALIBRATION_REF_SRC 2 // Internal Vref
171 
172 /* CJC sensor types supported for thermocouple measurement */
173 typedef enum {
179 
180 /******************************************************************************/
181 /********************** Public/Extern Declarations ****************************/
182 /******************************************************************************/
183 
184 /*
185  * Arrays holding the info for the AD7124 registers - address, initial value,
186  * size and access type.
187  */
188 extern const struct ad7124_st_reg ad7124_regs_config_2wire_rtd[AD7124_REG_NO];
189 extern const struct ad7124_st_reg ad7124_regs_config_3wire_rtd[AD7124_REG_NO];
190 extern const struct ad7124_st_reg ad7124_regs_config_4wire_rtd[AD7124_REG_NO];
191 extern const struct ad7124_st_reg ad7124_regs_config_thermistor[AD7124_REG_NO];
192 extern const struct ad7124_st_reg
193  ad7124_regs_config_thermocouple[AD7124_REG_NO];
194 
195 #endif /* AD7124_REGS_CONFIGS_H_ */
cjc_sensor_type
Definition: ad7124_regs_configs.h:173
@ THERMISTOR_PTC_KY81_110
Definition: ad7124_regs_configs.h:175
@ NUM_OF_CJC_SENSORS
Definition: ad7124_regs_configs.h:177
@ PT100_4WIRE_RTD
Definition: ad7124_regs_configs.h:174
@ PT1000_2WIRE_RTD
Definition: ad7124_regs_configs.h:176
const struct ad7124_st_reg ad7124_regs_config_thermistor[AD7124_REG_NO]
Definition: ad7124_regs_config_thermistor.c:24
const struct ad7124_st_reg ad7124_regs_config_3wire_rtd[AD7124_REG_NO]
Definition: ad7124_regs_config_rtd.c:143
const struct ad7124_st_reg ad7124_regs_config_2wire_rtd[AD7124_REG_NO]
Definition: ad7124_regs_config_rtd.c:25
const struct ad7124_st_reg ad7124_regs_config_4wire_rtd[AD7124_REG_NO]
Definition: ad7124_regs_config_rtd.c:274
const struct ad7124_st_reg ad7124_regs_config_thermocouple[AD7124_REG_NO]
Definition: ad7124_regs_config_thermocouple.c:24
Configuration file of nanodac firmware example program.