Blinking Blues Quick Version

From OpenCircuits
Jump to navigation Jump to search

Blink Broken[edit]

The blink program ( lightly modified ) gives unexpected results.


Reduced version of issues raised at


The Analyzer Did It[edit]

Right now it looks like the problem is the dangerous prototype logic sniffer. I will be editing all of this later and contact the dangerous prototype folks. Go back and look at Blinking Blues

The Code[edit]

The code in its entirety is:


const int ledPin=6;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
   while ( true ) {
       digitalWrite( ledPin, HIGH );   // turn the LED on 
       delayMicroseconds( 5000 );      // wait 
       digitalWrite( ledPin, LOW );    // turn the LED off
       delayMicroseconds( 5000 );      // wait 
    }
}

Results[edit]

In the gif below focus on channel 3, that is pin6 The cursor measurement for 1,2,3,4 are all about 10.1 ms, a value which seems "right". But at cursor 5,6 you can see a pulse of period 11.060 ms. This is the "glitch" ( bad term here ) that I am talking about. It repeats about every 80 ms. This sort of behavior with some different details has been present in every test I have conducted.

I did look at the rise and fall time on my scope, it is about 20 ns. I cannot catch this stretched pulse on my scope, but looking for a 1 ms discrepancy across 80 ns is not really easy on a scope. I did use the single sweep option and mess with a bunch of the variables. Right now I trust the logic analyzer for this more than the scope, you can try to present an argument for why I should not. I have to confess I have not tried my old 100 mhz analog scope on this guy.


BE 1.gif