Library for the MAX11300

Dependents:   MAX_IOT_KIT MAX_IOT_KIT

Fork of MAX11300 by Maxim Integrated

The MAX11300/01/11/12 are configurable mixed signal integrated circuits. The MAX11300/11 offer a SPI interface while the MAX11301/12 offer an I2C interface. The MAX11300/01 are 20 port devices while the MAX11311/12 are 12 port devices.

This library supports the family of parts by providing member functions that can manipulate the GPIO, ADC, DAC, and analog switches of the device, after it has been configured. For configuration of the device, this library requires a header file that can be generated by the MAX11300/01/11/12 Configuration Software. The configuration software can be found at the following link.

https://www.maximintegrated.com/en/products/analog/data-converters/analog-to-digital-converters/MAX11300.html/tb_tab2

Include the generated MAX113XXHex.h file into your project and update the #include in MAX113XX_Pixi.h.

Revision:
17:658202c79f33
Parent:
14:cc5349db13a3
Child:
18:8ee1928ffe6c
--- a/MAX113XX_Pixi.h	Thu May 11 20:28:40 2017 +0000
+++ b/MAX113XX_Pixi.h	Sat May 13 00:11:38 2017 +0000
@@ -36,7 +36,7 @@
 
 
 #include "mbed.h"
-#include "MAX11300Hex.h"
+#include "MAX11301Hex.h"
 
 
 /**
@@ -315,11 +315,22 @@
 
 public:
 
+    ///I2C Addresses
+    static const uint8_t I2C_ADRS0 = 0x38;
+    static const uint8_t I2C_ADRS1 = 0x39;
+    static const uint8_t I2C_ADRS2 = 0x3A;
+    static const uint8_t I2C_ADRS3 = 0x3B;
+    static const uint8_t I2C_ADRS4 = 0x3C;
+    static const uint8_t I2C_ADRS5 = 0x3D;
+    static const uint8_t I2C_ADRS6 = 0x3E;
+    static const uint8_t I2C_ADRS7 = 0x3F;
+    
     ///@brief MAX113XX_I2C Constructor
     ///@param[in] i2cBus - reference to I2C bus for this device
     ///@param[in] device - pixi device; MAX11300, MAX11301,...
     ///@param[in] cnvrt - pin to be used for convert
-    MAX113XX_I2C(I2C &i2cBus, MAX113XX_Pixi::Device_e device, PinName cnvt=NC);
+    MAX113XX_I2C(I2C &i2cBus, MAX113XX_Pixi::Device_e device, uint8_t i2cAdrs, 
+    PinName cnvt=NC);
     
     ///@brief MAX113XX_I2C Destructor
     ~MAX113XX_I2C();
@@ -327,6 +338,7 @@
 private:
 
     I2C &m_i2cBus;
+    uint8_t m_w_adrs, m_r_adrs;
     
     virtual void writeRegister(uint8_t reg, const uint16_t data);