8-Bit Single/Dual SPI Digital POT with Non-Volatile Memory

Fork of MCP4261 by TeamElectronics

Revision:
2:1e4469bdbed9
Parent:
1:935321af7311
diff -r 935321af7311 -r 1e4469bdbed9 MCP4261.h
--- a/MCP4261.h	Sun Jun 28 10:24:49 2015 +0000
+++ b/MCP4261.h	Wed Jan 20 10:54:05 2016 +0000
@@ -31,10 +31,10 @@
 
 #define TCON_ADDR       0x04       // Controls the state of each resistor network terminal connection.   
 #define STATUS_ADDR     0x05       // Status (STATUS) Register, This register contains 5 status bits. WiperLock bits, Shutdown bit, Write Protect bit, EEPROM write cycle.
-#define VW0_ADDR        0x02       // Volatile Wiper 0
-#define VW1_ADDR        0x03       // Volatile Wiper 1
-#define NVW0_ADDR       0x04       // Non Volatile Wiper 0
-#define NVW1_ADDR       0x05       // Non Volatile Wiper 1
+#define VW0_ADDR        0x00       // Volatile Wiper 0
+#define VW1_ADDR        0x01       // Volatile Wiper 1
+#define NVW0_ADDR       0x02       // Non Volatile Wiper 0
+#define NVW1_ADDR       0x03       // Non Volatile Wiper 1
 
 // DATA EEPROM locations has the address from 0x06 to 0x0F 
 
@@ -72,17 +72,6 @@
      */
     MCP4261(SPI& spi, PinName nCs, PinName nWP, PinName nSHDN);
     
-    /** Create an instance of the MCP4261 connected with SPI pins.
-     *
-     * @param nWP The Hardware Write Protect Control pin.
-     * @param nSHDN The Shutdown pin.
-     * @param mosi The SPI Master Output, Slave Input pin.
-     * @param miso The SPI Master Input, Slave Output pin. 
-     * @param sck The SPI Serial Clock pin.
-     * @param nCs The SPI chip select pin.
-     */
-    MCP4261(PinName mosi, PinName miso,PinName sck, PinName nCs, PinName nWP, PinName nSHDN);
-    
     /** Create an instance of the MCP4261 connected via specfied SPI instance (use wthen SHDN is linked to Global reset).
      *
      * @param spi The mbed SPI instance (make in main routine)
@@ -179,9 +168,10 @@
 
 private:
     SPI& _spi;
+    DigitalOut _nCs;
     DigitalOut _nWP;
     DigitalOut _nSHDN;
-    DigitalOut _nCs;
+    
         
     char _command_byte;