Driver for the Microchip MCP432x series of ADCs.

Dependents:   AKDP-RevD7_014

Fork of MCP342x by Osamu Koizumi

Revision:
5:0ecc54b7fb2e
Parent:
4:6215f50b3297
Child:
6:ed68eca49e70
--- a/mcp342x.cpp	Sat May 14 00:06:26 2016 +0000
+++ b/mcp342x.cpp	Thu Aug 04 00:09:17 2016 +0000
@@ -21,8 +21,12 @@
 
 MCP342X::Status MCP342X::init() {
     Status status;
+    
+    // general call reset (software POR)
+    char general_reset = 0x06;
+    connection->write(0, &general_reset, LEN_ONE_BYTE);
+    
     int16_t val = 0;
-    
     // Reads the current configuration.
     if ((status=readData(&val, &currentConfig)) != SUCCESS) {
         return status;