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.

ADS7951-Q1: ADS7951 can read channel data correctly

Part Number: ADS7951-Q1
Other Parts Discussed in Thread: ADS7951, ADS7953

Hello, there are some problems when I use read data from ADS7951 by SPI, and SPI baud rate is 2M for SPI clock.

In manual mode, I read read of channel 0 to channel 7 by using SPI command to switch channel, but all return value is channel 0. so I am very confused.

SPI command is:

read channel 0: 0x1800  0x0000

read channel 1: 0x1900 0x0000

read channel 2: 0x1A00 0x0000

...

read channel 7: 0x1B80 0x0000

Now I don't know what wrong is it,  and is it SPI command error?

Could you help me, thanks you very much.

  • Yuebiao,

    SPI command 0x1800: selects manual mode and channel 0

    SPI command 0x1900: selects manual mode and channel 2 <--- not channel 1

    SPI command 0x1A00: selects manual mode and channel 4 <-- not channel 2

    Please refer table 1 from Data sheet below: bits 10 - 7 select channel. So channel 1 0x1880, channel 2 is 0x1900, channel 3 is 0x1980, etc.

    If you are only reading back 0, let's check the device is setup correctly. Could you share a snippet of your schematic showing how ADS7951 pins are connected? ADS7951 needs two supplies +VA and +VBD and external 2.5V reference.  

    Thanks,

    Vishy

  • Hi Vishy,

    I am trying to get the ADS7951 schematic.

    For supplier +VA and +VBD and external 2.3 reference, I have test on board, +VA and +VBD are 3.3V and REF voltage is 2.5V.

    Does it has other mode like fault mode, but I don't find it in datasheet.

    thanks.

    zhang. yuebiao

  • Hi Vishy,

    Today I am trying to test again, and problem is same with last time.

    In manual mode, all channel of voltage set 0 V except channel 0 is 100mV, however I switch to any channel , return value will be channel 0, and also I used DDM test MXO port, it is always 100mV.

    In Auto1 and Auto2 mode, the result is also that only channel 0 value will be read, no other channel information.

    Does the device not receive SPI command, but I can capture the wave of SPI and it is correctly. 

    My configure is:

    Manual mode: 0x1800 0x0000, switch channel: 0x1880 0x0000 ...

    Auto-1 mode: 0x2800 0x8000 0x00ff 0x0000...

    Auto-2 mode: 0x3800 0x91C0 0x0000

    I don't know where the problem is, software or hardware.

    thank you.

  • Yuebiao,

    You mention

    >>>>My configure is: Manual mode: 0x1800 0x0000, switch channel: 0x1880 0x0000 ...

    Just to be sure: Is it correct to say you are doing a 16-bit write 0x1880 and 0x0000 is your read back data?  See below a sample code snippet for how this is done in MSP430

    First the chip select is asserted. Then two bytes are written: msb (0x18) followed by lsb (0x80). In parallel, device shifts out a byte data corresponding to each byte written. These bytes are read and returned as 16-bit data.

    Note the ADS7951 has a 2 cycle delay on start-up... In "cycle N" you tell it which channel to switch to in "cycle N+1" and then the conversion of that is given in "cycle N+2". See following link on this for more information

    e2e.ti.com/.../1077037

    b) Also, please check your SPI clock phase and polarity setup: select clock phase high and clock polarity as low 

    Thanks,

    Vishy

  • Yuebiao,

    Your schematic attachment did not come through. I show below evm schematic snippet. This shows ADS7953: pin connections.

    Thanks,

    Vishy

  • Hi Vishy,

    In manual mode, I send 0x1800 and 0x0000 command (two frames),  and all return data are 0x0000. switch channel command is same as your description.

    I check the SPI command by using oscilloscope that is correctly, but it still can not read other channel data.

    Note: clock phase is high and CS polarity is low.

    thank you.

  • Yuebiao,

    Below I send 0x1880, 0x1900, and 0x1980 to read data from channel 1, channel 2 and channel 3. Channel 1 input = 1.25V, Channel 2 = channel 3 = 0.625V. See below logic analyzer capture of SPI exchange between ADS795x and MSP430: channel 1 data comes out in 3rd frame, channel 2 data comes out in 4th frame and channel 3 data comes out in 5th frame. 

    Thanks,

    Vishy

  • Hi Vishy,
    In manual mode, according to datasheet description, when I send command same with you, the selected channel data should be return. But in fact, the return value is always channel 0.

    thanks.
  • Yuebiao,

    Device indicates the channel number in D15:D12. In example above, in Frame 1 and Frame 2 and Frame 3 I select channel for conversion as1, 2 and 3. In Frame 3 we read back D15:D12 = 1 for channel 1, in frame 4 we read back D15:12 = 2 for channel 2, and in frame 5 we read D15:D12 = 3 for channel 3. I have highlighted this in the screen capture below. Please take a look.

    I think your issue might be to do either with the setup or software code. Can you get me a scope capture of your SPI lines? 

  • Yuebiao,
    Are you using the EVM? Could you please try testing with a different device? Or test a board with different device? May be you are doing everything right and just the board or device is broken.
    Thanks,
    Vishy
  • Yuebiao,

    Is this issue resolved? Were you able to try with ADS795x EVM? Let us know.

    Thanks,
    Vishy