Posts: 7
Joined: Mon Dec 05, 2016 12:28 pm
Location: Belgium

How to use AD7706 and/or AD7714

Mon Aug 28, 2017 8:11 am

Dear all,

I am trying to read some analog signals with my ADCs, namely AD7706 or AD7714 (preferably).

I checked for some libraries but i have not achieved to get sensible output yet.

After some googling, I have come across with a code for AD7705 (quite similar module to AD7706), please see below link:

Using this code, I am able to communicate with the AD7706 through SPI (I am getting data and data is no more if i disconnect data line). However, the responses are kind of 'giberish'. Having said that although i am changing Analog input signal from 5V to GND the output is stucked around -32768 with some noisy behavior. I was expecting this value to be -32768 for GND and 32767 for 5V (ref voltage of ADC is 5V).

There are mainly 2 differences between this code's setup vs mine:

- The code is designed for 5 MHz external clock while I am using 2.4Mhz.
- The code is used for RPI - 1 while i am using RPI - 3.

Any ideas on this? Or do you already have a running version of AD7706 and/or AD7714.

Edit: I see from the following statement from the link above that the code is using RPI clock. Question is how can i switch to my external clock or edit the code such that it is compatible with RPI3?

Statament from the above link:

"This program switches on the clock from the RPI, triggers a calibration of the AD, reads data from channel 1 and prints it on the screen."

Update: I see that this issue can be related with a compile problem as I try to compile the code with gcc function (i was using 'make'), I got the following error:
"undefined reference to `gz_clock_ena'"

Then I thought if it would work to compile gz.clk.c with gcc. This time i got couple of "undefined reference to bcm2835" errors. I already have bcm2835 library, however, there is some kind of a linker problem. Not sure how to solve this though.


Return to “Beginners”