Jump to content

ssm

Members
  • Posts

    65
  • Joined

  • Last visited

Recent Profile Visitors

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

ssm's Achievements

Frequent Visitor

Frequent Visitor (3/4)

13

Reputation

  1. thank you @attila for the reply, it is taking that much time, but the problem is that when I feed it for example 7fffffff, I am reading it as 7fff only, so it is as if I read the upper 16 bits only, how can I read the whole 32 bits? ssm
  2. Hello everyone, I am trying to use the digital discovery board to read a series of raw 32 bits coming through pins 0 to 31. There are many examples I looked at, but all of them uses 16 bit int for the sample. I need to read them as samples, each 32 bits. I tried using the waveforms and it worked nicely. It even gave me the option to read them as unsigned numbers in decimal format which is what I need. any help is greatly appreciated, Here is a segment of my code: FDwfDigitalInInternalClockInfo(hdwf, &hzSys); FDwfDigitalInDividerSet(hdwf, hzSys/2e5); // sampling at 200KHz FDwfDigitalInSampleFormatSet(hdwf, 32); // so the size of the sample is 32 bits FDwfDigitalInBufferSizeInfo(hdwf, &cSamples); // default buffer size is set to maximum rgwSamples = new unsigned int[cSamples]; // here is the problem, the type is 16 bits, so I am reading 16 bit signed (although declared unsigned) // set trigger position to the middle FDwfDigitalInTriggerPositionSet(hdwf, cSamples/2); // not sure about this, it was in one of the examples // trigger on any pin transition FDwfDigitalInTriggerSourceSet(hdwf, trigsrcDetectorDigitalIn); FDwfDigitalInTriggerAutoTimeoutSet(hdwf, 10.0); //FDwfDigitalInTriggerSet(hdwf, 0,0,0xFFFFFFFF,0xFFFFFFFF); // I tried this, it did not work FDwfDigitalInConfigure(hdwf, true, false); // begin acquisition FDwfDigitalInConfigure(hdwf, false, true); // start do{ if(!FDwfDigitalInStatus(hdwf, true, &sts)) return 0; }while(sts != stsDone); // get the samples FDwfDigitalInStatusData(hdwf, rgwSamples, cSamples*sizeof(unsigned int)); // again the size of the sample here is 16 but this is the only thing the worked thank you Sam
  3. but all these examples are with the AD2 not the DD board, are there any c coded examples on the digital discovery board? I am getting the following error: Open automatically the first available device Device open failed Device not supported. No compatible configuration found. Update Digilent WaveForms. FDwfDeviceOpenEx when I try to open using "FDwfDeviceConfigOpen"
  4. working now, thanks a million
  5. thank you for the reply, I installed the latest version 3.21.25, btw Waveforms is working well, it is the SDK that is showing the error. Compiling the code along with the link to dwf is working fine, it is just when I execute, it shows the error above. I have iMAC i5 processor with Sonoma 14.2.1. OS
  6. Hi I am having problems running SDK on iMAC, Sonoma 14.2.1. The code is compiling fine but when I execute, I get the following: dyld[XXX]: Library not loaded: @rpath/dwf.framework/Versions/A/dwf Reference from: ... Reason: no LC_RPATH's found any ideas? thanks sm
  7. Hi @attila is there a place where I can download these SDK examples without the need to download the WF? I already have the WF working with AD2, thanks sm
  8. Hi @attila thank you for the great help, I am trying to compile my SDK code on a new linux ubuntu machine and I am getting the following: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libdwf.so: undefined reference to `DmgtConfigureFPGA' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libdwf.so: undefined reference to `DstmIO32' collect2: error: ld returned 1 exit status make: *** [Makefile:3: all] Error 1 any help is highly appreciated ssm
  9. thank you for the help, it is working now I added Wait(2) after the two line: FDwfAnalogInChannelRangeSet(hdwf, 0, 50.0); FDwfAnalogInChannelOffsetSet(hdwf, 0, 5.0); wait(2)
  10. thank you @attilafor your reply, should I do it like that? FDwfAnalogInChannelRangeSet(hdwf, 0, 50.0); wait(2) FDwfAnalogInChannelOffsetSet(hdwf, 0, 5.0); btw I am waiting 2 sec before configuration and after configuration
  11. yes, that is correct, note that the signal is 5+/-0.1 V, since it is greater than 5v I put the range to be 50V, otherwise I am not using the full range of 50V additional note, the following is working fine: the signal pk2pk is +/- 0.1V and the offset is 4.8 V I am using the following code: FDwfAnalogInChannelRangeSet(hdwf, 0, 0.2); FDwfAnalogInChannelOffsetSet(hdwf, 0, 4.8);
  12. thank you @attila for the great help, I have a sine wave signal with an offset, the signal pk2pk is +/- 0.1V and the offset is 5 V I am using the following code: FDwfAnalogInChannelRangeSet(hdwf, 0, 50.0); FDwfAnalogInChannelOffsetSet(hdwf, 0, 5.0); but I am getting the signal to be cropped at around the 5V the attached image shows the output signal
  13. Hi @attila I have a question regarding this command line: FDwfAnalogInChannelRangeSet(hdwf, -1, 8); if I have my range to be between 3.5 V and 4 V, what value should I put here, 8V? will the bigger value, i.e. 8V instead of 4 V, reduce the precision of the value read by the scope? thank you for the help ssm
×
×
  • Create New...