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.

ADS1120EVM: ADS1120EVM

Part Number: ADS1120EVM
Other Parts Discussed in Thread: ADS1120,

I am trying to communicate with ADS1120 with SPI communicatiion with rate 1MHz. my first question is IS it possible to comminucate with 1MHZ rate ?  I am able to see Clock, write data and CS pin on the oscilloscope but not able to get read data. Could you please help me out. below is my current flow:

write (Reset)

delay

write register (0x4181)

write register (0x45A4)

write register (0x49C0)

write register (0x4D02)

Write (0x22)

Read(Rxbuffer)

I am getting read buffer as 0xFFFF every time. 

  • Hi Sanket,

    Welcome to the E2E forum!  1MHz SCLK should not be an issue.  The SPI timing is given in the ADS1120 datasheet on section 6.6 and is specified as a minimum period of 150ns which would translate to a maximum clock frequency of 6.6MHz.

    It would be helpful for me to actually see your scope shot to verify that the polarity and phase are correct.  One common mistake that I've seen is not holding CS low throughout the entire communication transaction.  If CS toggles at each byte, for example, then the communication will cancel the desired action.

    As to the communication, it appears that you are actually attempting to write incorrectly.  The WREG command is b0100 rrnn, where is rr is the bit address of the desired starting register address and nn refers to the number of registers to be written - 1.  As there are 4 possible registers, rr could range from b00 to b11.  To write one register the value for nn would be b00 and to write all four registers the value would be b11.  Certain combinations would be invalid such as 0x4F as you cannot start writing at register 0x3 and write 4 registers.

    write register (0x4181) appears to be write registers starting at 0 and write 2 registers (0x41 = 0100 0001) with data 0x81.  If your micro is transmitting in 16-bit word lengths, then you could transmit as a single word but would require the change to be 0x4081 which would write 1 byte to register address 0x00.  So it appears that you are addressing correctly but incorrectly setting the number of registers to be written to 2 instead of 1.  Remember that 'nn' is the number of registers to be written - 1.

    When reading the registers, the command you are using is 0x22, which is read registers starting at 0 and read 3 registers.  You must make sure that you are sending the required number of SCLKs to actually retrieve the data by transmitting NOPs (0x00 or 0xFF for byte size transfers and 0x0000 or 0xFFFF for 16-bit word transfers).  Again, scope or logic analyzer shots of the communication showing all four SPI signals would be very helpful for me to see.

    If you are using the ADS1120EVM and connecting the ADS1120 to a different micro, then you must make sure that all the required signals are present, and that the onboard micro is disabled.  You should install jumpers JP5 and JP6 to disable the output of the micro to the ADS1120.

    Best regards,

    Bob B