Library to work with the LDC1000 from Texas Instruments

Dependencies:   FastPWM

Dependents:   LDC1000_test

LDC1000

This library was written to interface to Texas Instruments' LDC1000 in order to perform inductance measurement. This libary needs a SPI peripheral on your mbed device to talk to the LDC1000.

Clock

The LDC1000 needs a high speed clock for its internal frequency counter. In order to provide this clock, the FastPWM library is used. This may change the behaviour of other PWM channels, please be aware of that, and read the FastPWM documentation to understand the implications.

Unsupported

Not supported (yet):

  1. Setting the RpMAX and RpMIN values
  2. Setting the interrupt pin functionality
Revision:
7:7f1522ad3df5
Parent:
6:5b6ad98d6436
Child:
8:b5fb9681869c
--- a/LDC1000.cpp	Tue May 26 14:43:33 2015 +0000
+++ b/LDC1000.cpp	Tue May 26 14:50:16 2015 +0000
@@ -18,7 +18,7 @@
     _spiport.frequency(1E6);
     _cs_pin.write(1);
     wait_us(100);
-    //mode(LDC_MODE_STANDBY);
+    mode(LDC_MODE_STANDBY);
     setFrequency(f_external);
    wait(0.1);
     //setOutputPower(LDC_AMPLITUDE_4V);
@@ -27,19 +27,19 @@
     //setWatchdog(5000);
     
 // Write comando's like in EVM start log:
-    writeSPIregister(0x0B,0x00);
-    writeSPIregister(0x01,0x0E);
-    writeSPIregister(0x02,0x3C);
+    //writeSPIregister(0x0B,0x00);
+    //writeSPIregister(0x01,0x0E);
+    //writeSPIregister(0x02,0x3C);
     writeSPIregister(0x03,0x15);
     writeSPIregister(0x04,0x17);
     writeSPIregister(0x05,0x00);
-    writeSPIregister(0x06,0x50);
-    writeSPIregister(0x07,0x14);
-    writeSPIregister(0x08,0xC0);
-    writeSPIregister(0x09,0x12);
-    writeSPIregister(0x0A,0x04);
+    //writeSPIregister(0x06,0x50);
+    //writeSPIregister(0x07,0x14);
+    //writeSPIregister(0x08,0xC0);
+    //writeSPIregister(0x09,0x12);
+    //writeSPIregister(0x0A,0x04);
 //    writeSPIregister(0x0C,0x01);
-    writeSPIregister(0x0B,0x01);
+    //writeSPIregister(0x0B,0x01);
 
     mode(LDC_MODE_ACTIVE);
 }