mbed toggles some pins ,transitions of 40nsec are measured between different pin changes .

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalOut red(p5);
00004 DigitalOut green(p6);
00005 DigitalOut blue(p7);
00006 DigitalOut flag(p8);
00007 int main() {
00008     while (1) {
00009         flag = !flag;  // toggle pin 8 so we have a period indication....
00010         // check period
00011         red=1;//  these transitions take about 40 nsec
00012         blue=1;
00013         green=1;
00014         blue=0;  // 
00015         green=0;//
00016         red=0; //
00017         red=1;    // this transition is possibly too short for my  analyser (24Msamples/sec= 40 nsec resolution ) to be seen 
00018         red=0;     // ??
00019 
00020         wait(0.001);
00021     }
00022 }