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.

ADS122U04: DRDY control

Part Number: ADS122U04

hello, i started to use this AD for a new project, now i write this value to registers 1 - 0x40, 2 - 0x0A, 3 - 0x80, 4 - 0x01, 5 - 0x48;

do you have some example for use the pin DRDY? i try some codes but no sucess.

thanks

  • Hi Roberto,

    What you have selected in your register settings for the ADS122U04 is the automatic output (transmission) of conversion results as well as DRDY output using GPIO2.  Generally you would use one method or the other and it is not necessary to use both methods.

    With automatic output mode, you would poll ( or if available use an interrupt for) the RX input on the micro for new characters arriving into the receive buffer.  Using this method, the conversion data are automatically sent to the micro. You would not send a command to read the results.

    Monitoring DRDY could be a polling of the input with the micro, or you might have an interrupt action assigned to a high to low transition on the input to the micro.  When there is a transition from high to low on DRDY, you would send the RDATA command to read out the results.

    As just demonstrated, you can use one method, or the other, and it is not required to use both.  What specifically do you wish to accomplish with DRDY and maybe I can help with the code or offer some further suggestions?

    Best regards,

    Bob B

  • hi Bob.

    i'm begginer in AD and CSS programer for PIC, and i dont know any CPUs from TI, its my next wish list...

    let me explain my idea for you:

    i select this AD, because its more easy to make a interface, UART..

    i reading datasheet, make a registers, and now i can make readings, i have sucess to do it.

    for Pin DRDY, my idea its:

    start AD, configure, send reset comand, send sync, start readings...

    i'd like use 100SPS, my idea, receive this 100 Samples, put on vector, and make a median for this vector ex: (1;2;3;4;6;8;23;37...) median = xxx.

    i think with this i will have more precision value to result.

    i need use this pin, for know i have a result, because i saw i received 3 hexa words ex: 0x11 0x11 0x11, in CSS have a function Make(), i try use it, but make result INT32, for test its ok, this Pin state select my 3 words, and put on vector, i dont know if i going on the best way to do it.

    do you have some example for it?

  • Hi Roberto,

    From the configuration settings you reported, you are operating at 20sps with automatic data output mode.  This means you will see data transmitted from the ADS122U04 about every 50ms.  DRDY will also transition from high to low after every conversion period has completed.  So data will be transmitted at about the same time as DRDY transitions.

    If you collect the data when it is transmitted, and if you want to applying averaging, there are many different methods to do so.  It appears like you want to take 100 samples and average them.  I am confused when you say 100SPS.  If the ADS122U04 is sending data at 20sps, you cannot capture 100 samples in a second.  So perhaps I'm not clearly understanding what you would like to do.

    If you place a scope or logic analyzer on the ADS122U04 TX, you should see data transmitted about every 50ms.  You will need to capture this data, and then process it before the next data arrives.

    If you wish to use DRDY as a signal that data is being transmitted, you will need to setup an interrupt for your micro, or poll the input pin of your micro for a logic low state, and then process the data as it comes in.

    Best regards,

    Bob B