Leaderboard


Popular Content

Showing content with the highest reputation on 08/12/19 in all areas

  1. 1 point
    jpeyron

    VGA example for Digilent Nexys A7?

    Hi @john_joe, It is possible to get a VGA input but the hardware needs to be configured for that. The DIR pin is tied to VDD so in this case the Pmod VGA is set to output as shown on the schematic here and here on the IC data sheet. I believe you would need to alter the DIR connection on the Pmod VGA to ground to have it usable for input. So you are aware this would void the Pmod VGA's warranty. Here and here are a few threads that discuss VGA input as well. best regards, Jon
  2. 1 point
    jpeyron

    VGA example for Digilent Nexys A7?

    Hi @john_joe, Could you please elaborate more on your project. The Pmod VGA (resource center) facilitates a VGA connector from two pmod ports. There are a couple of Pmod VGA HDL projects linked on the bottom of the resource center. Here is a non-digilent product that might be helpful. best regards, Jon
  3. 1 point
    jpeyron

    VGA example for Digilent Nexys A7?

    Hi @kwilber, I really like this VGA demo originally made by a previous co-worked for the zybo. It does a few different tasks like a move box in the lower left of the screen. The horizontal/vertical black and white(largest change in color) lines also helped determine resolutions usable by the Pmod VGA without having issues. thank you, Jon
  4. 1 point
    attila

    Custom protocol script in Logic Analyzer

    Please try again, it should work on Windows, OS X and Linux too. The "var"s were avoided to simplify the example. Beside the Math.* and other standard JS stuff the Custom interpreter uses the: rgData, rgValue, rgFlag, hzRate (sample rate) Here you have an example that shows MOSI and MISO under one channel, select is active low, MSBits first, shows "updateFoo" for 0xFF second MOSI byte... Decoder: // 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 byte start index var cByte = 0; // byte count per transmission var cBits = 0; // bit counter var bMosi = 0; // value variable var bMiso = 0; // value variable for(var i = 0; i < c; i++){ // for each sample var s = rgData[i]; // current sample var fSelect = s & (1<<2); // pin2 is the select signal var fClock = s & (1<<0); // pin0 is the clock signal var fMosi = s & (1<<1); // pin1 is the MOSI data signal var fMiso = s & (1<<3); // pin3 is the MISO 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; bMosi = 0; bMiso = 0; pClock = false; continue; } if(pClock == false && fClock == true){ // sample on clock rising edge bMosi <<= 1; // serial data bit, MSBit first if(fMosi) { bMosi |= 1; } bMiso <<= 1; // serial data bit, MSBit first if(fMiso) { bMiso |= 1; } cBits++; if(cBits==8){ // when got the 8th bit store it cByte++; // store rgValue/Flag from byte 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] = cByte; rgValue[j] = (bMosi<<16) | bMiso; } iStart = i+1; // next byte might start after this sample cBits = 0; // reset bit count for the next byte bMosi = 0; // reset value variable bMiso = 0; // reset value variable } } pClock = fClock; // previous clock level } Value 2 text: // value: value sample // flag: flag sample function Value2Text(flag, value){ // in this example we store two number in value var bMosi = value >> 16; var bMiso = value & 0xFF; // in this example the flag indicates the byte index of the transmission if(flag==0){ return "X"; }else{ var szMosi = "MOSI: h"+bMosi.toString(16); var szMiso = "MISO: h"+bMiso.toString(16); if(flag == 2 && bMosi == 0xFF){ szMosi = "MOSI: updateFoo"; } return szMosi+"\n"+szMiso; } }