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.
Dependents: MAX11410BOB_24bit_ADC MAX11410BOB_Serial_Tester
MAX11410 Class Reference
MAX11410 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC. More...
#include <MAX11410.h>
Detailed Description
MAX11410 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC.
Datasheet: https://www.maximintegrated.com/MAX11410
//---------- CODE GENERATOR: helloCppCodeList
// CODE GENERATOR: example code includes // example code includes // standard include for target platform -- Platform_Include_Boilerplate #include "mbed.h" // Platforms: // - MAX32625MBED // - supports mbed-os-5.11, requires USBDevice library // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/ // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - MAX32600MBED // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board. // - NUCLEO_F446RE // - remove USBDevice library // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - NUCLEO_F401RE // - remove USBDevice library // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - MAX32630FTHR // - #include "max32630fthr.h" // - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/ // - remove MAX32620FTHR library (if present) // - MAX32620FTHR // - #include "MAX32620FTHR.h" // - remove max32630fthr library (if present) // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/ // - not tested yet // - MAX32625PICO // - #include "max32625pico.h" // - add https://os.mbed.com/users/switches/code/max32625pico/ // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - not tested yet // - see https://os.mbed.com/users/switches/code/max32625pico/ // - see https://os.mbed.com/users/switches/code/PICO_board_demo/ // - see https://os.mbed.com/users/switches/code/PICO_USB_I2C_SPI/ // - see https://os.mbed.com/users/switches/code/SerialInterface/ // - Note: To load the MAX32625PICO firmware, hold the button while // connecting the USB cable, then copy firmware bin file // to the MAINTENANCE drive. // - see https://os.mbed.com/platforms/MAX32625PICO/ // - see https://os.mbed.com/teams/MaximIntegrated/wiki/MAX32625PICO-Firmware-Updates // // end Platform_Include_Boilerplate #include "MAX11410.h" // example code board support //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); //DigitalOut rLED(LED1); //DigitalOut gLED(LED2); //DigitalOut bLED(LED3); // // Arduino "shield" connector port definitions (MAX32625MBED shown) #if defined(TARGET_MAX32625MBED) #define A0 AIN_0 #define A1 AIN_1 #define A2 AIN_2 #define A3 AIN_3 #define D0 P0_0 #define D1 P0_1 #define D2 P0_2 #define D3 P0_3 #define D4 P0_4 #define D5 P0_5 #define D6 P0_6 #define D7 P0_7 #define D8 P1_4 #define D9 P1_5 #define D10 P1_3 #define D11 P1_1 #define D12 P1_2 #define D13 P1_0 #elif defined(TARGET_MAX32625PICO) #warning "TARGET_MAX32625PICO not previously tested; need to define pins..." #define A0 AIN_1 #define A1 AIN_2 // #define A2 AIN_3 // #define A3 AIN_0 #define D0 P0_0 #define D1 P0_1 #define D2 P0_2 #define D3 P0_3 #define D4 P1_7 #define D5 P1_6 #define D6 P4_4 #define D7 P4_5 #define D8 P4_6 #define D9 P4_7 #define D10 P0_7 #define D11 P0_6 #define D12 P0_5 #define D13 P0_4 #endif // example code declare SPI interface (GPIO controlled CS) #if defined(TARGET_MAX32625MBED) SPI spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625MBED: P1_1 P1_2 P1_0 Arduino 10-pin header D11 D12 D13 DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: P1_3 Arduino 10-pin header D10 #elif defined(TARGET_MAX32625PICO) #warning "TARGET_MAX32625PICO not previously tested; need to define pins..." SPI spi(SPI0_MOSI, SPI0_MISO, SPI0_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625PICO: pin P0_5 P0_6 P0_4 DigitalOut spi_cs(SPI0_SS); // TARGET_MAX32625PICO: pin P0_7 #elif defined(TARGET_MAX32600MBED) SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10 #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE) // TODO1: avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut // void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) // // TODO1: NUCLEO_F446RE SPI not working; CS and MOSI data looks OK but no SCLK clock pulses. SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK); // mosi, miso, sclk spi1 TARGET_NUCLEO_F446RE: Arduino 10-pin header D11 D12 D13 DigitalOut spi_cs(SPI_CS); // TARGET_NUCLEO_F446RE: PB_6 Arduino 10-pin header D10 // #else SPI spi(D11, D12, D13); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 DigitalOut spi_cs(D10); // Generic: Arduino 10-pin header D10 #endif // example code declare GPIO interface pins // example code declare device instance MAX11410 g_MAX11410_device(spi, spi_cs, MAX11410::MAX11410_IC); // CODE GENERATOR: example code for ADC: serial port declaration //-------------------------------------------------- // Declare the Serial driver // default baud rate settings are 9600 8N1 // install device driver from http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe // see docs https://docs.mbed.com/docs/mbed-os-handbook/en/5.5/getting_started/what_need/ #if defined(TARGET_MAX32630) #include "USBSerial.h" // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 //Serial DAPLINKserial(P2_1, P2_0); // tx, rx // #define HAS_DAPLINK_SERIAL 1 // Virtual serial port over USB // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //-------------------------------------------------- #elif defined(TARGET_MAX32625MBED) #include "USBSerial.h" // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 //Serial DAPLINKserial(P2_1, P2_0); // tx, rx // #define HAS_DAPLINK_SERIAL 1 // Virtual serial port over USB // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //-------------------------------------------------- #elif defined(TARGET_MAX32600) #include "USBSerial.h" // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 Serial DAPLINKserial(P1_1, P1_0); // tx, rx #define HAS_DAPLINK_SERIAL 1 // Virtual serial port over USB // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //-------------------------------------------------- #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE) Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx //-------------------------------------------------- #else #if defined(SERIAL_TX) #warning "target not previously tested; guess serial pins are SERIAL_TX, SERIAL_RX..." Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx #elif defined(USBTX) #warning "target not previously tested; guess serial pins are USBTX, USBRX..." Serial serial(USBTX, USBRX); // tx, rx #elif defined(UART_TX) #warning "target not previously tested; guess serial pins are UART_TX, UART_RX..." Serial serial(UART_TX, UART_RX); // tx, rx #else #warning "target not previously tested; need to define serial pins..." #endif #endif // #include "CmdLine.h" CmdLine cmdLine(serial, "serial"); // example code main function int main() { // setup: put your setup code here, to run once // example code: serial port banner message wait(3); // 3000ms timing delay function, platform-specific cmdLine.serial().printf("\r\nHello_MAX11410\r\n"); // CODE GENERATOR: example code: member function Init // Initialize MAX11410 and verify device ID uint32_t g_SPI_SCLK_Hz = 24000000; // platform limit 24MHz intSPI_SCLK_Platform_Max_MHz * 1000000 if (g_MAX11410_device.Init() == 0) { // init failed; try "safe mode" SPI at slower SCLK rate cmdLine.serial().printf("\r\nMAX11410 Init failed; retry at SPI SCLK frequency 2000000 Hz\r\n"); g_SPI_SCLK_Hz = 2000000; g_MAX11410_device.spi_frequency(2000000); g_MAX11410_device.Init(); } // CODE GENERATOR: get spi properties from device if (g_SPI_SCLK_Hz > g_MAX11410_device.get_spi_frequency()) { // Device limits SPI SCLK frequency g_SPI_SCLK_Hz = g_MAX11410_device.get_spi_frequency(); cmdLine.serial().printf("\r\nMAX11410 limits SPI SCLK frequency to %ld Hz\r\n", g_SPI_SCLK_Hz); g_MAX11410_device.Init(); } if (g_MAX11410_device.get_spi_frequency() > g_SPI_SCLK_Hz) { // Platform limits SPI SCLK frequency g_MAX11410_device.spi_frequency(g_SPI_SCLK_Hz); cmdLine.serial().printf("\r\nPlatform limits MAX11410 SPI SCLK frequency to %ld Hz\r\n", g_SPI_SCLK_Hz); g_MAX11410_device.Init(); } // g_SPI_dataMode = g_MAX11410_device.get_spi_dataMode(); while (g_MAX11410_device.Init() == 0) { wait(3); // 3000ms timing delay function, platform-specific cmdLine.serial().printf("\r\nMAX11410 Init failed; retry...\r\n"); } while (1) { // loop: put your main code here, to run repeatedly // CODE GENERATOR: example code: has no member function REF // CODE GENERATOR: example code for ADC: repeat-forever convert and print conversion result, one record per line // CODE GENERATOR: ResolutionBits = 24 // CODE GENERATOR: FScode = 0xffffff // CODE GENERATOR: NumChannels = 10 // CODE GENERATOR: banner before helloCppCodeList while(1) cmdLine.serial().printf("v_filter = 0x%2.2x\r\n", g_MAX11410_device.v_filter); cmdLine.serial().printf("v_pga = 0x%2.2x\r\n", g_MAX11410_device.v_pga); cmdLine.serial().printf("v_ctrl = 0x%2.2x\r\n", g_MAX11410_device.v_ctrl); // banner for csv data columns cmdLine.serial().printf("\"AIN0_LSB\",\"AIN1_LSB\",\"AIN2_LSB\",\"AIN3_LSB\",\"AIN4_LSB\",\"AIN5_LSB\",\"AIN6_LSB\",\"AIN7_LSB\",\"AIN8_LSB\",\"AIN9_LSB\""); cmdLine.serial().printf("\r\n"); while(1) { // this code repeats forever // this code repeats forever // CODE GENERATOR: example code: has no member function ScanStandardExternalClock // CODE GENERATOR: example code: has no member function ReadAINcode // CODE GENERATOR: example code: member function Read_All_Voltages // Measure ADC channels in sequence from AIN0 to channelNumber_0_9. // @param[in] g_MAX11410_device.channelNumber_0_15: AIN Channel Number // @param[in] g_MAX11410_device.PowerManagement_0_2: 0=Normal, 1=AutoShutdown, 2=AutoStandby // @param[in] g_MAX11410_device.chan_id_0_1: ADC_MODE_CONTROL.CHAN_ID int channelId_0_9 = 9; //g_MAX11410_device.channelNumber_0_15 = channelId_0_9; //g_MAX11410_device.PowerManagement_0_2 = 0; //g_MAX11410_device.chan_id_0_1 = 1; g_MAX11410_device.Read_All_Voltages(); // wait(3.0); // CODE GENERATOR: print conversion result // Use Arduino Serial Plotter to view output: Tools | Serial Plotter cmdLine.serial().printf("%d", g_MAX11410_device.AINcode[0]); for (int index = 1; index <= channelId_0_9; index++) { cmdLine.serial().printf(",%d", g_MAX11410_device.AINcode[index]); } cmdLine.serial().printf("\r\n"); } // this code repeats forever } }
//---------- CODE GENERATOR: end helloCppCodeList
Definition at line 405 of file MAX11410.h.
Member Typedef Documentation
Input multiplexer channel selection CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINN_SEL[3:0].
- 0000: AINN = AIN0
- 0001: AINN = AIN1
- 0010: AINN = AIN2
- 0011: AINN = AIN3
- 0100: AINN = AIN4
- 0101: AINN = AIN5
- 0110: AINN = AIN6
- 0111: AINN = AIN7
- 1000: AINN = AIN8
- 1001: AINN = AIN9
- 1010: AINN = GND
- 1011: AINN = Unconnected
- 1100: AINN = Unconnected
- 1101: AINN = Unconnected
- 1110: AINN = Unconnected
- 1111: AINN = Unconnected (default)
Input multiplexer channel selection CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0].
- 0000: AINP = AIN0
- 0001: AINP = AIN1
- 0010: AINP = AIN2
- 0011: AINP = AIN3
- 0100: AINP = AIN4
- 0101: AINP = AIN5
- 0110: AINP = AIN6
- 0111: AINP = AIN7
- 1000: AINP = AIN8
- 1001: AINP = AIN9
- 1010: AINP = AVDD
- 1011: AINN = Unconnected
- 1100: AINN = Unconnected
- 1101: AINN = Unconnected
- 1110: AINN = Unconnected
- 1111: AINN = Unconnected (default)
Source command CMD_r000_1010_dddd_dddd_SOURCE BRN_MODE[1:0] field.
- 00: Powered down, burnout sources disabled (default)
- 01: 0.5uA burnout current sources enabled
- 10: 1uA burnout current sources enabled
- 11: 10uA burnout current sources enabled
Calbration command CMD_r000_0011_xxxx_xddd_CAL_START CAL_TYPE[2:0] field.
- 000: Performs a self-calibration. Resulting offset calibration value is stored in the SELF_OFF register, and the 1x gain calibration value is stored in the SELF_GAIN_1 register.
- 001: Performs a PGA gain calibration at the currently programmed PGA gain. A 'No Op' will result if PGA Gain calibration is executed with the PGA disabled via the SIG_PATH register, or with the GAIN register set to 1x.The resulting gain calibration value is stored in the SELF_GAIN_[2-128] register corresponding to the currently programmed PGA GAIN setting.
- 010: Reserved
- 011: Reserved
- 100: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_A register.
- 101: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_A register.
- 110: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_B register.
- 111: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_B register.
| typedef enum MAX11410::MAX11410_CMD_enum_t MAX11410_CMD_enum_t |
Register Addresses.
Naming convention is CMD_bitstream_FUNCTION_NAME
- r = read/write bit (1=read, 0=write)
- xaaa_aaaa = 7-bit register address field
- dddd_dddd = 8-bit register data field
- dddd_dddd_dddd_dddd = 16-bit register data field
- dddd_dddd_dddd_dddd_dddd_dddd = 24-bit register data field
- xxxx = don't care
| typedef enum MAX11410::MAX11410_CMDOP_enum_t MAX11410_CMDOP_enum_t |
Command Operation Format (see function DecodeCommand)
Naming convention is CMDOP_bitstream_OPERATION_NAME
- rxxx_xxxx = read/write bit (1=read, 0=write)
- xaaa_aaaa = 7-bit register address field -- see MAX11410_CMD_enum_t
- xxxx = don't care
Conversion / seqeuncer start command CMD_r000_0001_xddd_xxdd_CONV_START CONV_TYPE[1:0] field.
CMD_r000_0110_xddd_xxdd_GP_CONV GP_CONV_TYPE[2:0] field.
- 00: Single conversion
- 01: Continuous conversions
- 10, 11: 1:4 Duty cycled conversions (modulator low-power mode)
| typedef enum MAX11410::MAX11410_DEST_enum_t MAX11410_DEST_enum_t |
Conversion / seqeuncer start command CMD_r000_0001_xddd_xxdd_CONV_START DEST[2:0] field.
CMD_r000_0110_xddd_xxdd_GP_CONV GP_DEST[2:0] field.
- 000: Store result in DATA0
- 001: Store result in DATA1
- 010: Store result in DATA2
- 011: Store result in DATA3
- 100: Store result in DATA4
- 101: Store result in DATA5
- 110: Store result in DATA6
- 111: Store result in DATA7
| typedef enum MAX11410::MAX11410_GAIN_enum_t MAX11410_GAIN_enum_t |
Input multiplexer channel selection CMD_r000_1110_00ss_0ggg_PGA field GAIN[2:0].
- 000: 1 (default)
- 001: 2
- 010: 4
- 011: 8
- 100: 16
- 101: 32
- 110: 64
- 111: 128
| typedef enum MAX11410::MAX11410_GP0_DIR_enum_t MAX11410_GP0_DIR_enum_t |
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_DIR[1:0] field (bits 7:6)
- 00: Input mode, reference to VDDIO (default)
- 01: Reserved
- 10: Output mode, open-drain output
- 11: Output mode, CMOS output
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_ISEL[1:0] field (bits 5:4)
- 00: GPIO_0 input disabled (default)
- 01: GPIO_0 input configured as rising-edge-triggered conversion start
- 10: GPIO_0 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
- 11: Reserved
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_OSEL[2:0] field (bits 2:0)
- 000: GPIO_0 output disabled, high Z (default)
- 001: GPIO_0 output is configured as INTRB (active low)
- 010: GPIO_0 output is configured as INTR (active high)
- 011: GPIO_0 output is configured as state Logic 0
- 100: GPIO_0 output is configured as state Logic 1
- 101: GPIO_0 output is configured as automatic low-side switch operation (CMOS output mode overridden)
- 110: GPIO_0 output is configured as modulator active status
- 111: GPIO_0 output is configured as system clock (2.456Mhz Nominal)
| typedef enum MAX11410::MAX11410_GP1_DIR_enum_t MAX11410_GP1_DIR_enum_t |
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_DIR[1:0] field (bits 7:6)
- 00: Input mode, reference to VDDIO (default)
- 01: Reserved
- 10: Output mode, open-drain output
- 11: Output mode, CMOS output
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_ISEL[1:0] field (bits 5:4)
- 00: GPIO_1 input disabled (default)
- 01: GPIO_1 input configured as rising-edge-triggered conversion start
- 10: GPIO_1 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
- 11: Reserved
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_OSEL[2:0] field (bits 2:0)
- 000: GPIO_1 output disabled, high Z (default)
- 001: GPIO_1 output is configured as INTRB (active low)
- 010: GPIO_1 output is configured as INTR (active high)
- 011: GPIO_1 output is configured as state Logic 0
- 100: GPIO_1 output is configured as state Logic 1
- 101: GPIO_1 output is configured as system clock (2.456Mhz Nominal)
- 110: GPIO_1 output is configured as modulator active status
- 111: GPIO_1 output is configured as automatic low-side switch operation (CMOS output mode overridden)
Input multiplexer channel selection CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC0_SEL[3:0].
- 0000: AIN0
- 0001: AIN1
- 0010: AIN2
- 0011: AIN3
- 0100: AIN4
- 0101: AIN5
- 0110: AIN6
- 0111: AIN7
- 1000: AIN8
- 1001: AIN9
- 1010: Unconnected; IDAC0 powered down.
- 1011: Unconnected; IDAC0 powered down.
- 1100: Unconnected; IDAC0 powered down.
- 1101: Unconnected; IDAC0 powered down.
- 1110: Unconnected; IDAC0 powered down.
- 1111: Unconnected; IDAC0 powered down.(Default)
Input multiplexer channel selection CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC1_SEL[3:0].
- 0000: AIN0
- 0001: AIN1
- 0010: AIN2
- 0011: AIN3
- 0100: AIN4
- 0101: AIN5
- 0110: AIN6
- 0111: AIN7
- 1000: AIN8
- 1001: AIN9
- 1010: Unconnected; IDAC1 powered down.
- 1011: Unconnected; IDAC1 powered down.
- 1100: Unconnected; IDAC1 powered down.
- 1101: Unconnected; IDAC1 powered down.
- 1110: Unconnected; IDAC1 powered down.
- 1111: Unconnected; IDAC1 powered down.(Default)
Source command CMD_r000_1010_dddd_dddd_SOURCE IDAC_MODE[3:0] field.
- 0000: 10uA (default)
- 0001: 50uA
- 0010: 75uA
- 0011: 100uA
- 0100: 125uA
- 0101: 150uA
- 0110: 175uA
- 0111: 200uA
- 1000: 225uA
- 1001: 250uA
- 1010: 300uA
- 1011: 400uA
- 1100: 600uA
- 1101: 800uA
- 1110: 1200uA
- 1111: 1600uA
| typedef enum MAX11410::MAX11410_LINEF_enum_t MAX11410_LINEF_enum_t |
Filter command CMD_r000_1000_x0dd_dddd_FILTER LINEF[1:0] field.
- 00: Simultaneous 50/60Hz FIR rejection (default)
- 01: 50Hz FIR rejection
- 10: 60Hz FIR rejection
- 11: SINC4
| typedef enum MAX11410::MAX11410_PD_enum_t MAX11410_PD_enum_t |
Power-down state command CMD_r000_0000_xxxx_xxdd_PD PD[1:0] field.
- 00: Normal mode
- 01: Standby mode -- Powers down all analog circuity, but not the internal voltage regulator
- 10: Sleep mode -- Powers down all analog circuitry including the internal voltage regulator
- 11: Reset -- all registers reset to POR state (Self Clearing to 01 Standby mode)
| typedef enum MAX11410::MAX11410_RATE_enum_t MAX11410_RATE_enum_t |
Filter command CMD_r000_1000_x0dd_dddd_FILTER RATE[3:0] field.
Sets conversion rate based on LINEF value. See Table 9a through Table 9d for details.
Table 9a. LINEF = 00 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate -----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 1.0SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 2.0SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 4.0SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 8.0SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 16.0SPS RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 1.1SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 2.1SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 4.2SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 8.4SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 16.8SPS RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.5SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.1SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.1SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 4.2SPS
Table 9b. LINEF = 01 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 1.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 5.0SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 10.0SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 20.0SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 35.6SPS RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
Table 9c. LINEF = 10 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 1.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 5.0SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 10.0SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 20.0SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 35.6SPS RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
Table 9d. LINEF = 11 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 1SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 5SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 10SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 15SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 30SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 60SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 120SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 240SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 480SPS RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 4SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 10SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 20SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 40SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 60SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 120SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 240SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 480SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 960SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 1920SPS RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 1SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 2.5SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 5SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 10SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 15SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 30SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 60SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 120SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 240SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 480SPS
| typedef enum MAX11410::MAX11410_REF_SEL_enum_t MAX11410_REF_SEL_enum_t |
Filter command CMD_r000_1001_dddd_dddd_CTRL REF_SEL[2:0] field.
- 000: AIN0(REF0P)/AIN1(REF0N)
- 001: REF1P/REF1N (default)
- 010: REF2P/REF2N
- 011: AVDD/AGND
- 100: AIN0(REF0P)/AGND (single-ended mode)
- 101: REF1P/AGND (single-ended mode)
- 110: REF2P/AGND (single-ended mode)
- 111: AVDD/AGND
Microcode Sequencer Addresses.
CMD_r000_0010_xddd_dddd_SEQ_START CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR
Naming convention is CMD_bitstream_FUNCTION_NAME
- xaaa_aaaa = 7-bit register address field
- dddd_dddd = 8-bit register data field
- xxxx = don't care
Input multiplexer channel selection CMD_r000_1110_00ss_0ggg_PGA field SIG_PATH[1:0].
- 00: Buffered, low-power, unity-gain path (PGA disabled, digital gain) [default]
- 01: Bypass path (signal buffer disabled,PGA disabled, digital gain)
- 10: PGA path (signal buffer disabled, analog gain)
- 11: Reserved
| typedef enum MAX11410::MAX11410_STATUS_enum_t MAX11410_STATUS_enum_t |
Status indicator bits CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS fields.
Source command CMD_r000_1010_dddd_dddd_SOURCE VBIAS_MODE[1:0] field.
- 00: Active mode (default)
- 01: High impedance; 125kOhm output impedance
- 10: Low impedance; 20kOhm output impedance
- 11: Low impedance; 20kOhm output impedance
Member Enumeration Documentation
Input multiplexer channel selection CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINN_SEL[3:0].
- 0000: AINN = AIN0
- 0001: AINN = AIN1
- 0010: AINN = AIN2
- 0011: AINN = AIN3
- 0100: AINN = AIN4
- 0101: AINN = AIN5
- 0110: AINN = AIN6
- 0111: AINN = AIN7
- 1000: AINN = AIN8
- 1001: AINN = AIN9
- 1010: AINN = GND
- 1011: AINN = Unconnected
- 1100: AINN = Unconnected
- 1101: AINN = Unconnected
- 1110: AINN = Unconnected
- 1111: AINN = Unconnected (default)
- Enumerator:
Definition at line 1138 of file MAX11410.h.
Input multiplexer channel selection CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0].
- 0000: AINP = AIN0
- 0001: AINP = AIN1
- 0010: AINP = AIN2
- 0011: AINP = AIN3
- 0100: AINP = AIN4
- 0101: AINP = AIN5
- 0110: AINP = AIN6
- 0111: AINP = AIN7
- 1000: AINP = AIN8
- 1001: AINP = AIN9
- 1010: AINP = AVDD
- 1011: AINN = Unconnected
- 1100: AINN = Unconnected
- 1101: AINN = Unconnected
- 1110: AINN = Unconnected
- 1111: AINN = Unconnected (default)
- Enumerator:
Definition at line 1098 of file MAX11410.h.
Source command CMD_r000_1010_dddd_dddd_SOURCE BRN_MODE[1:0] field.
- 00: Powered down, burnout sources disabled (default)
- 01: 0.5uA burnout current sources enabled
- 10: 1uA burnout current sources enabled
- 11: 10uA burnout current sources enabled
- Enumerator:
BRN_MODE_00_disabled 0b00
BRN_MODE_01_0u5A 0b01
BRN_MODE_10_1uA 0b10
BRN_MODE_11_10uA 0b11
Definition at line 1030 of file MAX11410.h.
Calbration command CMD_r000_0011_xxxx_xddd_CAL_START CAL_TYPE[2:0] field.
- 000: Performs a self-calibration. Resulting offset calibration value is stored in the SELF_OFF register, and the 1x gain calibration value is stored in the SELF_GAIN_1 register.
- 001: Performs a PGA gain calibration at the currently programmed PGA gain. A 'No Op' will result if PGA Gain calibration is executed with the PGA disabled via the SIG_PATH register, or with the GAIN register set to 1x.The resulting gain calibration value is stored in the SELF_GAIN_[2-128] register corresponding to the currently programmed PGA GAIN setting.
- 010: Reserved
- 011: Reserved
- 100: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_A register.
- 101: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_A register.
- 110: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_B register.
- 111: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_B register.
- Enumerator:
Definition at line 715 of file MAX11410.h.
| enum MAX11410_CMD_enum_t |
Register Addresses.
Naming convention is CMD_bitstream_FUNCTION_NAME
- r = read/write bit (1=read, 0=write)
- xaaa_aaaa = 7-bit register address field
- dddd_dddd = 8-bit register data field
- dddd_dddd_dddd_dddd = 16-bit register data field
- dddd_dddd_dddd_dddd_dddd_dddd = 24-bit register data field
- xxxx = don't care
- Enumerator:
Definition at line 432 of file MAX11410.h.
Command Operation Format (see function DecodeCommand)
Naming convention is CMDOP_bitstream_OPERATION_NAME
- rxxx_xxxx = read/write bit (1=read, 0=write)
- xaaa_aaaa = 7-bit register address field -- see MAX11410_CMD_enum_t
- xxxx = don't care
Definition at line 416 of file MAX11410.h.
Conversion / seqeuncer start command CMD_r000_0001_xddd_xxdd_CONV_START CONV_TYPE[1:0] field.
CMD_r000_0110_xddd_xxdd_GP_CONV GP_CONV_TYPE[2:0] field.
- 00: Single conversion
- 01: Continuous conversions
- 10, 11: 1:4 Duty cycled conversions (modulator low-power mode)
- Enumerator:
CONV_TYPE_00_Single 0b00
CONV_TYPE_01_Continuous 0b01
CONV_TYPE_10_DutyCycle_1_4 0b10
CONV_TYPE_11_DutyCycle_1_4 0b11
Definition at line 695 of file MAX11410.h.
| enum MAX11410_DEST_enum_t |
Conversion / seqeuncer start command CMD_r000_0001_xddd_xxdd_CONV_START DEST[2:0] field.
CMD_r000_0110_xddd_xxdd_GP_CONV GP_DEST[2:0] field.
- 000: Store result in DATA0
- 001: Store result in DATA1
- 010: Store result in DATA2
- 011: Store result in DATA3
- 100: Store result in DATA4
- 101: Store result in DATA5
- 110: Store result in DATA6
- 111: Store result in DATA7
- Enumerator:
DEST_000_DATA0 0b000
DEST_001_DATA1 0b001
DEST_010_DATA2 0b010
DEST_011_DATA3 0b011
DEST_100_DATA4 0b100
DEST_101_DATA5 0b101
DEST_110_DATA6 0b110
DEST_111_DATA7 0b111
Definition at line 675 of file MAX11410.h.
| enum MAX11410_GAIN_enum_t |
Input multiplexer channel selection CMD_r000_1110_00ss_0ggg_PGA field GAIN[2:0].
- 000: 1 (default)
- 001: 2
- 010: 4
- 011: 8
- 100: 16
- 101: 32
- 110: 64
- 111: 128
- Enumerator:
GAIN_000_1 0b000
GAIN_001_2 0b001
GAIN_010_4 0b010
GAIN_011_8 0b011
GAIN_100_16 0b100
GAIN_101_32 0b101
GAIN_110_64 0b110
GAIN_111_128 0b111
Definition at line 1266 of file MAX11410.h.
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_DIR[1:0] field (bits 7:6)
- 00: Input mode, reference to VDDIO (default)
- 01: Reserved
- 10: Output mode, open-drain output
- 11: Output mode, CMOS output
- Enumerator:
GP0_DIR_00_Input 0b00
GP0_DIR_01_reserved 0b01
GP0_DIR_10_OutputOpenDrain 0b10
GP0_DIR_11_Output 0b11
Definition at line 735 of file MAX11410.h.
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_ISEL[1:0] field (bits 5:4)
- 00: GPIO_0 input disabled (default)
- 01: GPIO_0 input configured as rising-edge-triggered conversion start
- 10: GPIO_0 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
- 11: Reserved
- Enumerator:
GP0_ISEL_00_disabled 0b00
GP0_ISEL_01_TRIGGER_CONV_START 0b01
GP0_ISEL_10_TRIGGER_SEQ_START 0b10
GP0_ISEL_11_reserved 0b11
Definition at line 751 of file MAX11410.h.
GPIO0 pin command CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_OSEL[2:0] field (bits 2:0)
- 000: GPIO_0 output disabled, high Z (default)
- 001: GPIO_0 output is configured as INTRB (active low)
- 010: GPIO_0 output is configured as INTR (active high)
- 011: GPIO_0 output is configured as state Logic 0
- 100: GPIO_0 output is configured as state Logic 1
- 101: GPIO_0 output is configured as automatic low-side switch operation (CMOS output mode overridden)
- 110: GPIO_0 output is configured as modulator active status
- 111: GPIO_0 output is configured as system clock (2.456Mhz Nominal)
- Enumerator:
Definition at line 771 of file MAX11410.h.
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_DIR[1:0] field (bits 7:6)
- 00: Input mode, reference to VDDIO (default)
- 01: Reserved
- 10: Output mode, open-drain output
- 11: Output mode, CMOS output
- Enumerator:
GP1_DIR_00_Input 0b00
GP1_DIR_01_reserved 0b01
GP1_DIR_10_OutputOpenDrain 0b10
GP1_DIR_11_Output 0b11
Definition at line 791 of file MAX11410.h.
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_ISEL[1:0] field (bits 5:4)
- 00: GPIO_1 input disabled (default)
- 01: GPIO_1 input configured as rising-edge-triggered conversion start
- 10: GPIO_1 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
- 11: Reserved
- Enumerator:
GP1_ISEL_00_disabled 0b00
GP1_ISEL_01_TRIGGER_CONV_START 0b01
GP1_ISEL_10_TRIGGER_SEQ_START 0b10
GP1_ISEL_11_reserved 0b11
Definition at line 807 of file MAX11410.h.
GPIO1 pin command CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_OSEL[2:0] field (bits 2:0)
- 000: GPIO_1 output disabled, high Z (default)
- 001: GPIO_1 output is configured as INTRB (active low)
- 010: GPIO_1 output is configured as INTR (active high)
- 011: GPIO_1 output is configured as state Logic 0
- 100: GPIO_1 output is configured as state Logic 1
- 101: GPIO_1 output is configured as system clock (2.456Mhz Nominal)
- 110: GPIO_1 output is configured as modulator active status
- 111: GPIO_1 output is configured as automatic low-side switch operation (CMOS output mode overridden)
- Enumerator:
Definition at line 827 of file MAX11410.h.
| enum MAX11410_ic_t |
Input multiplexer channel selection CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC0_SEL[3:0].
- 0000: AIN0
- 0001: AIN1
- 0010: AIN2
- 0011: AIN3
- 0100: AIN4
- 0101: AIN5
- 0110: AIN6
- 0111: AIN7
- 1000: AIN8
- 1001: AIN9
- 1010: Unconnected; IDAC0 powered down.
- 1011: Unconnected; IDAC0 powered down.
- 1100: Unconnected; IDAC0 powered down.
- 1101: Unconnected; IDAC0 powered down.
- 1110: Unconnected; IDAC0 powered down.
- 1111: Unconnected; IDAC0 powered down.(Default)
- Enumerator:
Definition at line 1218 of file MAX11410.h.
Input multiplexer channel selection CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC1_SEL[3:0].
- 0000: AIN0
- 0001: AIN1
- 0010: AIN2
- 0011: AIN3
- 0100: AIN4
- 0101: AIN5
- 0110: AIN6
- 0111: AIN7
- 1000: AIN8
- 1001: AIN9
- 1010: Unconnected; IDAC1 powered down.
- 1011: Unconnected; IDAC1 powered down.
- 1100: Unconnected; IDAC1 powered down.
- 1101: Unconnected; IDAC1 powered down.
- 1110: Unconnected; IDAC1 powered down.
- 1111: Unconnected; IDAC1 powered down.(Default)
- Enumerator:
Definition at line 1178 of file MAX11410.h.
Source command CMD_r000_1010_dddd_dddd_SOURCE IDAC_MODE[3:0] field.
- 0000: 10uA (default)
- 0001: 50uA
- 0010: 75uA
- 0011: 100uA
- 0100: 125uA
- 0101: 150uA
- 0110: 175uA
- 0111: 200uA
- 1000: 225uA
- 1001: 250uA
- 1010: 300uA
- 1011: 400uA
- 1100: 600uA
- 1101: 800uA
- 1110: 1200uA
- 1111: 1600uA
- Enumerator:
Definition at line 1058 of file MAX11410.h.
Filter command CMD_r000_1000_x0dd_dddd_FILTER LINEF[1:0] field.
- 00: Simultaneous 50/60Hz FIR rejection (default)
- 01: 50Hz FIR rejection
- 10: 60Hz FIR rejection
- 11: SINC4
- Enumerator:
LINEF_00_50Hz_60Hz_FIR 0b00
LINEF_01_50Hz_FIR 0b01
LINEF_10_60Hz_FIR 0b10
LINEF_11_SINC4 0b11
Definition at line 847 of file MAX11410.h.
| enum MAX11410_PD_enum_t |
Power-down state command CMD_r000_0000_xxxx_xxdd_PD PD[1:0] field.
- 00: Normal mode
- 01: Standby mode -- Powers down all analog circuity, but not the internal voltage regulator
- 10: Sleep mode -- Powers down all analog circuitry including the internal voltage regulator
- 11: Reset -- all registers reset to POR state (Self Clearing to 01 Standby mode)
Definition at line 654 of file MAX11410.h.
| enum MAX11410_RATE_enum_t |
Filter command CMD_r000_1000_x0dd_dddd_FILTER RATE[3:0] field.
Sets conversion rate based on LINEF value. See Table 9a through Table 9d for details.
Table 9a. LINEF = 00 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate -----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 1.0SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 2.0SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 4.0SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 8.0SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 16.0SPS RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 1.1SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 2.1SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 4.2SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 8.4SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 16.8SPS RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.5SPS RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.1SPS RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.1SPS RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 4.2SPS
Table 9b. LINEF = 01 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 1.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 5.0SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 10.0SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 20.0SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 35.6SPS RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
Table 9c. LINEF = 10 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 1.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 5.0SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 10.0SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 20.0SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 35.6SPS RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
Table 9d. LINEF = 11 Data Rate and Filter Rejection Settings
Rate | LINEF | CONV_TYPE | Rate ----------|------------------------|----------------------------|---------- RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 1SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 2.5SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 5SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 10SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 15SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 30SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 60SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 120SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 240SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 480SPS RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 4SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 10SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 20SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 40SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 60SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 120SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 240SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 480SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 960SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 1920SPS RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 1SPS RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 2.5SPS RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 5SPS RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 10SPS RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 15SPS RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 30SPS RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 60SPS RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 120SPS RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 240SPS RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 480SPS
- Enumerator:
Definition at line 962 of file MAX11410.h.
Filter command CMD_r000_1001_dddd_dddd_CTRL REF_SEL[2:0] field.
- 000: AIN0(REF0P)/AIN1(REF0N)
- 001: REF1P/REF1N (default)
- 010: REF2P/REF2N
- 011: AVDD/AGND
- 100: AIN0(REF0P)/AGND (single-ended mode)
- 101: REF1P/AGND (single-ended mode)
- 110: REF2P/AGND (single-ended mode)
- 111: AVDD/AGND
- Enumerator:
Definition at line 994 of file MAX11410.h.
Microcode Sequencer Addresses.
CMD_r000_0010_xddd_dddd_SEQ_START CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR
Naming convention is CMD_bitstream_FUNCTION_NAME
- xaaa_aaaa = 7-bit register address field
- dddd_dddd = 8-bit register data field
- xxxx = don't care
- Enumerator:
Definition at line 557 of file MAX11410.h.
Input multiplexer channel selection CMD_r000_1110_00ss_0ggg_PGA field SIG_PATH[1:0].
- 00: Buffered, low-power, unity-gain path (PGA disabled, digital gain) [default]
- 01: Bypass path (signal buffer disabled,PGA disabled, digital gain)
- 10: PGA path (signal buffer disabled, analog gain)
- 11: Reserved
- Enumerator:
SIG_PATH_00_BUFFERED 0b00
SIG_PATH_01_BYPASS 0b01
SIG_PATH_10_PGA 0b10
SIG_PATH_11_reserved 0b11
Definition at line 1246 of file MAX11410.h.
Status indicator bits CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS fields.
- Enumerator:
Definition at line 618 of file MAX11410.h.
Source command CMD_r000_1010_dddd_dddd_SOURCE VBIAS_MODE[1:0] field.
- 00: Active mode (default)
- 01: High impedance; 125kOhm output impedance
- 10: Low impedance; 20kOhm output impedance
- 11: Low impedance; 20kOhm output impedance
- Enumerator:
VBIAS_MODE_00_Active 0b00
VBIAS_MODE_01_125kOhm 0b01
VBIAS_MODE_10_20kOhm 0b10
VBIAS_MODE_11_20kOhm 0b11
Definition at line 1014 of file MAX11410.h.
Constructor & Destructor Documentation
| MAX11410 | ( | SPI & | spi, |
| DigitalOut & | cs_pin, | ||
| MAX11410_ic_t | ic_variant | ||
| ) |
Constructor for MAX11410 Class.
Requires an existing SPI object as well as a DigitalOut object. The DigitalOut object is used for a chip enable signal
On Entry:
- Parameters:
-
[in] spi - pointer to existing SPI object [in] cs_pin - pointer to a DigitalOut pin object CODE GENERATOR: class constructor docstrings gpio InputPin pins CODE GENERATOR: class constructor docstrings gpio OutputPin pins [in] ic_variant - which type of MAX11410 is used
On Exit:
- Returns:
- None
Definition at line 66 of file MAX11410.cpp.
Member Function Documentation
| uint8_t Calibrate_PGA_Gain | ( | void | ) |
Menu item 'X1'.
CAL_START Calibrate Selected PGA.
- Returns:
- 1 on success; 0 on failure
Definition at line 1640 of file MAX11410.cpp.
| uint8_t Calibrate_Self_Offset_Gain | ( | void | ) |
Menu item 'X0'.
CAL_START Calibrate Self Offset and Gain.
- Returns:
- 1 on success; 0 on failure
Definition at line 1622 of file MAX11410.cpp.
| uint8_t Calibrate_System_Gain_A | ( | void | ) |
CAL_START Calibrate System Gain A.
- Returns:
- 1 on success; 0 on failure
Definition at line 1672 of file MAX11410.cpp.
| uint8_t Calibrate_System_Gain_B | ( | void | ) |
CAL_START Calibrate System Gain B.
- Returns:
- 1 on success; 0 on failure
Definition at line 1704 of file MAX11410.cpp.
| uint8_t Calibrate_System_Offset_A | ( | void | ) |
CAL_START Calibrate System Offset A.
- Returns:
- 1 on success; 0 on failure
Definition at line 1656 of file MAX11410.cpp.
| uint8_t Calibrate_System_Offset_B | ( | void | ) |
CAL_START Calibrate System Offset B.
- Returns:
- 1 on success; 0 on failure
Definition at line 1688 of file MAX11410.cpp.
| uint8_t Configure_CTRL | ( | uint8_t | extclk, |
| uint8_t | u_bn, | ||
| uint8_t | format, | ||
| uint8_t | refbufp_en, | ||
| uint8_t | refbufn_en, | ||
| uint8_t | ref_sel | ||
| ) |
Menu item 'XC'.
CTRL Select clock, format, and reference.
- Parameters:
-
[in] extclk = external clock enable, default=0 [in] u_bn = unipolar input range enable, default=0 [in] format = offset binary format enable, default=0 [in] refbufp_en = REFP reference buffer enable, default=0 [in] refbufn_en = REFN reference buffer enable, default=0 [in] ref_sel = reference selection, default=MAX11410MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N
- Returns:
- 1 on success; 0 on failure
Definition at line 1473 of file MAX11410.cpp.
| uint8_t Configure_CTRL_REF | ( | uint8_t | ref_sel ) |
Menu item 'XR'.
CTRL select reference, without changing the other fields.
- Precondition:
- ctrl = shadow of CTRL register
- Parameters:
-
[in] ref_sel = reference selection, default=MAX11410MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N
- Returns:
- 1 on success; 0 on failure
Definition at line 1505 of file MAX11410.cpp.
| uint8_t Configure_FILTER | ( | uint8_t | linef, |
| uint8_t | rate | ||
| ) |
Menu item 'XF'.
FILTER Select Filter and Rate. Sets conversion rate based on RATE, LINEF, and CONV_TYPE value. See Table 9a through Table 9d for details. For CONV_TYPE_01_Continuous, linef=LINEF_11_SINC4, rate=RATE_0100 selects output data rate 60SPS.
- Parameters:
-
[in] linef = filter type, default=MAX11410MAX11410_LINEF_enum_t::LINEF_11_SINC4 [in] rate = output data rate selection, default=MAX11410MAX11410_RATE_enum_t::RATE_0100
- Returns:
- 1 on success; 0 on failure
Definition at line 1421 of file MAX11410.cpp.
| uint8_t Configure_MUX_CTRL0 | ( | uint8_t | ainp, |
| uint8_t | ainn | ||
| ) |
Menu item 'XM'.
MUX_CTRL0 Select pins for analog input AINP and AINN
- Parameters:
-
[in] ainp = channel high side, default=MAX11410MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0 [in] ainn = channel low side, default=MAX11410MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND
- Returns:
- 1 on success; 0 on failure
Definition at line 1557 of file MAX11410.cpp.
| uint8_t Configure_MUX_CTRL1 | ( | uint8_t | idac1_sel, |
| uint8_t | idac0_sel | ||
| ) |
Menu item 'XI'.
MUX_CTRL1 Select pins for current source
- Parameters:
-
[in] idac1_sel = channel high side, default=MAX11410MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected [in] idac0_sel = channel low side, default=MAX11410MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected
- Returns:
- 1 on success; 0 on failure
Definition at line 1581 of file MAX11410.cpp.
| uint8_t Configure_MUX_CTRL2 | ( | uint8_t | vbias_ain7_ain0_bitmap ) |
Menu item 'XV'.
MUX_CTRL2 Select pins for voltage bias source
- Parameters:
-
[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0
- Returns:
- 1 on success; 0 on failure
Definition at line 1604 of file MAX11410.cpp.
| uint8_t Configure_PGA | ( | uint8_t | sigpath, |
| uint8_t | gain | ||
| ) |
Menu item 'XP'.
PGA Select Gain and Signal Path.
- Parameters:
-
[in] sigpath = signal path, default=MAX11410MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED [in] gain = gain selection, default=MAX11410MAX11410_GAIN_enum_t::GAIN_000_1
- Returns:
- 1 on success; 0 on failure
Definition at line 1445 of file MAX11410.cpp.
| uint8_t Configure_SOURCE | ( | uint8_t | vbias_mode, |
| uint8_t | brn_mode, | ||
| uint8_t | idac_mode | ||
| ) |
Menu item 'XS'.
SOURCE Configure voltage bias source, current source, burnout mode
- Parameters:
-
[in] vbias_mode = bias voltage mode, default=MAX11410MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active [in] brn_mode = burnout source mode, default=MAX11410MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled [in] idac_mode = current source value, default=MAX11410MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA
- Returns:
- 1 on success; 0 on failure
Definition at line 1532 of file MAX11410.cpp.
| MAX11410::MAX11410_CMDOP_enum_t DecodeCommand | ( | MAX11410_CMD_enum_t | commandByte ) |
Decode operation from commandByte.
- Returns:
- operation such as idle, read register, write register, etc.
Definition at line 1197 of file MAX11410.cpp.
| int get_spi_dataMode | ( | ) | const |
get SPI mode
Definition at line 1339 of file MAX11410.h.
| int get_spi_frequency | ( | ) | const |
get SPI SCLK frequency
Definition at line 1335 of file MAX11410.h.
| uint8_t Init | ( | void | ) |
Menu item '!' Initialize device.
test CMD_r000_1111_dddd_dddd_WAIT_EXT = 0x0f, //!< 0b0001111 test CMD_r001_0000_xxxx_xxxx_WAIT_START = 0x10, //!< 0b0010000
test tinyTester.DigitalIn_Read_Expect_WarnOnly(DigitalIn& digitalInPin, const char* pinName, int expect_result, const char *expect_description)
- Returns:
- 1 on success; 0 on failure
Definition at line 498 of file MAX11410.cpp.
| uint8_t IsRegReadCommand | ( | MAX11410_CMD_enum_t | commandByte ) |
Test whether a command byte is a register read command.
- Returns:
- true if command byte is a register read command
Definition at line 1228 of file MAX11410.cpp.
| uint8_t IsRegWriteCommand | ( | MAX11410_CMD_enum_t | commandByte ) |
Test whether a command byte is a register write command.
- Returns:
- true if command byte is a register write command
Definition at line 1240 of file MAX11410.cpp.
| double Measure_RTD | ( | MAX11410_AINP_SEL_enum_t | rtd_iout, |
| MAX11410_AINP_SEL_enum_t | rtd_ainp, | ||
| MAX11410_AINN_SEL_enum_t | rtd_ainn | ||
| ) |
Menu item 'R' -> rtd_ohm, rtd_degc Trigger Measurement for Resistive Temperature Device (RTD).
Example code for typical RTD measurement.
- Precondition:
- external connection REF1P-REF1N is a reference resistor
- ref1_v = reference resistance in ohms, default=4999
- rtd_filter = filter register configuration, 0x34 for LINEF_11_SINC4 RATE_0100 output data rate 60SPS
- rtd_ctrl = ctrl register configuration, 0x40 for ref0_v, 0x41 for ref1_v, 0x42 for ref2_v
- rtd_souce = souce register configuration, 0x0B for IDAC_MODE_1011_400uA
- rtd_pga = pga register configuration, 0x21 for SIG_PATH_10_PGA GAIN_001_2
- Parameters:
-
[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7 [in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8 [in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9
- Postcondition:
- AINcode[rtd_ainp]: measurement result LSB code
- rtd_ohm: measurement result resistance in Ohms
- rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
Output data rate (sample rate) is determined by filter register. filter register configuration in Measure_RTD CONV_TYPE_01_Continuous rtd_filter=0x00 -- LINEF_00_50Hz_60Hz_FIR RATE_0000 | 1.1SPS rtd_filter=0x01 -- LINEF_00_50Hz_60Hz_FIR RATE_0001 | 2.1SPS rtd_filter=0x02 -- LINEF_00_50Hz_60Hz_FIR RATE_0010 | 4.2SPS rtd_filter=0x03 -- LINEF_00_50Hz_60Hz_FIR RATE_0011 | 8.4SPS rtd_filter=0x04 -- LINEF_00_50Hz_60Hz_FIR RATE_0100 | 16.8SPS rtd_filter=0x10 -- LINEF_01_50Hz_FIR RATE_0000 | 1.3SPS rtd_filter=0x11 -- LINEF_01_50Hz_FIR RATE_0001 | 2.7SPS rtd_filter=0x12 -- LINEF_01_50Hz_FIR RATE_0010 | 5.3SPS rtd_filter=0x13 -- LINEF_01_50Hz_FIR RATE_0011 | 10.7SPS rtd_filter=0x14 -- LINEF_01_50Hz_FIR RATE_0100 | 21.3SPS rtd_filter=0x15 -- LINEF_01_50Hz_FIR RATE_0101 | 40.0SPS rtd_filter=0x20 -- LINEF_10_60Hz_FIR RATE_0000 | 1.3SPS rtd_filter=0x21 -- LINEF_10_60Hz_FIR RATE_0001 | 2.7SPS rtd_filter=0x22 -- LINEF_10_60Hz_FIR RATE_0010 | 5.3SPS rtd_filter=0x23 -- LINEF_10_60Hz_FIR RATE_0011 | 10.7SPS rtd_filter=0x24 -- LINEF_10_60Hz_FIR RATE_0100 | 21.3SPS rtd_filter=0x25 -- LINEF_10_60Hz_FIR RATE_0101 | 40.0SPS rtd_filter=0x30 -- LINEF_11_SINC4 RATE_0000 | 4SPS rtd_filter=0x31 -- LINEF_11_SINC4 RATE_0001 | 10SPS rtd_filter=0x32 -- LINEF_11_SINC4 RATE_0010 | 20SPS rtd_filter=0x33 -- LINEF_11_SINC4 RATE_0011 | 40SPS rtd_filter=0x34 --*LINEF_11_SINC4 RATE_0100 | 60SPS rtd_filter=0x35 -- LINEF_11_SINC4 RATE_0101 | 120SPS rtd_filter=0x36 -- LINEF_11_SINC4 RATE_0110 | 240SPS rtd_filter=0x37 -- LINEF_11_SINC4 RATE_0111 | 480SPS rtd_filter=0x38 -- LINEF_11_SINC4 RATE_1000 | 960SPS rtd_filter=0x39 -- LINEF_11_SINC4 RATE_1001 | 1920SPS
- Returns:
- resistance calculated from raw LSB code and reference resistance
Definition at line 1959 of file MAX11410.cpp.
| double Measure_Thermocouple | ( | MAX11410_AINP_SEL_enum_t | tc_ainp, |
| MAX11410_AINN_SEL_enum_t | tc_ainn, | ||
| MAX11410_AINP_SEL_enum_t | rtd_iout, | ||
| MAX11410_AINP_SEL_enum_t | rtd_ainp, | ||
| MAX11410_AINN_SEL_enum_t | rtd_ainn | ||
| ) |
Menu item 'TM' -> tc_v, tc_delta_degc, tc_degc Trigger Measurement for Thermocouple.
Example code for typical Thermocouple measurement. An RTD measures the "cold junction" where TC connects to the board, and the TC measures the temperature difference above the cold junction.
- Parameters:
-
[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5 [in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6 [in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7 [in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8 [in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9
- Postcondition:
- AINcode[tc_ainp]: measurement result LSB code
- tc_v: raw thermocouple voltage in Volts
- tc_delta_degc: temperature in degC above cold junction
- tc_degc: temperature in degC
- Returns:
- 1 on success; 0 on failure
Definition at line 2192 of file MAX11410.cpp.
| double Measure_Voltage | ( | MAX11410_AINP_SEL_enum_t | ainp, |
| MAX11410_AINN_SEL_enum_t | ainn | ||
| ) |
Menu item 'V' Trigger Measurement for voltage input.
Example code for typical voltage measurement.
- Precondition:
- external connection REF2P-REF2N is a reference voltage
- VRef = Voltage of REF input, in Volts
- v_filter = filter register configuration, 0x34 for LINEF_11_SINC4 RATE_0100 output data rate 60SPS
- v_ctrl = ctrl register configuration, 0x02 for bipolar REF_SEL_010_REF2P_REF2N
- v_pga = pga register configuration, 0x00 for SIG_PATH_00_BUFFERED GAIN_000_1
- Parameters:
-
[in] ainp = channel high side, default=AINP_SEL_0000_AIN0 [in] ainn = channel low side, default=AINN_SEL_1010_GND
- Postcondition:
- AINcode[ainp]: measurement result LSB code
Output data rate (sample rate) is determined by filter register. filter register configuration in Measure_Voltage CONV_TYPE_01_Continuous v_filter=0x00 -- LINEF_00_50Hz_60Hz_FIR RATE_0000 | 1.1SPS v_filter=0x01 -- LINEF_00_50Hz_60Hz_FIR RATE_0001 | 2.1SPS v_filter=0x02 -- LINEF_00_50Hz_60Hz_FIR RATE_0010 | 4.2SPS v_filter=0x03 -- LINEF_00_50Hz_60Hz_FIR RATE_0011 | 8.4SPS v_filter=0x04 -- LINEF_00_50Hz_60Hz_FIR RATE_0100 | 16.8SPS v_filter=0x10 -- LINEF_01_50Hz_FIR RATE_0000 | 1.3SPS v_filter=0x11 -- LINEF_01_50Hz_FIR RATE_0001 | 2.7SPS v_filter=0x12 -- LINEF_01_50Hz_FIR RATE_0010 | 5.3SPS v_filter=0x13 -- LINEF_01_50Hz_FIR RATE_0011 | 10.7SPS v_filter=0x14 -- LINEF_01_50Hz_FIR RATE_0100 | 21.3SPS v_filter=0x15 -- LINEF_01_50Hz_FIR RATE_0101 | 40.0SPS v_filter=0x20 -- LINEF_10_60Hz_FIR RATE_0000 | 1.3SPS v_filter=0x21 -- LINEF_10_60Hz_FIR RATE_0001 | 2.7SPS v_filter=0x22 -- LINEF_10_60Hz_FIR RATE_0010 | 5.3SPS v_filter=0x23 -- LINEF_10_60Hz_FIR RATE_0011 | 10.7SPS v_filter=0x24 -- LINEF_10_60Hz_FIR RATE_0100 | 21.3SPS v_filter=0x25 -- LINEF_10_60Hz_FIR RATE_0101 | 40.0SPS v_filter=0x30 -- LINEF_11_SINC4 RATE_0000 | 4SPS v_filter=0x31 -- LINEF_11_SINC4 RATE_0001 | 10SPS v_filter=0x32 -- LINEF_11_SINC4 RATE_0010 | 20SPS v_filter=0x33 -- LINEF_11_SINC4 RATE_0011 | 40SPS v_filter=0x34 --*LINEF_11_SINC4 RATE_0100 | 60SPS v_filter=0x35 -- LINEF_11_SINC4 RATE_0101 | 120SPS v_filter=0x36 -- LINEF_11_SINC4 RATE_0110 | 240SPS v_filter=0x37 -- LINEF_11_SINC4 RATE_0111 | 480SPS v_filter=0x38 -- LINEF_11_SINC4 RATE_1000 | 960SPS v_filter=0x39 -- LINEF_11_SINC4 RATE_1001 | 1920SPS
- Returns:
- ideal voltage calculated from raw LSB code and reference voltage
Definition at line 1803 of file MAX11410.cpp.
| uint8_t Read_All_Voltages | ( | void | ) |
Menu item '$' -> AINcode[0], AINcode[1], AINcode[2], AINcode[3], AINcode[4], AINcode[5], AINcode[6], AINcode[7], AINcode[8], AINcode[9], AINcode[10].
Measure all ADC channels in sequence. Diagnostic output pulse on GP0 for each channel's measurement. Diagnostic output pulse on GP1 for entire loop.
- Postcondition:
- AINcode[0..10]: measurement result LSB code
- Returns:
- 1 on success; 0 on failure
Definition at line 1726 of file MAX11410.cpp.
| uint8_t RegAddrOfCommand | ( | MAX11410_CMD_enum_t | commandByte ) |
Return the address field of a MAX11410 register.
- Returns:
- register address field as given in datasheet
Definition at line 1216 of file MAX11410.cpp.
| const char * RegName | ( | MAX11410_CMD_enum_t | commandByte ) |
Return the name of a MAX11410 register.
- Returns:
- null-terminated constant C string containing register name or empty string
Definition at line 1252 of file MAX11410.cpp.
| uint8_t RegRead | ( | MAX11410_CMD_enum_t | commandByte, |
| uint32_t * | ptrRegData | ||
| ) |
Read an 8-bit MAX11410 register.
CMDOP_1aaa_aaaa_ReadRegister bit is set 1 indicating a read operation.
MAX11410 register length can be determined by function RegSize.
For 8-bit register size:
SPI 16-bit transfer
SPI MOSI = 1aaa_aaaa_0000_0000
SPI MISO = xxxx_xxxx_dddd_dddd
For 16-bit register size:
SPI 24-bit or 32-bit transfer
SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000
SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd
For 24-bit register size:
SPI 32-bit transfer
SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000_0000_0000
SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd_dddd_dddd
- Returns:
- 1 on success; 0 on failure
Definition at line 1008 of file MAX11410.cpp.
| uint8_t RegSize | ( | MAX11410_CMD_enum_t | commandByte ) |
Return the size of a MAX11410 register.
- Returns:
- 8 for 8-bit, 16 for 16-bit, 24 for 24-bit, else 0 for undefined register size
Definition at line 1065 of file MAX11410.cpp.
| uint8_t RegWrite | ( | MAX11410_CMD_enum_t | commandByte, |
| uint32_t | regData | ||
| ) |
Write a MAX11410 register.
CMDOP_1aaa_aaaa_ReadRegister bit is cleared 0 indicating a write operation.
MAX11410 register length can be determined by function RegSize.
For 8-bit register size:
SPI 16-bit transfer
SPI MOSI = 0aaa_aaaa_dddd_dddd
SPI MISO = xxxx_xxxx_xxxx_xxxx
For 16-bit register size:
SPI 24-bit or 32-bit transfer
SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd
SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx
For 24-bit register size:
SPI 32-bit transfer
SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd_dddd_dddd
SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx
- Returns:
- 1 on success; 0 on failure
Definition at line 870 of file MAX11410.cpp.
| void spi_frequency | ( | int | spi_sclk_Hz ) |
set SPI SCLK frequency
Definition at line 116 of file MAX11410.cpp.
| double temperatureDegC_polynomial | ( | double | thermocouple_voltage_uV, |
| int | num_coefficients, | ||
| double | coefficients[] | ||
| ) |
Calculate temperature in degrees C from input voltage, using a given set of polynomial coefficients.
For example:
t = coefficients[0] + coefficients[1] * DMMavg + coefficients[2] * DmMMavg**2
- Parameters:
-
[in] thermocouple_voltage_uV = Thermocouple voltage in microvolts
- Returns:
- ideal temperature in degrees C, calculated from polynomial coefficients
Definition at line 2437 of file MAX11410.cpp.
| double TemperatureOfRTD | ( | double | rtd_ohm ) |
Return the physical temperature corresponding to measured resistance of a PT100 or PT1000 type Resistive Temperature Device (RTD).
- Parameters:
-
[in] rtd_ohm = RTD resistance in ohms, default=100
- Postcondition:
- rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
- Returns:
- ideal temperature in degrees C, calculated from RTD resistance in ohms
Definition at line 2158 of file MAX11410.cpp.
| double TemperatureOfRTD_PT100 | ( | double | rtd_ohm ) |
Return the physical temperature corresponding to measured resistance of a PT100 type Resistive Temperature Device (RTD).
- Parameters:
-
[in] rtd_ohm = RTD resistance in ohms, default=100
- Postcondition:
- rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
- Returns:
- ideal temperature in degrees C, calculated from RTD resistance in ohms
Definition at line 2120 of file MAX11410.cpp.
| double TemperatureOfRTD_PT1000 | ( | double | rtd_ohm ) |
Return the physical temperature corresponding to measured resistance of a PT1000 type Resistive Temperature Device (RTD).
- Parameters:
-
[in] rtd_ohm = RTD resistance in ohms, default=1000
- Postcondition:
- rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
- Returns:
- ideal temperature in degrees C, calculated from RTD resistance in ohms
Definition at line 2087 of file MAX11410.cpp.
| double TemperatureOfTC_TypeK | ( | double | tc_v ) |
Return the physical temperature corresponding to measured voltage of a type K Thermocouple (TC).
- Precondition:
- {0}.rtd_degc = cold junction temperature, in degrees C
- Parameters:
-
[in] tc_v = Thermocouple voltage in volts, default=0.0254
- Returns:
- ideal temperature in degrees C, calculated from RTD resistance in ohms
Definition at line 2356 of file MAX11410.cpp.
| double VoltageOfCode | ( | uint32_t | value_u24 ) |
Return the physical voltage corresponding to conversion result, when conversion format is determined by the CTRL register.
Does not perform any offset or gain correction.
- Precondition:
- CTRL::U_BN and CTRL::FORMAT = 0 select offset binary, 2's complement, or straight binary
- g_MAX11410_device.VRef = Voltage of REF input, in Volts
- Parameters:
-
[in] value_u24,: raw 24-bit MAX11410 code (right justified).
- Returns:
- physical voltage corresponding to MAX11410 code.
Definition at line 820 of file MAX11410.cpp.
| double VoltageOfCode_Bipolar_2sComplement | ( | uint32_t | value_u24 ) |
Return the physical voltage corresponding to conversion result, when conversion format is Bipolar mode, 2's complement.
Does not perform any offset or gain correction.
- Precondition:
- CTRL::U_BN = 0 -- Bipolar mode
- CTRL::FORMAT = 0 -- 2's complement
- g_MAX11410_device.VRef = Voltage of REF input, in Volts
- Parameters:
-
[in] value_u24,: raw 24-bit MAX11410 code (right justified).
- Returns:
- physical voltage corresponding to MAX11410 code.
Definition at line 781 of file MAX11410.cpp.
| double VoltageOfCode_Bipolar_OffsetBinary | ( | uint32_t | value_u24 ) |
Return the physical voltage corresponding to conversion result, when conversion format is Bipolar mode, offset binary.
Does not perform any offset or gain correction.
- Precondition:
- CTRL::U_BN = 0 -- Bipolar mode
- CTRL::FORMAT = 1 -- offset binary
- g_MAX11410_device.VRef = Voltage of REF input, in Volts
- Parameters:
-
[in] value_u24,: raw 24-bit MAX11410 code (right justified).
- Returns:
- physical voltage corresponding to MAX11410 code.
Definition at line 713 of file MAX11410.cpp.
| double VoltageOfCode_Unipolar | ( | uint32_t | value_u24 ) |
Return the physical voltage corresponding to conversion result, for unipolar mode.
Does not perform any offset or gain correction.
- Precondition:
- CTRL::U_BN = 1 -- Unipolar mode
- CTRL::FORMAT = x
- g_MAX11410_device.VRef = Voltage of REF input, in Volts
- Parameters:
-
[in] value_u24,: raw 24-bit MAX11410 code (right justified).
- Returns:
- physical voltage corresponding to MAX11410 code.
Definition at line 656 of file MAX11410.cpp.
Field Documentation
| uint32_t AINcode[11] |
Each channel's most recent value in LSBs.
Updated by Measure_Voltage function. Use VoltageOfCode function to convert LSBs to physical voltage. (Valid index range AINP_SEL_0000_AIN0 to AINP_SEL_1010_AVDD). AINP_SEL_1010_AVDD is a sentinel position.
Definition at line 1375 of file MAX11410.h.
| double avdd_v |
AVDD-AGND reference voltage, in Volts.
Definition at line 1355 of file MAX11410.h.
| uint32_t ctrl |
shadow of register ctrl CMD_r000_1001_dddd_dddd_CTRL
Definition at line 1358 of file MAX11410.h.
| uint32_t data0 |
shadow of read-only register data0 CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0
Definition at line 1367 of file MAX11410.h.
| int loop_limit |
When driver polls status of a pin signal or a register status bit, and there is no device physically connected, the driver must be able to halt and report failure if too many tries.
Each attempt counts down until loop_limit is reached or exceeded.
If driver seems to hang or takes too long to decide that device is not connected, reduce the futility countdown limit value.
If driver sometimes works but sometimes intermittently fails to recognize device is attached, increase the futility countdown limit.
Definition at line 1387 of file MAX11410.h.
| Callback<void(size_t, uint8_t*, uint8_t*) onSPIprint) |
Function pointer void f(size_t byteCount, uint8_t mosiData[], uint8_t misoData[])
optional onSPIprint SPI diagnostic function
Definition at line 1327 of file MAX11410.h.
| uint8_t pgaGain |
read-only pga gain 1, 2, 4, 8, 16, 32, 64, or 128 set by Configure_PGA gain index register pga CMD_r000_1110_00ss_0ggg_PGA
Definition at line 1361 of file MAX11410.h.
read-only constant list of registers to be read by menu item * with no arguments
Definition at line 1390 of file MAX11410.h.
| uint8_t readAllStatusListLen |
read-only constant number of registers to be read by menu item * with no arguments
Definition at line 1393 of file MAX11410.h.
| double ref0_v |
AIN0-AIN1 reference voltage, in Volts.
Definition at line 1346 of file MAX11410.h.
| double ref1_v |
REF1P-REF1N reference voltage, in Volts.
Definition at line 1349 of file MAX11410.h.
| double ref2_v |
REF2P-REF2N reference voltage, in Volts.
Definition at line 1352 of file MAX11410.h.
| uint8_t rtd_ctrl |
ctrl register configuration in Measure_RTD()
Definition at line 1408 of file MAX11410.h.
| double rtd_degc |
Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C.
Definition at line 1402 of file MAX11410.h.
| uint8_t rtd_filter |
filter register configuration in Measure_RTD()
Definition at line 1405 of file MAX11410.h.
| int rtd_ms |
timing delay after enable RTD bias current in Measure_RTD()
Definition at line 1396 of file MAX11410.h.
| double rtd_ohm |
RTD Resistance measurement; Thermocouple Cold Junction, in Ohms.
Definition at line 1399 of file MAX11410.h.
| uint8_t rtd_pga |
pga register configuration in Measure_RTD()
Definition at line 1414 of file MAX11410.h.
| uint8_t rtd_source |
source register configuration in Measure_RTD()
Definition at line 1411 of file MAX11410.h.
| uint32_t status |
shadow of read-only register status CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS
Definition at line 1364 of file MAX11410.h.
| double tc_degc |
Temperature calculated from Thermocouple voltage, in degrees C.
Definition at line 1432 of file MAX11410.h.
| double tc_delta_degc |
Temperature calculated from Thermocouple voltage, in degrees C.
Definition at line 1429 of file MAX11410.h.
| double tc_v |
Thermocouple voltage measurement, in Volts.
Definition at line 1426 of file MAX11410.h.
| uint8_t v_ctrl |
ctrl register configuration in Measure_Voltage()
Definition at line 1420 of file MAX11410.h.
| uint8_t v_filter |
filter register configuration in Measure_Voltage()
Definition at line 1417 of file MAX11410.h.
| uint8_t v_pga |
pga register configuration in Measure_Voltage()
Definition at line 1423 of file MAX11410.h.
Generated on Thu Jul 14 2022 04:24:15 by
1.7.2
MAX11410BOB