I try to receive data with an Analog Discovery Kit (AD) from a FPGA written with my own protocol. Three signals enter the AD: Clock, Trigger, and Data. At the rising edge of the trigger, I would like to sample 16 bits from the data synchronous to the clock (around 20 Mhz). How can this be done with an AD and SDK? With an FPGA writing this is a matter of minutes, but some how I cannot wrap my head around this. Below is the code I am using, but sadly it returns only 0x0000 or 0x000.
How to receive data in this way?
Cheer,
VonPuffelen
FDwfDigitalInConfigure(AnalogDiscoveryHandle,false,true);// start sampling
STS sts;unsignedint timer =0;// wait for receivingdo{if(!FDwfDigitalInStatus(AnalogDiscoveryHandle,true,&sts))// pull for trigger event{
printf("AcquireErro(42)");return42;}
timer++;}while((sts != stsDone)&&(timer <0x1FFF));FDwfDigitalInStatusData(AnalogDiscoveryHandle, data, length*sizeof(unsignedshort));// fetch data from IO buffer.FDwfDigitalInConfigure(AnalogDiscoveryHandle,false,false);// stop sampling
Question
vonPuffelen
I try to receive data with an Analog Discovery Kit (AD) from a FPGA written with my own protocol. Three signals enter the AD: Clock, Trigger, and Data. At the rising edge of the trigger, I would like to sample 16 bits from the data synchronous to the clock (around 20 Mhz). How can this be done with an AD and SDK? With an FPGA writing this is a matter of minutes, but some how I cannot wrap my head around this. Below is the code I am using, but sadly it returns only 0x0000 or 0x000.
How to receive data in this way?
Cheer,
VonPuffelen
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.