Jump to content

attila

Technical Forum Moderator
  • Posts

    6,668
  • Joined

  • Last visited

Posts posted by attila

  1. Hi @Artem Goncharuk

    I'm not sure what you are referring exactly, but there should be no difference when used under Mac, Windows and Linux
    A screenshot would help to better understand the question.

    For Demo and older device AD2,1... the capture date&time is a software stamp.
    Newer device AD3, DigitalDiscovery, ADP3X50... have an "RTC" which stores the trigger time (T0) with system frequency resolution.
    With this, each capture data&time has 8-10ns relative precision which can be used for more accurate measurements. 
     

  2. Hi @Piotr Rzeszut

    1. If I remember correctly without T1 (reference clock for AD3, ADP3X50...) a warning is displayed in the instruments and there is a 2nd Status button (with OK, ERror..) in the status-bar for the 2nd device.
    I'll have see how is the lack of T2 handled, if we can show warning for this.

    2. For the moment dual supports is in: Scope, Spectrum, Wavegen, Logic, Patterns, StaticIO
    We could eventually add it for Network but the measurements in this can be very sensitive on the ns/ps phase differences, it could give inaccurate phase measurements.
    Impedance only uses two channels, so this does not need it.
    I don't think it worth the effort for Tracer.
    For some Protocol features it would not be possible to implement and it makes no sense since these use few DIO lines.

    3. For 'scriptability' the indexing is continued for the 2nd device channels, Scope/Wavegen 3,4 or 5,6,7,8 and DIO 16...31 or 32...63 with labels all around '+' indicating 2nd device, (+Osc1) (+W1) +DIO0...

    Thank you for the feedback. 

  3. Hi @krbvroc1

    I don't know how did you configure the capture.
    Such scenarios should be detected with trigger, like a timeout trigger on SDA.
    On I2C level this is usually caused by a glitch on the SCL which the slave interprets as additional pulse so the master-host goes out of bit sequence. Like the master wants to generate nak or stop, where the slave should have released the SDA, but the slave already wants to send the next word bits, holding the SDA low.
    To recover from this, the master should pulse the SCL line until the SDA is released then generate a stop.

    image.png

  4. Hi @s4msepi0l

    image.png

    // rgData: input, raw digital sample array
    // rgValue: output, decoded data array
    // rgFlag: output, decoded flag array
    
    var c = rgData.length // c = number of raw samples
    var pClock = false; // previous cock signal level
    var iStart = 0;     // used to keep track on word start index
    var cByte = 0;      // byte count per transmission
    var cBits = 0;      // bit counter
    var bValue1 = 0;     // value variable
    var bValue2 = 0;     // value variable
    
    for(var i = 0; i < c; i++){ // for each sample
        var s = rgData[i]; // current sample
        var fSelect = 1&(s>>0); // pin0 is the select signal
        var fClock = 1&(s>>1); // pin1 is the clock signal
        var fData = 1&(s>>2); // pin2 is the data signal
        
        if(fSelect != 0){ // select active low
            // while select inactive reset our counters/variables
            iStart = i+1; // select might become active with next sample
            cByte = 0;
            cBits = 0;
            bValue1 = 0;
            bValue2 = 0;
            pClock = false;
            continue;
        }
        if(pClock == 0 && fClock != 0){ // sample on clock rising edge
            if(cBits<16){ // MSbs
                bValue1 <<= 1; // serial data bit, MSBit first
                if(fData)  bValue1 |= 1;
            }else{ // LSbs
                bValue2 <<= 1; // serial data bit, MSBit first
                if(fData)  bValue2 |= 1;
            }
            
            cBits++;
            if(cBits==48){ // when got the 8th bit of the word store it
                cByte++;
                // store rgValue/Flag from word start index to current sample position
                for(var j = iStart; j < i; j++){
                    // Flag change will be visible on plot even when data remains constant.
                    // This is useful in case we get more consecutive equal values.
                    rgFlag[j] = (1+(cByte&1))|(bValue1<<16);
                    rgValue[j] = bValue2;
                }
                iStart = i+1; // next word might start after this sample
                cBits = 0;  // reset bit count for the next byte
                bValue1 = 0; // reset value variable
                bValue2 = 0; // reset value variable
            }
        }
        pClock = fClock; // previous clock level
    }

     

    // value: value sample
    // flag: flag sample
    
    function Value2Text(flag, value){ // 16bit + 32bit
      switch(flag){
        case 0: return "X";
        default: {
            var sz = "00000000"+(value.toString(16).toUpperCase());
            sz = sz.substring(sz.length-8);
            sz = "0000"+((flag>>16).toString(16).toUpperCase())+sz;
            sz = sz.substring(sz.length-12);
            return "0x"+sz;
        }
      }
    }
    Value2Text(0x10000,2)

     

×
×
  • Create New...