ADS1256: Not able to read and write the values to the configuration registers.

Part Number: ADS1256

hi.

I have ADS 1256 development board and trying to interface with STM32F446ZE using STM cube and SW4 (Eclipse based workspace). 

sometimes i'm able to read the default values from the configuration registers only when i write specific data to the any of the register. I meant after the write command is sent. if i write the data (with LSB bit 1 in it) then i will get the default register value in response to the read command.   if i write the data (with LSB bit 0 in it) then i will get the register value as 0x00 in response to the read command.  

Also i'm not able to write the registers with any values. Here i have attached the SPI communication details captured with logic analyzer.

6201.SPI.zip

Thanks,

Harsha 

4 Replies

  • Hi Harsha,

    Welcome to the TI E2E Forums and thanks for sharing your logic analyzer screenshots!

    I noticed that you are reading and writing to different registers, is that intentional, or did you mean to read back the value that you are trying to program?

    Currently, you are sending the "0x54 0x00" command which writes to the "I/O" register, and when you send the "0x10 0x00" command bytes, you are reading from the "STATUS" register.

    The WREG command is being ignored because the "I/O" register does not allow you to write to the lower nibble bits when the upper nibble bits are all set to "0". Please refer to the I/O register description below:
    I/O: GPIO Control Register description

    Your RREG command is currently only reading the STATUS register. The first result of "0x31" seems valid. Do note that the LSB of this register follows the state of the /DRDY pin, so it may differ between consecutive readings; however, you should still see the same values in the upper nibble. In your second reading it looks like the ADS1256 is not responding to the RREG command. Is it possible that perhaps either the /RESET or /PWDN pins was set low, or for another device on the same SPI bus to also be active during this time? If not, do you see a regular /DRDY pulse on the ADS1256 to indicate that it is active?

    One last and important recommendation... Make sure to send the SDATAC command before you read or write to the device registers. If you are in RDATAC mode, then this device might ignore the RREG and WREG commands. I would recommend sending the SDATAC command first thing to ensure that you are not in the RDATAC mode.

    Best regards,
    Chris


    Christopher Hall
    Applications Engineer | Precision Delta-Sigma Converters

    Check out our helpful resources:
    TI Precision Data Converters | TI Precision Labs - ADCs | Analog Engineer's Calculator | Data Converters Learning Center | Selection Guide

  • In reply to Christopher Hall:

    hi christopher,

    Thanks for the fast reply.
    Yes, it is intentional reading and writing. First i tried only to read the 'status' register but only few times i got the correct response. so i added the WREG commands. I do see a regular pulses on the DRDY pin. RESET and SYNC/PWDN pins are pulled up. only ADS1256 is on the SPI bus.
    I was not using the SDATAC command before reading and writing registers. Now i will check the response after disabling the continuous data read mode and let you know the result.

    Thanks&Regards,
    Harsha B S
  • In reply to Christopher Hall:

    Hi Christopher,

    I have couple of doubts.

    1).How often do we need to do the synchronization process?

    2).What is the difference between self calibration and system calibration? If we issue the SELFOCAL or SYSOCAL commands, the OFC registers are being updated. so which one do we need to perform? and how often do we need to do this calibration?

    Thanks&Regards,
    Harsha B S
  • In reply to Christopher Hall:

    Hi Christopher,
    I have few queries to ask. Please help me!

    Now I'm able to read and write the ADS1256 configuration register values. In my current setup Vref is 2.5V . If i measure 5v from ADC channel 0, i get 8388607 decimal and this value is correct (2^23 = 8388608) . when i connect ground to channel 0, i get 17543 decimal value from the read command. I think this value should be 0 decimal. am i correct??


    Thanks&Regards,
    Harsha B S