Simple demo to check the DAC output by a DVM. The output voltage steps up by 0.42 V in each 5 s.

Dependencies:   mbed

Revision:
0:6dbf8446ecb2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 18 15:26:39 2015 +0000
@@ -0,0 +1,20 @@
+/** 05_dac12_demo
+ * Simple demo to check the DAC output by a DVM
+ * The output voltage steps up in each 5 seconds
+ * by about 0.42 V (assuming VREFH = 3.3V)
+ */
+
+#include "mbed.h"
+
+AnalogOut aout(PTE30);
+
+int main()
+{
+
+    while(1) {
+        for (uint16_t i = 0; i < 0xffff; i += 0x2000) {
+            aout.write_u16(i);
+            wait(5);
+        }
+    }
+}
\ No newline at end of file