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.

ADS8698EVM-PDK: ADS8698EVM Connection to Arduino Board

Part Number: ADS8698EVM-PDK

I have connected the signals /CS, SCLK, SDI and SDO correctly, but I only read zero´s from the ADC on all channels.

What could be a reason for that? Are there any further connections that I should make? 

  • Hello,

    Has there been any other changes to the EVM? Please be sure that RST/PD is pulled high and that the reference is configured correctly ( refsel and refio ).
    Are you still connecting the communications card (SDCC) to the EVM? If so, please concider using an external power supply instead, or be sure to disconnect the digital lines from the SDCC card as they might be trying to drive them simultaneously with the Arduino.
    Also make sure that these new digital connections going to the Arduino are making good contact.
    Once hardware is good, the next thing to look at is the timing of the digital communications

    Regards, Cynthia
  • It works now. I haven´t disconnected the SDCC yet.
  • That is great to hear! Glad it is working

  • The communication is working now, but I doesnt understand the result I get.

    I measure 159545 Digits on all channels with no analog signal applied.

    Below is the code I use:

    #include "SPI.h"
    //ADS8698 pins
    const int cs = 9;
    //mosi = 11;
    //miso = 12;
    //sck = 13;


    #include "SPI.h"
    SPISettings ADS8698(8000000, MSBFIRST, SPI_MODE1);


    void setup() {
    pinMode (cs, OUTPUT);


    delay(10);
    Serial.begin(9600);
    Serial.println("Test");
    delay(1000);


    //SPI.beginTransaction(ADS8698);
    SPI.begin();
    //ADS8698 starts with all channels enabled.
    //ADS8698 starts with PGA's set to +/- 2.5*Vref.
    digitalWrite(cs, HIGH);
    digitalWrite(cs, HIGH);
    digitalWrite(cs, LOW);
    SPI.transfer16(0x8500);
    digitalWrite(cs, HIGH);
    digitalWrite(cs, HIGH);
    digitalWrite(cs, LOW);
    SPI.transfer16(0xA000);
    digitalWrite(cs, HIGH);

    }

    void loop() {

    for (byte i = 0; i < 8; ++i){

    delay(10);
    digitalWrite(cs, LOW);
    SPI.transfer(0x00);
    SPI.transfer(0x00);
    byte MSB = SPI.transfer(0x00);
    byte midSB = SPI.transfer(0x00);
    byte LSB = SPI.transfer(0x00);

    uint32_t result = ((uint32_t) MSB << 16) | (( uint32_t) midSB << 8) | (uint32_t) LSB;
    result = result >> 6;

    float volt = result * 0.000078125;


    digitalWrite(cs, HIGH);
    Serial.print("CH");
    Serial.print(i);
    Serial.print(": ");
    Serial.print(MSB, BIN);
    Serial.print(",");
    Serial.print(midSB, BIN);
    Serial.print(",");
    Serial.print(LSB, BIN);
    Serial.print(": ");
    Serial.println(result);
    }
    }
  • Now that you have established communication with the device, the timing requirements need to be confirmed. A screenshot of the digital lines would be the most helpful to see what is going on, including CS, SCLK, SDO, SDI.

    This device will have a bias votalge, 2.5V present when the inputs are left floating. You can either ground the inputs or use a DC input to test the device by reading the conversion results. Using a known DC input signal will make it easier since you have an expected result to compare to the actual conversion results the device gives.

    Another way to make sure communications are correct, is writing to the registers, then reading those same registers to make sure they were programmed correctly. Being able to successfully do this ensures correct timing

    Keep in mind the timing requirments needed for this device,  a timing diagram is shown below and can be found in the device datasheet

  • The analog input channles are grounded through the jumpers J16 to J29 ?

  • Tim,

    The jumpers you stated ground the negative input of the channel pair, AIN_xGND, not the positive input, AIN_xP. Thus if no input signal is given to the postive input, the input is floating and the device will be measuring the bias voltage, 2.5V
    If you would like to ground the postive input, you can insert a jumper at J7, this will short the positive to the negative, with J16- J29 grounded.

    What voltage range are you using?
    On page 32 of datasheet, it explains that the negative full scale with display a code result of 0x0001h. Thus, if you are using the range of +/-2.5*VREF, the grounded input will actually correspond to FSR/2 which would result in a code near 0x2000h. If you are using the input range of 0 to 2.5*VREF, then the grounded input would result in 0x0001h.
    Note that the default input range is +/-2.5*VREF.
    Have you tried changing the registers for the input range? Another way to make sure communications are correct, is writing to the registers, then reading those same registers to make sure they were programmed correctly. Being able to successfully do this ensures correct timing

    The best way for me to check the digital communications is with a scope plot including CS, SCLK, SDO, SDI, if you would please proivde one?
    Regards
    Cynthia
  • I understand.

    If I provide no signal on a positive input on channel 0 for example, I measure indeed 2.4933 V.

    At the moment I use the default +/- 2.5*vref mode, but I'am struggling to change the input range.

    After I tried to change the input range of channel 0, I measure 0xFFFF.

  • Can you send me an example code for the ADS8698 please?

    ( Mail: timkl94@gmx.de )
  • Unfortunately we do not have sample code.

    What is the input range you are trying to use? If you are able to read data out, writing and reading registers should not be too far out to accomplish.

    Page 48 of the datasheet explains how to write and read to the registers. If you could provide a scope shot of the digital lines. You will need a CS pulse that is 24 SCLKs long, though the register is 16 bit register. The first 7 bits will be the registers you want to look at, in this case, 0x05, selecting channel 1 (page50). The following bit is the write or read to this register, here to write, Bit 8 will be high to write. The rest of the bits will be to set the input range, depending on what range you want to set page 55 explains this. Note that bits 7 to 4 will always be 0x0h, the remaining four bits will be the setting.

    After performing this, I would suggest reading the registers to make sure this was done successfully.

    The timing diagram below can be found on page 48 of the datasheet followed by a read cycle example.


    Regards, Cynthia

  • At the moment I use the default input range and I get the right result from the measurement I made.

    If I want to change the input range, I didn´t get the right result anymore.

    I send the following commands to change the default input range (+/- 2.5 * vref) to (0 to 2.5 * vref):

    •         SPI.transfer16(0x8500); // Reset
    •         SPI.transfer16(0xC000); // Select CH0
    •         SPI.transfer16(0x0505); // 05h =  CH0 / 05h = 0 to 2.5 * vref

  • Tim,
    The internal registers are categorized in two: the command registers and the program registers. You are currently mixing the two, you are referring to table 6 to select your channel, but this is for the Command register. The command register selects channel sequencing and other options, and is write only. The program register map is provided on Table 9 on page 50. The program register is used to set the input range settings and other options.
    I believe the command you are trying to complete is 0x0B05h. Let me know if this works. Also keep in mind the timing diagrams on page 48 and 49 to read and write to the registers.
    Also, after writing to the registers, try to read them to make sure it was done correctly.

    Regads, Cynthia