Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 11:de680c2510a6, committed 2017-01-04
- Comitter:
 - JovanEps
 - Date:
 - Wed Jan 04 16:33:24 2017 +0000
 - Parent:
 - 10:51adb7641cd7
 - Commit message:
 - Final version 1.0.1
 
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Wed Jan 04 16:26:30 2017 +0000
+++ b/main.cpp	Wed Jan 04 16:33:24 2017 +0000
@@ -20,17 +20,18 @@
     while(1) {
         // Pattern and port setting speed benchmark
         timer.start();
-        // Messure loop time for 1k runs
+        // Measure loop and value setting time for 1k runs
         loop_vreme = timer.read_us();
         for ( i = 0; i <= 999; i++ ) {
-            noop = i;
+            noop = i; 
         }
         // -----
         loop_vreme = timer.read_us() - loop_vreme;
         timer.reset();
+        // Measure 10 bit sequence pattern
         vreme = timer.read_us();
         for ( i = 0; i <= 999; i++ ) {
-            PD5 = 1; // D5 go low 1 go LOW in next 74..75ns as Tf propagates signal on osciloscope
+            PD5 = 1; // D5 go low 1 go LOW in next 69..75ns as Tf propagates signal on osciloscope
             PD5 = 1; // D5 go low 2
             PD5 = 1; // D5 go low 3
             PD5 = 0; // D5 go inv-high on SN74vhc14 - >1.6..2.4V < 1.75ns
@@ -44,7 +45,7 @@
         vreme = timer.read_us() - vreme;
         wait_us(0.2);
         pc.printf("Port set time (single)... %6.2f ns \t tested on for: %d runs \n", ( float ) ( vreme - loop_vreme ) / 10, i * 10 ); //1000x10=10k sets of PD5 div 10 for ns
-        pc.printf("\n %d \n\n", noop);
+        pc.printf("\n %d \n\n", noop+1);
         timer.stop();
 
         /*  // Alternative
@@ -78,13 +79,13 @@
 
     /*
     while(1) {
-      //  PD7 = 1; // D7 go high in Tr ~75ns
+      //  PD7 = 1; // D7 go high in Tr ~69..75ns
         //PD13 = 1; // D13 go high has delay of
       //  myled = 1;
 
         PD5 = 0; // D5 go high
         //wait(0); // 1ns - exclude, we need as fast as we can get
-      //  PD7 = 0; // D7 go low in next 74ns
+      //  PD7 = 0; // D7 go low in next 69..74ns
         //PD13 = 0; // D13 go high
       //  PD7 = 1;
         //PD13 = 1; // D13 go high