measure function API for C

Having problems ? let us know the details here
Post Reply
fkeujjpdc
Newbie
Posts: 1
Joined: Mon Aug 26, 2019 1:08 am

measure function API for C

Post by fkeujjpdc »

hello:
i want develop a test device,i need meause a sina wave features,such as frequency,duty,raise time of edge ,fall time of edge .i used C++ language,i want find some API do that things,but i can't find. i call the technial fater-sales of PICO,he said the meausure not opened for programer ,it just integrate in PICO Softeware.so i hope get help frome this discusstion. thanks!

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: measure function API for C

Post by Gerry »

Hi fkeujjpdc,

You just need to do the following:

(1) Download the Software Development Kit from here: https://www.picotech.com/downloads
The version you need will be 32-bit if your version of windows is 32-bit, or if your windows version is 64-bit, then you can choose between 32-bit or 64-bit (e.g. you may want to maintain compatibility with 32-bit windows so that it runs on older operating systems, or if you may want to use the advantages of a 64-bit, e.g faster processors, more storage space, etc)

(2) Download the example Visual Studio solution for C++ from here: https://github.com/picotech/picosdk-c-examples

(3) Use the code in the example for your specific PicoScope series to capture a waveform, and then use your own created code to implement the following Math functions to perform your measurements:

Frequency = Period sample count * Sample rate,
where... Period sample count = Number of samples between the same mV/ADC count value on 2 adjacent rising edges.

Duty Cycle = Pulse width sample count / (Sample rate / Frequency),
where... Pulse width sample count = Number of samples between the same mV/ADC count values between adjacent rising and falling edges.

10/90 Rise Time = The number of samples between 10% sample count and 90% sample count, all divided by the sample rate,
where... 10% Sample count = The mV/ADC count value from the negative peak of a waveform to the rising edge at a height of (the negative waveform peak + 10% of the it's peak-to-peak height).

Regards,

Gerry
Gerry
Technical Specialist

Post Reply