Liangzhen Lai / Mbed 2 deprecated DDRO_software

Dependencies:   mbed

Revision:
0:c928c2d8bd02
Child:
1:acf14b6dd1be
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 02 01:34:55 2012 +0000
@@ -0,0 +1,41 @@
+#include "power_up.h"
+#include "scan.h"
+using namespace std;
+
+DigitalOut RESET (p21);
+
+Serial s(USBTX, USBRX);
+
+int main() {
+    s.printf("DDRO_software starts ...\r\n");
+    s.printf("powerReset() ...\r\n");
+    //reset
+    powerReset();
+    
+    s.printf("powerUp() ...\r\n");
+    //power up
+    powerUp();
+    
+    PLL clk;
+    s.printf("testPLL() ...\r\n");
+    
+    RESET = 0;
+    wait(1);
+    RESET = 1;
+    for (int i=125;i<160;i+=5)
+    {
+        clk.setPLL(i);
+        double out=(double)5000*(double)i/1024;
+        s.printf("Setting PLL, output should be %e k\n", out);
+        wait(5);
+    }
+    
+    
+    
+    
+    s.printf("powerDown() ...\r\n");
+    //power down
+    powerDown();
+    
+    s.printf("DDRO_software ends.\r\n");
+}