12-08-2016 09:41 AM
Hello,
with a DMM i execute a highspeed measurement of an DUT that represent bits.
Attached a file with the data.
Now i want to convert this into 0 and 1s.
The binary string should be in this case 001000100. At the 1 there the sinus is longer in the upper area.
How can this be done?
Thanks for help
12-08-2016 10:38 AM
@OnlyOne wrote:
...
How can this be done?
You have bogus info at the begining and the end that I tossed.
It looks like a "high" is greter that 11.3.
Then guessing the data is over-sampled by a factor of 4 I reshaped the array and averaged goups of four samples and then compared to see it was greater than 0.8.
A lot a fudging but the answer is correct.
Not very useful but I enjoyed the riddle.
Ben
12-09-2016 04:04 AM
Hi Ben,
thank you for the code.
Meanwhile i modified my example and have now two types of sourcedata where different bits are set to 1.
In the code the are two array controls and and a boolean slider to select between the two arrays. After this your code is coming.
A description of the arrays says::
0 = array goes low -> high
1 = array goes low -> high -> high
Which means the
Data_U should return 0100100
Data_L should return 0010100
Is there a way to modify your code to get these results?
Thanks for the help again
BR
T
12-09-2016 06:39 AM
...or is it perhaps saver to measure the pulse-durations to get the binary result?
Attached a new file with data as my previous upload contained two times the same values in the array 😞
12-09-2016 08:04 AM
Hi OnlyOne,
What I posted was just a quick hack. If you want to follow-up on this effort, rather than re-invent the wheel I suggest you do some searching and research on the theory behind serial interfaces. The last time I tokk a "deep dive" into that subject ( ti was the tech manual for a FastCom ESCC-PCI Asycronous serial interface) it over-sampled the dat by a factor of 10. Additionally you will need a way to properly "frame the data" which is the term used to describe the logic required to determine where in a signal a byte starts and stops. In serial lingo that is the "Start Bit". In my example I just eye-balled the data and tossed the data at the front end and the back end to 'frame the data". The next concept that enters is what is called "bit cell time". It speaks of the portion of a signal that contains a data bit. Durring a "bit cell time, we have to deal with the possibility that the data line is transistioning OR could could remain in the same state as the previous bit cell time.
To this end...
I seem to recall that NI offered some examples for FPGA to handle serial data tha MAY help you with your cause.
And before I go anywhere else, I would be neglegent if I did not point out that monitoring a serial data line with a multimeter is highly unorthodox at best.
Can you share why a digital interface is is not being used?
Trying to help you as best i can,
Ben
12-09-2016 08:17 AM - edited 12-09-2016 08:23 AM
Hi Ben,
my problem is solved by using the PulseWidth to get the 1 and 0s.
Thanks a lot for your description and help.
The data in the arrays are measured in a time of ~3ms. My system only has the DMM so i have no choice to use something else.
I know the startbit as this is a trigger level for the DMM.
BR
T