AnalogOut Test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ryood
Date:
Tue Nov 21 14:52:57 2017 +0000
Parent:
1:28154deb13f1
Commit message:
Impl. F767

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 28154deb13f1 -r bc6bbf995c46 main.cpp
--- a/main.cpp	Mon Jul 10 03:07:22 2017 +0000
+++ b/main.cpp	Tue Nov 21 14:52:57 2017 +0000
@@ -1,11 +1,18 @@
 #include "mbed.h"
 
+/*
+// Nucleo F303
 AnalogOut my_output1(A5);
 AnalogOut my_output2(A4);
 AnalogOut my_output3(A3);
+*/
+
+// Nucleo F446/F767
+AnalogOut my_output1(PA_4);
+AnalogOut my_output2(PA_5);
 
 #define PI        (3.141592653589793238462)
-#define AMPLITUDE (1.0)    // x * 3.3V
+#define AMPLITUDE (0.8)    // x * 3.3V
 #define PHASE     (PI * 1) // 2*pi is one period
 #define RANGE     (0x7FFF)
 #define OFFSET    (0x7FFF)
@@ -30,7 +37,7 @@
         for (int i = 0; i < BUFFER_SIZE; i++) {
             my_output1.write_u16(buffer_sine[i]);
             my_output2.write_u16(buffer_cosine[i]);
-            my_output3.write_u16(buffer_saw[i]);
+            //my_output3.write_u16(buffer_saw[i]);
         }
     }
 }
diff -r 28154deb13f1 -r bc6bbf995c46 mbed.bld
--- a/mbed.bld	Mon Jul 10 03:07:22 2017 +0000
+++ b/mbed.bld	Tue Nov 21 14:52:57 2017 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/22da6e220af6
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/e7ca05fa8600
\ No newline at end of file