This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Is there anyway for this to work? All of the library's that I have tried to use (WiringPi, etc.) are configured for 4-wire SPI and not for the extra CONVST and RD wire. Is there a way to code around this, i.e., somehow connect the clock to another pin. Thanks!
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Tom Hendrick:
Thanks! That got the two communicating. However, it is reading in "junk" values. I am testing the ADC with a 10k-ohm potentiometer. As I move it, the inputted values don't seem to change. If I can't iron it out within the next day, I'll get back in touch.
In reply to Swanagan Ray:
You might consider changing that pot to something lower in the long term unless you have a buffer in between the resistor and the ADC input. Regardless, even with a 10k pot, you might not get perfect results but they should not be 'junk'. Check your data/colock polarity settings. SDO should be valid on a falling SCLK edge.
Thanks for the info! I have checked the polarity settings and they are correct. However, the problem is that no matter the input signal, the output at the microcontroller is always a set pattern. I tried a 2kHz, 2 V sine wave, square wave and just 2 Vdc. The pattern was still the same. Here is a graph of the values.
Also, here is my code and hardware setup.
It seems that it is identifying which channel is coming in since it always prints A0 to the screen but the values are in the range from 512-4020. Not sure if you can make any sense from this but any help would be appreciated.
Humm...not sure what that data you plotted could be. Can you grab screen shots using a O-scope or Logic Analyzer showing the SDI/SDO and SCLK? Also, the A0- input should be taken to Vref or an external 2.5V source if you are driving the input single ended.
Here is what I got with the A0- input tied to Vref at 2.5V. The first is a picture of just the clock source, the second is the clock and SDO. However, I believe there is considerable noise on the SDO signal at the scope. Not sure if this helps. Also, I have included a better graph of the output that I am getting.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.