Example outputting saw-tooth waveform on DAC

Dependencies:   mbed

Revision:
0:1d3353c6dd1b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 10 15:15:06 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+
+AnalogOut my_output(PA_4);
+
+Serial pc(D8, D2);
+
+int x=0;
+
+uint16_t aout;
+
+
+int main() {
+    while(1) {
+        x=0;
+        while( x<4096)
+        {
+            my_output.write_u16(x);
+            x=x+1;
+           wait_us(50);
+        }
+        
+     
+        //pc.printf("%d\n\r", x);
+      
+    }
+}