Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.

Dependencies:   MaximTinyTester CmdLine MAX541 USBDevice

Revision:
93:6b22269935a6
Parent:
90:d6ed8a8c5f26
diff -r ce099f7cfd4b -r 6b22269935a6 MAX11043/MAX11043.h
--- a/MAX11043/MAX11043.h	Mon Mar 02 23:00:51 2020 +0000
+++ b/MAX11043/MAX11043.h	Wed Mar 04 10:03:12 2020 +0000
@@ -759,6 +759,76 @@
     /// @return 1 on success; 0 on failure
     uint8_t Init(void);
 
+    //----------------------------------------
+    /// Return the physical voltage corresponding to conversion result
+    /// (conversion format is Bipolar mode, 2's complement)
+    /// Does not perform any offset or gain correction.
+    ///
+    /// @pre CONFIG_xxxx_xxxx_xx1x_xxxx_24BIT is 0: 16-bit mode is configured
+    /// @pre g_MAX11043_device.VRef = Voltage of REF input, in Volts
+    /// @param[in] value_u24: raw 24-bit MAX11043 code (right justified).
+    /// @return physical voltage corresponding to MAX11043 code.
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x7FFF) expect 2.500 within 0.030 Full Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x7FFF) expect 2.500             Full Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x6666) expect 2.000             Two Volts
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x6000) expect 1.875             75% Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x4000) expect 1.250             Mid Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x3333) expect 1.000             One Volt
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x2000) expect 0.625             25% Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x051e) expect 0.100             100mV
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x0000) expect 0.00000894069671  Three LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x0000) expect 0.00000596046447  Two LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x0000) expect 0.0000029802326   One LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x0000) expect 0.0               Zero Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xFFFF) expect -0.0000029802326  Negative One LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xFFFF) expect -0.0000059604644  Negative Two LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xFFFF) expect -0.0000089406967  Negative Three LSB
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xFAE1) expect -0.100            Negative 100mV
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xE000) expect -0.625            Negative 25% Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xCCCC) expect -1.000            Negative One Volt
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xC000) expect -1.250            Negative Mid Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0xA000) expect -1.875            Negative 75% Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x9999) expect -2.000            Negative Two Volts
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x8000) expect -2.500            Negative Full Scale
+    /// @test group BIP2C16 ADCVoltageOfCode_16bit(0x8000) expect -2.500            Negative Full Scale
+    ///
+    double ADCVoltageOfCode_16bit(uint32_t value_u16);
+
+    //----------------------------------------
+    /// Return the physical voltage corresponding to conversion result
+    /// (conversion format is Bipolar mode, 2's complement)
+    /// Does not perform any offset or gain correction.
+    ///
+    /// @pre CONFIG_xxxx_xxxx_xx1x_xxxx_24BIT is 1: 24-bit mode is configured
+    /// @pre g_MAX11043_device.VRef = Voltage of REF input, in Volts
+    /// @param[in] value_u24: raw 24-bit MAX11043 code (right justified).
+    /// @return physical voltage corresponding to MAX11043 code.
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x7FFFFF) expect 2.500 within 0.030 Full Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x7FFFFE) expect 2.500             Full Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x666666) expect 2.000             Two Volts
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x600000) expect 1.875             75% Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x400000) expect 1.250             Mid Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x333333) expect 1.000             One Volt
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x200000) expect 0.625             25% Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x051eb8) expect 0.100             100mV
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x000003) expect 0.00000894069671  Three LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x000002) expect 0.00000596046447  Two LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x000001) expect 0.0000029802326   One LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x000000) expect 0.0               Zero Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xFFFFFF) expect -0.0000029802326  Negative One LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xFFFFFE) expect -0.0000059604644  Negative Two LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xFFFFFD) expect -0.0000089406967  Negative Three LSB
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xFAE148) expect -0.100            Negative 100mV
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xE00000) expect -0.625            Negative 25% Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xCCCCCD) expect -1.000            Negative One Volt
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xC00000) expect -1.250            Negative Mid Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0xA00000) expect -1.875            Negative 75% Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x99999A) expect -2.000            Negative Two Volts
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x800001) expect -2.500            Negative Full Scale
+    /// @test group BIP2C24 ADCVoltageOfCode_24bit(0x800000) expect -2.500            Negative Full Scale
+    ///
+    double ADCVoltageOfCode_24bit(uint32_t value_u24);
+
 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
 // CODE GENERATOR: looks like this is a 'write' register access function
     //----------------------------------------
@@ -881,7 +951,7 @@
     /// Menu item 'GA'
     /// Write AGain register
     ///
-    /// @param[in] gain 2's complement, 0x800=0.25V/V, 0x1000=0.5V/V, 0x2000=1VV/V, 0x4000=2V/V, default=0x2000
+    /// @param[in] gain 2's complement, 0x800=0.25V/V, 0x1000=0.5V/V, 0x2000=1V/V, 0x4000=2V/V, default=0x2000
     ///
     /// @return 1 on success; 0 on failure
     uint8_t Write_AGain(uint32_t gain);