Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Using ADC Pi Plus with LabVIEW LINX

2847 Views - Created 18/09/2017


Posted by:

Moulinas Avatar


i am using the LINX library in order to run LabVIEW exe files on the raspberry.

The LINX library allows to read/write on spi, i2c, GPIO, send PWM / digital signals and so on.

I am trying to send a GPIO order to contactors plugged into the Raspberry.

Do you know :

Will the ADC automatically "translate" the Digital input into a Numerical output (without any command from labview other than 'GPIO write', for example) ?
Is there any command required to enable the ADC after powering it up along with the raspberry

Thank you for any answer



Posted by:

andrew Avatar

United Kingdom

andrew Twitter  andrew Website  


I don't have any experience working with LabView or LINX so I don't know how it works but to read a value from the ADC Pi Plus you have to first send a command byte to the I2C address for the ADC chip and then read either three or four bytes depending on what bit rate you have selected. The three or four bytes have to be combined together into a single value which can be converted into a number. You don't have to send any commands when you first power up the ADC.

The ADC Pi Plus uses the Microchip MCP3424 ADC chip, the datasheet for the chip can be found in this PDF. The details on what you need to put in the command byte can be found on page 18 and how to read back the values is on page 22. Once you have sent a command byte you will need to keep reading from the ADC until the ready bit goes low which tells you that the data conversion has been done and the value is ready to read.

To get an idea of what code you will need to read the values from the ADC it may be worth having a look at our python library. The read_raw function contains the code for reading a raw value from the ADC chip and the read_voltage function converts that raw number into a voltage based on the gain and bit rate settings.

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.