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.

ads1256 data conversion

Other Parts Discussed in Thread: ADS1256

I'm trying to use ads1256, but I have some problems.

Initially I would like to reset and read register for ads1256. My pseudo codes are below. (I'm using a microblaze in xilinx fpga)

WriteBuffer[0] = 0x0F; //SDATAC Command

WriteBuffer[1] = 0x11; //READ FROM MUX REGISTER

WriteBuffer[2] = 0x00; //

XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 6); //send 3 bytes using  a spi

  ADS1256_WaitDrdy(); //wait for drdy

WriteBuffer[0] = 0x11; ////READ FROM MUX REGISTER
  WriteBuffer[1] = 0x00; //
  XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 2); //byte 2 bytes using a spi

  • Hi Jongho,

    I'm sorry to hear you are having trouble reading from the ADS1256 - is it possible for you to provide a schematic of your board and possibly an oscilloscope screen capture of your control signals?

  • Dear Tom

    Thanks for your quick answer, I'm attach oscilloscope waveform what you want

    As I told, I want to read adc register using RREG command , but there is no answer(no DOUT)

    Due to policy, It is impossible attach schematics.

    AVDD : +5V

    AGND, DGND ,D3, D2, D1,D0/CLKOUT : Connected GND

    AINCOM , XTAL2 : NC

    DVDD : 3V3

    VREFP : +2.5V, VREFN: GND

    XTAL1_CLKIN : External Clock 7.68Mhz from FPGA

    AIN0,2,4,6 : ADC Input

    AIN1,3,5,7 : +2.5V (For Full-Scale ADC)

    RESET, /SYNC_PDWN : +3.3V

     

     

  • Hi Jongho,

    Do you see DRDY pulses coming out of the ADS1256?  Are you able to do register writes and then reads to verify the SPI communication?  I'm also curious to know if CH2 in the scope trace is the /CS line.  The /CS input needs to be held low through the entire communication process. 

  • Dear Tom

     

    I  saw /drdy pulse coming out the ads1256.

    As I told, I couldn't read register which I wrote.

    For example, If I wrote command 0X53 0x00 0x23,

    I expect 0x23 when I read command, but there is no dout.

     CH2 is /SS(Slave Select).

    I will modify /ss to maintain low through the entire communication process

    Regards

  • Dear Tom

     

    I modified /ss to maintain low through the entire communication process, but there is no dout also

    Is there anything else to check for the communication??

     

    regards

  • Jongho,

    The SCLK should dwell low.  According to your scope shots it is dwelling high.  Also, there needs to be a small delay between the command and the data.  Review Figure 1 on page 6 of the data sheet for the required timing delay and communication requirements.

    Best regards,

    Bob B

  •  

    Dear TI employee

     

    Thanks to your helps, I could get digital data after analog to digital conversion.

    But digital results make me disappointed.

    There is 1mV difference between dmm(Digital multi-meter) and ADS1256 digital regults.

    It looks like calibration(Self-gain, Self-offset) function is not working.

    would you check my calibration process?

    my pseudo codes are below.

    ==========================================

    //read status register

     WriteBuffer[0] = 0x10;  WriteBuffer[1] = 0x00;

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 2); //byte 2 byte

     

    //make ads auto cal, buffer enable

     temp = ReadBuffer[0];  temp |= 0x6;

     

    //write status register

    WriteBuffer[0] = 0x50;  WriteBuffer[1] = 0x00;  WriteBuffer[2] = temp;

     ADS1256_WaitDrdy();  XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 3); //Send 3 byte

     

     

    //write adcon register

    WriteBuffer[0] = 0x52;  WriteBuffer[1] = 0x00;  WriteBuffer[2] = 0x01; //0x21

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 3); //send 3byte

    ADS1256_WaitDrdy();

     

    //write drate register

    WriteBuffer[0] = 0x53;  WriteBuffer[1] = 0x00;  WriteBuffer[2] = 0x13;

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 3); //send 3 byte

    ADS1256_WaitDrdy();

     

     

    //wirte I/o register

    WriteBuffer[0] = 0x54;  WriteBuffer[1] = 0x00;  WriteBuffer[2] = 0xE0;

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 3); //send 3 byte

     

    //write mux register

    WriteBuffer[0] = 0x51;  WriteBuffer[1] = 0x00;  WriteBuffer[2] = 0x01;

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 3); //byte 3 byte

     

    //Self Cal again !!!!

    WriteBuffer[0] = 0xF0;

    XSpi_Transfer(&SpiADC, WriteBuffer, ReadBuffer, 1); //byte cnt

    Wait(1000); //wait 1sec 

     

    Best Regards

     

  • Jongho,

    Can you send us your schematic/layout?  PCB layout if done poorly can have a negative impact on your results.  Also, calibration can be negatively impacted if you have a noisy reference.

    Best regards,

    Bob B

  •  

    Dear Bob

     

    Thanks to your opinion, but  it is impossible to send schematic/layout to you  because of company policy.

    I have checked layout with my co-worker, but there is no problems.

    My schematics are below.

    1. reference 2.5V : ref5025a

    2. AVDD : 5V, DVDD :3.3V

    3. VREFP : 2.5V(reference), VREFN : DGND

    3. AIN1,3,5,7 : 2.5V(reference), AIN0,2,4,6 : input, AINCOM : NC

    4. D3,2,1,D0: DGND

    5. /RESET, /SYNC_PDWN : 2.5V

    6. XTAL2 : NC, XTAL1_CLKIN : external 7.68Mhz

    8. /CS : GND

     

    best regards

  • Jongho,

    It is very difficult to guess what might be happening, and to know whether your DMM is accurate and calibrated.  The REF5025 will oscillate if there is not a large value cap at the output of the reference.  PCB layout is very critical in getting high levels of performance.

    Best regards,

    Bob B