phentux
Posts: 7
Joined: Sun Feb 09, 2014 11:29 pm

Trying to read the output of a DAC

Sun Feb 09, 2014 11:32 pm

Hi everyone, im trying to read the analogical output of a DAC, but my question is, is it possible with the GPIO?? or what can i do?? many thanks

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Trying to read the output of a DAC

Mon Feb 10, 2014 1:54 am

The Pi has no analogue input. To read the (analogue) output of a DAC you will need to attach an ADC to the Pi. The ADC will measure the analogue signal level, and the Pi will read the (digital) result.

Where is the DAC? If it is close to the Pi you might be able to connect to the digital *input* of the DAC and read the data that is being sent to it, then perform a calculation in the Pi to estimate the expected analogue output value.

phentux
Posts: 7
Joined: Sun Feb 09, 2014 11:29 pm

Re: Trying to read the output of a DAC

Mon Feb 10, 2014 2:58 am

Thank you Ame, well the DAC is in a protoboard, i just want to read 8 bits but i dont want to use the GPIO to do this because i need them for other things

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Trying to read the output of a DAC

Mon Feb 10, 2014 3:04 am

Are you driving the DAC from the same Pi?

If so, can't you just have your program dump the last written value to a file somewhere, so that other programs can read it? Or are you trying to get the actual signal level driven by the DAC, which may differ from the commanded value?

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Trying to read the output of a DAC

Mon Feb 10, 2014 12:19 pm

To read the output of a DAC, you need a ADC.

There are cheap i2c ADC's on ebay. They cost less than $2 delivered to your door (USA).
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Beginners”