analogdevicesinc / libiio

A cross platform library for interfacing with local and remote Linux IIO devices
http://analogdevicesinc.github.io/libiio/
GNU Lesser General Public License v2.1
484 stars 313 forks source link

Data conversion documentation #1162

Closed ahmetakman closed 3 months ago

ahmetakman commented 4 months ago

Hello everyone,

I am unable to understand the exact format conversion achieved with iio_channel_convert .

It says in the documentation the output goes to uint16_t but I did not get how exactly this is achieved.

Maybe more importantly, when I try to run very same configuration from MATLAB, I get consisted quite small double values whereas when I get samples and convert them from hardware format using iio_channel_convert(rx0_q, &converted_data, &q); , I get many zeros and only a few too huge numbers.

Can you help me understand or provide a documentation that I could not reach before so that I can get the similar set of conversion using C?

Best,

tfcollins commented 4 months ago

Can you provide some context? What is the buffer format you have now? What device are you talking to? Have you tried the existing tools that use these functions like IIO-Scope and pyadi-iio?

tfcollins commented 3 months ago

No response. Closing