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.

ADS1258: ADS1258 data read

Part Number: ADS1258
Other Parts Discussed in Thread: ADCPRO

Hi Team,

I am using ads1258. I am using it in fixed scan mode and single ended input. I am passing the Register Write Command and register data through SPI. The data is sending properly. I am taking the out data via channel data read register. 

The read command 0x30 is sending. So it is mentioned in the datasheet that the channel data read (register format) is recommended when DRDY is not used.

So how will I get the real time ADC value without the DRDY.

Thank You 

FAHAD K R

  • Hi FAHAD K R,

    As stated in the datasheet, use the channel data read command if you are not using DRDY to indicate when new data is ready. You will instead need to poll the STATUS byte to see when new data is ready. Both of these sections of the datasheet are shown below

    -Bryan

  • Hi Bryan

    I pass all the register values and  I am setting the CLKENB to HIGH. After passing the register configuration I toggle the reset then i don't get the clock output. I have check if ADC is working.

    Thank You 

    FAHAD K R

  • Hi FAHAD K R,

    Bryan is currently unavailable so I will try to help out.  What exactly are you trying to accomplish?  When you write a new configuration to the ADS1258 and then RESET the part, all configuration settings you set previously are lost and the ADS1258 will revert back to the default settings.

    For the device to operate properly either an external clock source or a crystal must be connected.  What clocking source are you using and how do you have the CLKSEL pin set?  Can you provide your schematic?

    Also the PDWN pin must be logic high and both analog and digital supplies operating at nominal voltage. 

    Best regards,

    Bob B

  • Hi Bob,

    I am using the ADS1258 evaluation board. I am configuring the registers, send values are correct (checked with DSO).Now I am read all the registers but I got different value. Any suggestions?

    FAHAD K R

  • Hi FAHAD K R,

    Please remember that you are very familiar with what you are attempting to do, but I am not.  You have provided little information as to how you are connecting things from the external processor to the EVM board.  Please provide more detail.  Pictures of your setup and scope shots of the communication would be helpful.

    When reading/writing from the ADS1258, CS must remain low throughout the entire communication transaction.  If you are using an SPI peripheral's CS (SS) pin, this pin may toggle between bytes/words, so a GPIO should be used to control CS.  Toggling of CS during a communication transaction is a common issue with customers attempting to check or develop software using a different controller.  When CS goes high, the SPI for the ADS1258 is reset.

    Another common issue is not following the proper SPI timing.  Verify that the timing and data transitions follow the SPI timing diagram in the ADS1258 datasheet.

    Best regards,

    Bob B

  •     cs(LOW);
    
        uint8_t dataTx = OPCODE_RREG | OPCODE_MUL_MASK | (startAddress & OPCODE_A_MASK);
        //send the read command
        spiSendReceiveByte(dataTx);
    
        uint8_t i;
        for (i = startAddress; i < (startAddress + count); i++)
        {
            // Read register data bytes
        	spiReceiveByte(0x00,&data[i]);
        	//data[] array will store the get value 
        	R_OS_TaskSleep(100);
    
        }
        cs(HIGH);

    I am already given the CS to a GPIO. It was cleared when read the datatsheet.

    The configuration data is given below

    CONFIG0_INUSE ((uint8_t) 0x2A)

    CONFIG1_DLY_64us                    ((uint8_t) 0x41)

    MUXSCH_INUSE                     ((uint8_t) 0x10)

    MUXDIF_DEFAULT                      ((uint8_t) 0x00)

    MUXSG0_INUSE                      ((uint8_t) 0x01)

     MUXSG1_INUSE                      ((uint8_t) 0x00)

    SYSRED_DEFAULT                      ((uint8_t) 0x00)

    GPIOC_INUSE                        ((uint8_t) 0x00)

    GPIOD_DEFAULT                       ((uint8_t) 0x00)

    Here is my code flow

    delay(50ms)

    PWDN is pulled up by the hardware

    start_pin()

    delay(5)

    toggle_reset();

    write_the_data()

    read_the_data()

    Any issue in this?

  • Hi FAHAD K R,

    It is not required to toggle the reset pin.  The POR releases when AVDD-AVSS equals 3.2V.  So the ADS1258 should be fully operational at that point.  If you do toggle_reset() I would suggest adding some additional delay before writing_the_data().  In this way you ensure that the reset actions have completed.

    Best regards,

    Bob B

     

  • Hi Bob,

    I am read back the register value before writing and after writing the register but in both case it shows 0xFF in the buffer. I am sharing the picture of DSO 

    Yellow - clock

    Blue - MISO (data to my processor)

    Thank you 

    Fahad K R

  • Hi FAHAD K R,

    • What register are you trying to read?
    • What are you writing to the register?
    • Have you sent the correct command, with the correct timing?
    • You said you are using the ADS1258 evaluation board, but it appears you have your own code (which means you are not using the provided GUI software). Are you using an external processor board connected to the ADS1258EVM?
    • How have you connected the processor board to the EVM? Can you provide a picture?
    • Does the EVM work with the GUI software, just not yours?
    • It would be helpful to see logic analyzer of the complete data transaction, not just a scope shot of a single register. This way we can see everything you are sending to the ADC, as well as how the ADC responds, while also verifying the timing. Do you have a logic analyzer?

    Without knowing the answers to these questions, and without you providing complete logic analyzer data instead of scope shots, it will be difficult to help you diagnose this issue further

    And as Bob mentioned previously, please provide complete information to us. So far you have only provided bits and pieces of info, and without the whole "picture" we cannot help you very much

    -Bryan

  • Hi Bryan,

    I am using ADS1258 Evaluation board with my processor RZA2M. I am sharing the picture below.

    I am using the sample code provided in the site.

    I am sending the read command [ OPCODE_RREG   ((uint8_t) 0x40) ] through SPI.

    I am reading the default value of the register [ REG_ADDR_CONFIG0    ((uint8_t) 0x00) ] to verify my SPI communication. I am reading readSingleRegister( )  API in the sample code.

    I checked the transmit data using DSO, it is right. But getting the value 0xFF for all registers that is my issue. I checked after writing also it is showing same 0xFF.

    I connected the 3.3V, 5V and GND in the J5A connector and connected the start pin, reset pin and SPI (MISO, MOSI, CLK, SS).

    I didn't check the board with ADCPro software. I directly connected with the processor board.

    I believe the details provided are sufficient to understand the problem.

    Thanks and Regards

    Fahad K R

  • Hi FAHAD K R,

    Thanks for the additional information

    Can you take the START pin high and probe the DRDY pin? You do not need to have DRDY connected to the controller (it appears you don't), you can just probe it with the scope. The DRDY pin should pulse at approximately the 1/data rate, similar to the image below. This indicates that the ADC is at least operating (the supplies are valid and the crystal / clock is functioning). Let me know if you are able to see this behavior

    I also noticed that in the scope shot you sent that DOUT is always high (you said you are seeing 0xFF). Do you have a pull-up on this pin in your controller? I would expect that DOUT would return low at some point, but this does not seem to be the case in your system. If your DOUT pin is being driven by the controller, you won't see valid data

    Let me know

    -Bryan