Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: platform_drivers AD7124_no_OS adi_console_menu tempsensors_prv
Diff: app/ad7124_regs_configs.h
- Revision:
- 5:90166c496b01
- Parent:
- 0:08ba94bc5a30
- Child:
- 7:ef6fffc246a6
diff -r a00b216ffd0a -r 90166c496b01 app/ad7124_regs_configs.h
--- a/app/ad7124_regs_configs.h Mon Feb 22 04:57:23 2021 +0000
+++ b/app/ad7124_regs_configs.h Fri Mar 19 12:33:00 2021 +0530
@@ -43,6 +43,8 @@
#define RTD4_2WIRE_AINM 10 // AIN10
#define RTD5_2WIRE_AINM 13 // AIN13
+#define RTD_2WIRE_GAIN_VALUE 4 // Gain=16
+
/* 3-wire RTD configurations */
#define RTD1_3WIRE_IOUT0 0 // AIN0
#define RTD2_3WIRE_IOUT0 6 // AIN6
@@ -64,8 +66,8 @@
#define RTD3_3WIRE_AINM 9 // AIN9
#define RTD4_3WIRE_AINM 13 // AIN13
-#define RTD_3WIRE_IOUT_MEASURE_CALIB_TYPE_GAIN 0 // Gain=1
-#define RTD_3WIRE_IOUT_CHOPPING_CALIB_TYPE_GAIN 5 // Gain=32
+#define SINGLE_3WIRE_RTD_GAIN 4 // Gain=16
+#define MULTI_3WIRE_RTD_GAIN 5 // Gain=32
/* 3-wire RTD excitation current measurement inputs (for calibration) */
#if defined(AD7124_8)
@@ -76,7 +78,6 @@
#define RTD_3WIRE_EXC_MEASURE_AINM 7 // AIN7
#endif
-
/* 4-wire RTD configurations */
#define RTD1_4WIRE_IOUT0 0 // AIN0
#define RTD2_4WIRE_IOUT0 1 // AIN1
@@ -96,13 +97,14 @@
#define RTD4_4WIRE_AINM 10 // AIN10
#define RTD5_4WIRE_AINM 13 // AIN13
+#define RTD_4WIRE_GAIN_VALUE 4 // Gain=16
+
/* RTD common configurations */
#define RTD_IOUT0_500UA_EXC 4 // 500uA IOUT0 excitation current
#define RTD_IOUT1_500UA_EXC 4 // 500uA IOUT1 excitation current
#define RTD_IOUT0_250UA_EXC 3 // 250uA IOUT0 excitation current
#define RTD_IOUT1_250UA_EXC 3 // 250uA IOUT1 excitation current
#define RTD_IOUT_EXC_OFF 0 // Excitation current is off
-#define RTD_GAIN_VALUE 4 // Gain=16
/* NTC Thermistor configurations */
@@ -147,16 +149,20 @@
#define THERMOCOUPLE_GAIN_VALUE 7 // Gain=128
/* Cold Junction configurations for thermocouple compensation */
-#define CJC_4WIRE_RTD_AINP 4 // AIN4
-#define CJC_4WIRE_RTD_AINM 5 // AIN5
-#define CJC_4WIRE_RTD_IOUT0 1 // AIN1
-#define CJC_4WIRE_RTD_IOUT0_EXC RTD_IOUT0_500UA_EXC // 500uA
+/* Note: RTD to be used is either 2-wire or 4-wire */
+#define CJC_RTD_AINP 4 // AIN4
+#define CJC_RTD_AINM 5 // AIN5
+#define CJC_RTD_IOUT0 1 // AIN1
+#define CJC_RTD_IOUT0_EXC RTD_IOUT0_500UA_EXC // 500uA
#define CJC_PTC_THERMISTOR_AINP 4 // AIN4
#define CJC_PTC_THERMISTOR_AINM 5 // AIN5
#define CJC_PTC_THERMISTOR_IOUT0 1 // AIN1
#define CJC_PTC_THERMISTOR_IOUT0_EXC 4 // 500uA
+#define RTD_PT1000_GAIN_VALUE 0 // Gain=1
+
+
/* ADC internal calibration configurations */
#define ADC_CALIBRATION_GAIN 1 // Gain = 2
#define ADC_CALIBRATION_PWR_MODE 0 // Low power mode
@@ -166,7 +172,7 @@
typedef enum {
PT100_4WIRE_RTD,
THERMISTOR_PTC_KY81_110,
- PT1000_4WIRE_RTD,
+ PT1000_2WIRE_RTD,
NUM_OF_CJC_SENSORS
} cjc_sensor_type;