vinodcxlv

Newcomers
  • Content Count

    7
  • Joined

  • Last visited

About vinodcxlv

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @attila What change would we need to do if we'd like to clock data in on the falling edge of the clock? Thanks
  2. Hello @attila I think there's a slight misunderstanding. The issue I'm having is that the select signal is toggled low before the data/clock signal. I saw somewhere on the forums that the select signal can be synchronized with the data/clock signals by accessing the pattern generator through the script tool. I am trying to do something similar to what you did in the project attached below: Only difference would be that the data signal would depend on this part of the code var rgFile = (""+FileRead("~/Desktop/default.txt")).split(", "); // 1, 2, 3 var rgSend = [] rgFile.forEach(function(v){rgSend.push(v<<2)}) Thank you in advanced!
  3. Hello @attila If we use the Script tool to write to the DAC over SPI how would you initialize the Clock (polarity, phase, polarity) and Active signals. I see that in the examples in the Protocol Analyzer custom the user would initialize the Active signal low via "Select.Active.value = 0" is this the same for the Script Tool? Also how would you go about setting your DIO pins for your 3 signals? Also I noticed there's a delay between the time the select signal is pulled low and data & clock signals are outputted. Is there a way to output the clock and data signals, implement a delay then draw the select signal low?
  4. Hello @attila I forgot to turn on my notifications for this post, I was able to implement my logic using two for loops but your example using the read and for each functions will simplify my code tremendously. Thank you so much! I had another question, is there anyway of incorporating the voltmeter function (or is it just for the electronic explorer?) so that the instrument reads the analog voltage of each converted 16 bit word into a register or a file for post analysis? You've been tremendous help, thanks again!
  5. Hello @attila I've provided a screenshot of the logic I want to implement and a screenshot of the script I have came up with. However, I am receiving "undefined." Am I implementing to code correctly or is there something I am missing? If there was an issue with my syntax then the window would output something along the lines of "Syntax Error" correct?
  6. Thank you for the feedback. To read the file in the custom tab would I just need to comment rgData variable and provide the path? Does the file need to be JSON or can I just have my configurations (clock, select and data) in a text file?
  7. Hello, What is the difference between the "custom" and "sensor" tabs on the Protocol Analyzer in Waveforms? Are they used together? Where the custom tab gives the user the ability to write their own custom SPI Protocol and use it in the Sensor tab? And can I use them to develop a script that would control an SPI compatible 12-bit DAC. The goal is to read the 12 bit digital data from a file, with data ranging from 0x0000 to 0xFFFF (16 bits technically since the 2 MSB determine the DAC Power Modes and the 2 LSB are don't cares) and outputting that data from the Analog Discovery 2 to the 12-bit DAC