ADS8688EVM-PDK: sample code
Part Number: ADS8684
I'm currently trying to communicate with one ADS8684 on a Linux platform. I have build the ADS8688 driver and loaded my target.
Seems the communication is working well (at least when I check SPI signals with a logic analyzer, I have request and response in the frames).
I'm testing the ADS8684 with command line, there are offset, scale and raw data for each input.
Default offset is -32768 (why not!), scale is a strange value (why not!) but raw is always 65535, no matter the input voltage is. I'm not sure it's normal ?
=> I'm looking for a C sample code application I can build and run on Linux to communicate with the ADS8684 and basically read inputs voltage. Is there anything available I can use ?
Thanks for the help,
The resident expert for the ADS8684 is out of the office, so I thought I'd jump in with an answer. I'm not sure if this will help, but there are some linux drivers that may add to what you've already built. You can find this in the product folder, but I've provided a link below:
I would note that TI did not directly develop this code, so we generally aren't able to support it. Read through it and see if it helps in any way. Other than these examples, I'm not aware of any other example code for this device. Our primary support mentions this in the following post:
Regardless, if you are having problems with the offset and scale for this device, post back and we can continue to discuss that.
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 Joseph Wu:
Thanks for your answer.
"The resident expert for the ADS8684 is out of the office" => I have already read this somewhere in another thread, where are the TI ADS8684/8688 experts ?!
The driver you indicate is the one I'm using and I'm surprised TI host some code they cannot support...
By the way, Linux or not Linux, I'm checking with a logic analyser today, and my ADS8684 always respond "FFFF" when performing a "Manual Channel" request (page 42 of the datasheet). I do not understand why and any help is appreciated.
In reply to JOEL GUITTET:
Thanks for your query on E2E. I came back from a business trip last week.
Can you please share your timing plot (/CS, SCLK,SDO and SDI)? I suggest to test with a DC signal or without a signal(floating input) on selected channel, no need to change input range which will be simple for the test. Also, your schematic will be helpful to address the issue.
In reply to Dale Li:
Thanks for your answer and sorry for the late response, I was in vacations.
All inputs have a fixed voltage actually, I have simply connected inputs to the GND except AIN_0P which is at 0.06V referenced from GND (set with a simple trimmer). I have attached a part of the schematic, it is very simple.
I have also made some screenshots of the signal read with my logic analyzer. This is input 0 "Manual Channel" reading. Total duration between the first falling edge of CS to the second rising edge of CS is about 0.3ms. SPI clock frequency is 4MHz. SPI mode is 1 (CPOL = 0 and CPHA = 1).
I have made 2 zooms to show the logic analyzer software data decoding, "C000" transmitted on MOSI during the first exchange, "FFFF" answered by the ADS8684 on MISO during the second exchange.
As already indicated I do not understand answer FFFF, seems it is a default value for any reason, but I haven't read any related info in the datasheet. Or maybe my SPI setup is wrong ?
Thanks for your help.
Thanks for your information.
Firstly, I hope that your SPI_MISO(SDO output from ADC) is connected to MISO(input) on your microcontroller, also your SPI_MOSI(SDI input on ADC) is connected to MOSI(output) on your microcontroller. Please refer to a similar query on E2E forum:
Secondly,I hope you have measured the voltage on REFIO and REFCAP pins, the voltage on both of them should be 4.096V.
Also, I hope your negative input pins (AIN_0GND,AIN_1GND,AIN_2GND,AIN_3GND) have been connected to GND.
When your input(AIN_xP) is connected to the GND, the conversion code should be around 0x8000. When your input(AIN_xP) is connected to the full scale signal(+10.24V), the conversion code should be around 0xFFFF. Please see transfer function in Figure 69 in datasheet.
With the SPI mode (CPOL=0,CPHA=1),your microcontroller will capture the code on MISO pin at the falling edge of SCLK, your microcontroller should be able to capture it during 10ns after the falling edge of SCLK because the hold time for data is minimum10ns. Please see the highlight in red below. You need to double check and make sure if your SPI can capture during this short time with lower SCLK(4MHz) condition.
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.