RZ/V2L ADC Interface

Hello all,

I had asked a question before about RZ/V2L Evaluation Kit ADC Pin Layout and after researching into embedded linux and understanding the build process and yocto, I managed to get a better understanding of how this board works. Thank you in advance to those replies.

In my previous forum post, one of the replies had mentioned to execute this command:

cat /sys/bus/iio/devices/iio\:device0/in_voltage{channel_number}_raw

I was able to retrieve values from this command but one thing I noticed is when I run this command I find that all of the channels are outputting around the same value (~1800 - 1900) even though for most of them there is nothing connected to their respective channels. Then to test if everything was working ok, I connected a basic potentiometer to channel 2 and I was able to see the values go up and down as I turned the sensor, however, the values being returned were showcasing very large jumps in value (e.g., it would go from 4 to 500 to 1800 to 4090 as I turned the potentiometer from low setting to high), there wasn't a steady increase.

My questions:

  1. When you are connecting your sensors to this particular evaluation board do you experience such large jumps? Or perhaps I am doing something wrong
  2. Lastly, the cat command above was useful for quickly testing if I am receiving values, I tried to implement a c program which is included during the build process to read from the adc but no luck. I tried this script too: https://github.com/renesas-rz/rza_linux-4.9_bsp/blob/master/adc_example/adc_example.c. Does anyone have any suggestions or tips for how they read sensor data into their programs?

Thank you in advance, I'm relatively new to embedded linux and programming with this board so all help is greatly appreciated!

Parents Reply Children
No Data