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.

ADS112U04: ADS112U04EVAL MACHINE CODE

Part Number: ADS112U04

I see where the scripts can be created.  Is there a way to see the Machine Tx Rx hex code that the script generates for our uControl such as 55 40 08 55 42 08 55 48 48  ?

Peter

  • Hi Peter,

    The actual transmission of the UART data is done at the firmware level, so unfortunately there is no way for the GUI to interpret what is being transmitted through the UART.

    The actual data being transmitted can be observed by probing the UART pins on the EVM with an oscilloscope or logic analyzer. A logic analyzer is the better method as the communication protocol can be interpreted.

    The ADS112U04 datasheet covers the required data patterns. The start of each command must be preceded with the synchronization word (0x55) as shown in Figure 58 on page 34 of the datasheet. Reading and writing registers is shown on page 37. Only one register at a time can be written or read.

    Writing the register sequence you show above would appear as:
    0x55 0x40 0x71 --- synchronization word, WREG register 0, data
    0x55 0x42 0x00 --- synchronization word, WREG register 1, data
    0x55 0x44 0x00 --- synchronization word, WREG register 2, data
    0x55 0x46 0x00 --- synchronization word, WREG register 3, data

    The reading of registers would be similar:
    0x55 0x20 --- TX synchronization word and RREG register 0 with RX data 0x71
    0x55 0x22 --- TX synchronization word and RREG register 1 with RX data 0x00
    0x55 0x24 --- TX synchronization word and RREG register 2 with RX data 0x00
    0x55 0x26 --- TX synchronization word and RREG register 3 with RX data 0x00

    The RDATA command would be:
    0x55 0x10 --- TX synchronization word and RDATA command with 2 bytes of RX data 0xXX 0xXX

    The most critical thing to remember is the ADS112U04 is not full-duplex, which means you can not transmit at the same time as receiving. I highly recommend using a logic analyzer to verify your communication and timing. One place where you can have issues is when using the Automatic Data Read Mode at fast data rates. If the data is being transmitted at the same time you wish to issue a command you can put the ADS112U04 in an unresponsive state that would require a RESET.

    Best regards,
    Bob B
  • I tried the following commands and get no response.  Any idea what is wrong?  There is a .01sec delay after each hex number is sent.  Commands are going into pin 16 on logic analyzer.  Nothing on pin 15.  Are any handshaking lines needed below?

    55 06 55 40 00 55 41 00 55 42 00 55 43 00   send reset.  set all config registers to 0

    55 08 55 10      55 08 55 10        55 08 55 10      send start, RDATA, pause and wait for response but no response on ....

    TX0 is transmit from uControl    RX0 is uControl receive

  • Hi Peter,

    The RESET pin (3) must be tied high (or set high from the micro) or the ADS112U04 will be most likely in a reset condition which will ignore all commands.

    As far as your communication, you must make sure you wait for the reset command to complete before issuing any further commands. The same is true for the commands to START/SYNC conversions and the RDATA commands as you must wait for the conversion to complete before attempting to read the data. DRDY signals end of conversion following the START/SYNC command. When DRDY transitions from high to low conversion data is now available to be read.

    If successive commands to START/SYNC and RDATA are given before the conversion completes, the START/SYNC command will just restart the conversion and you will not get a conversion result. Make sure you wait for DRDY to transition from high to low before reading the result, or use a timer to wait long enough for the conversion to complete before reading the result.

    Best regards,
    Bob B
  • Yes, pulling reset high fixed it.
    We have a 1.39V test voltage between AN0 and AN1. We get a result of 56 92h=22162
    2.048V * 22162/32767 = 1.39 so I guess it is working??
  • Hi Peter,

    Yes your setup is working and you have correctly calculated the voltage. Feel free to post back if you have any further questions.

    Best regards,
    Bob B