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.

ADS122U04IPW - can read data from ads true usb using ftdi converter HELP!

Other Parts Discussed in Thread: ADS122U04

Hi,

I am new in ads converters and I realy need help. I have build my own circuit using ADS122U04IPW  to measure current and voltage. For communicating I am using USB com port and FTDI chip to talk with ADS.

Until now I have successfully reset and start ADS true COM port (see picture):

A dot appears always when I send command START/SYNC, so I guess that communication work fine. I also measure the course of communication between ftdi and ADS122U04IPW and apparently is working fine.

The problem start when I send command RDATA or RREG to read data from ADS but I never get back a response from ADS. What could be wrong ?

Is this good that I get only "DOT (hex: 00)" back after send START/SYNC and RESET command ?, is there any program to communicate easly with ADS122U04IPW to read data from AIN0, AIN1, AIN2, AIN3 ?

I tried everything what is in poor datasheet and I can not make it work properly :(

Thanks, Matej

  • Hi Matej,

    Welcome to the E2E forum! One problem with using a USB to UART device is the USB may not deliver the communication in the same manner as a direct UART connection. When communicating to the ADS122U04 what is the baud rate and the data that is being transmitted? Have you monitored the RX and TX lines with an oscilloscope or logic analyzer to verify that the transmission of data is as expected.

    You can only transmit or receive one communication at a time. You cannot transmit the same time as receiving (in other words not full-duplex). All transmission must start with the synchronization word 0x55. The data should be transmitted as no parity, 8 data bits and 1 stop bit (N-8-1).

    In the end we need to verify the communication. What precisely are you sending to the part and how have you verified it?

    Best regards,
    Bob B
  • Hi Bob,

    thanks for fast replay. I am using CoolTerm terminal with Baudrate 9600, 8 data bits, none polarity and 1 stop bit, Is that correct ? in the datasheet is written that ads122u04 work with ANY baudrate or not ? 

    I check my connection first by making loopback on ftdi which was work properly, then I connect ftdi to ads122u04 and check If data came to the chip properly with osciloscope which also works. 

    My first test was to send RESET command and ads responded with a "dot" so I guess that ads is alive. How do you mean to send data with 0x55 ? you mean to send like these: 0x55 RESET and 0x55 START/SYNC ?

    Maybe the problem is that i am not sending data properly 

    Best regards, Matej

  • Hi Matej,

    9600 baud is a good starting point. The baud rate is not unlimited and the fastest practical baud rate is 115200. Which baud rate you choose depends on the desired conversion data rate. After the reset command is issued you must wait a minimum of 80us before sending any other command to allow time for the device to properly reset the internals of the device.

    All communication to the ADS122U04 must begin with the synchronization word 0x55. This is explained in the protocol section of the datasheet in 8.5.1.4 on page 34. The synchronization word is used to validate the baud rate and that the communication is a valid command. So the answer is yes to 0x55 RESET, 0x55 START/SYNC, etc.. If there is data to be returned such as RREG or RDATA, you must wait for the data to be returned before sending any more commands.

    You must also make sure that both AVDD and DVDD are at the nominal supply voltage before attempting to communicate. Also, make sure that the RESET pin of the ADS122U04 is at a logic high level (pulled up to DVDD).

    Best regards,
    Bob B
  • Hi bob,

    I am using battery power supply in measuring part (4x AA), for AVDD i am using +2,5V and for AVSS -2,5V, for DVDD i am using +2,5V and for DGND 0V, this way I am avoiding disturbance from digital part. The reset pin is direct connected to DVDD (pulled high +2,5V) so I guess the links are fine. Waiting time is not problem for me because I am sending commands true "coolterminal" com port and my waiting time is more than 2sec.

    I try to send command as "0x55 RESET" and "0x55 START/SYN" but there was no respond from ads. Only "RESET" and "START/SYN" commands without 0x55 sending back "dots (now word)". I also try to send "RREG", "RDATA" and "0x55 RREG", "0x55 RDATA" commands but there was no respond on any of these command.

    How can I now if there is data to be returned or there is no data to be returned ?, do i need to set registers before reading commands ?

    Best regards, Matej

  • Matej,


    Bob is out of the office for this week, I'll jump in and help as best I can.

    You shouldn't need to set the register before reading them. Once the device has come up, there should have been a reset at the start and all registers should be set to default values. For now, I can think of two things to check.

    First, verify that the ADS122U04 digital can communicate with your master. If DVDD is set to 2.5V, and your microcontroller master is running from 3.3V, you might need level shifters to get correct communications. I would make sure the micro is running from the same supply as the DVDD.

    Second, I would use a scope or logic analyzer to look at the communications. You should be able to verify the 55h and the any other command that you use. Once you plot the output, you can return here and post it so we can review it. Bob had mentioned it earlier, but I think it's very important to have a look and see what's coming out of the digital interface.


    Joseph Wu
  • Hi, 

    how can i set up the registers ?, the ADS122U04 work on DVDD from 2.3 V to 5 V so my 3 V seems to be ok or ?

    I already check the communication and work's good, data came to ADS correctly but there is no back information from ADS.

    Can you send me commands in right order that i need them to send to ADS to get back data on inputs ?

    Best regards

  • Hi Matej,

    At one point you said DVDD is 2.5V, and now you say it is 3V. So this is a bit confusing to me. Can you post a schematic or drawing of your connections? You also have said that you checked your communication and it "work's good". How have you determined this? Can you post some shots of the communication?

    Earlier you seemed to still have some confusion as to the sending of the synchronization byte (0x55). You must always send this synchronization byte every time you wish to send a command to the ADS122U04. See the section 8.5.1.4 on page 24 of the datasheet for the communication protocol.

    The default settings for the ADS122U04 is single-shot mode with AIN0/AIN1 as inputs and internal reference running at 20sps. After powering up the device (RESET must also be high). Send (or TX to the device):
    0x55 0x08 (which is synchronization and START/SYNC command)
    wait at least 50ms before attempting to read then
    0x55 0x10 (which is synchronization and RDATA command)
    Following the successful sending of the RDATA command the data should be transmitted from the ADS122U04 (RX from the device).

    Make sure you have the TX and RX connected correctly. TX from the source goes to RX on the ADS122U04 and vice versa. Also remember that your terminal may not be sending the data as desired or interpreting the returned data correctly. Some commands and data will not be printable. The synchronization byte is 0x55 which is ASCII 'U', but 0x10 is a control character and 0x08 is a backspace.

    Best regards,
    Bob B