Test application for getting the Nucleo F0 30 board to work with Evan's prototype LED board.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
bgrissom
Date:
Tue Aug 05 23:11:15 2014 +0000
Parent:
3:6f12c437ab88
Child:
5:9a662dec2ddb
Commit message:
This was what I demo'd for Evan a few weeks ago. We are about to make some changes to get it to work on a full 18x18 board.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jul 11 21:10:04 2014 +0000
+++ b/main.cpp	Tue Aug 05 23:11:15 2014 +0000
@@ -32,18 +32,17 @@
     pwmout_t outs;
     pwmout_init(&outs, D9);
     pwmout_period_ns(&outs, 2); // 24 MHz (not very clean on the scope)
-    //pwmout_period_ns(&outs, 40); // 1.2 MHz on the scope
+    // pwmout_period_ns(&outs, 40); // 1.2 MHz on the scope
     pwmout_write(&outs, 0.5f);
 
     int ret = OK; // Return value
     int i = 0;
 
-    printf("14:53\n");
+    printf("17:10\n");
 
     while (1) {
-        //wait_ms(50);
         for (i=0; i<16; i++) {
-            ret = cmd_S0(0x00FF);
+            ret = cmd_S0(0xFFFF);
             // ORIG: ret = cmd_S0(0xFFFF);
             if (ret != OK) {
                 printf("ERROR cmd_S0()\n");
@@ -80,15 +79,16 @@
             // For a graphical reminder on polarity and phase, visit:
             //     http://www.eetimes.com/document.asp?doc_id=1272534
             gSpiPtr->format(16, 0);
-            //gSpiPtr->frequency(1000000);  // 1.5 MHz on the scope
+            // gSpiPtr->frequency(1000000);  // 1.5 MHz on the scope
             gSpiPtr->frequency(24000000); // 24 MHz
             gSpiMode = true;
         }
         gbbTRANS = 0; // Like an SPI slave select
         gSpiPtr->write(value);
         gbbTRANS = 1; // Like an SPI slave select
-        wait_us(1);
-        gbbTRANS = 0; // Set back low
+        // LONGTERM OPTIMIZATION: Evan suggests setting it 
+        // wait_us(1);
+        // gbbTRANS = 0; // Set back low
         return OK;
 }