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: Firmware Programming this part via an Arduino SPI Bus

Part Number:

Hi,

I am using the 12 bit version of this part, and your timing diagram seems to indicate a need for a single 16 bi transfer to obtain the data. Can this be done with two sequential SPI commands? What does one transmit to get the second byte? I hope I don't need to write my own special purpose 16 bit SPI drive.

Carl

  • Hi Carl

    If you plan to use two bytes to read data from ADS7951 then you need to make sure CS signal should not toggle when you perform this operation. CS should remain low during this time period. If this condition is met then you should be able to read data with two byte/ frames

    Thanks & Regards

    Abhijeet

  • Carl Angotti said:

    Part Number: ADS7951

    Hi,

    I am using the 12 bit version of this part, and your timing diagram seems to indicate a need for a single 16 bi transfer to obtain the data. Can this be done with two sequential SPI commands? What does one transmit to get the second byte? I hope I don't need to write my own special purpose 16 bit SPI drive.

    Carl

    Hi,

    I received a note from Abhijeet Godbole that indicated that as long as I don't toggle the /CS line, I can read the 16 bits with two sequential  8 bit reads.The final question is, what do I "transmit" to the master chip for this second read, a "null", or a repeat of the last command, or what? Is there a "no op" for the chip so it can handle this situation? If I know that, I can now write my code and then test it when the Board is finally available in a month, or so.

    Would appreciate hearing an answer. Thanks,

    Carl

  • Hi,

    This is Carl writing again. I guess I was missing the obvious. What I need to do is to break up the outgoing 16 bit word into two 8 bit chunks. First Bits 15 to 8, followed by sending the next eight bits 7 to 0. That would make 16 outgoing bits and 16 incoming bits. Then I need to keep track of the returning bytes, and treat them accordingly.

    Please let me know if there are any flaws in my thinking.

    Thanks,

    Carl
  • Hi Carl,

    You are right - splitting the outgoing 16-bit command word into two bytes is the correct approach.

    To answer your other question, "0000" is a NOP code and causes the device to continue operation in the previously configured mode. This is described in section 9.4.7 of the datasheet.

    Regards,

    Sandeep

  • Now this board Hardware is completed. Note: This is not my first design using multiple ICs on an SPI bus.

    For a few weeks now I have been trying to get this part to work correctly. I have read, in detail, both of the specs I could find on this part (Revised Specs SBAS652A –MAY 2014–REVISED AUGUST 2014 and SLAS605B –JUNE 2008–REVISED JULY 2015).I have not been able to find any other useful info from TI discussing this on the TI site, or the Internet.

    In the code, I do five sequential reads, and have tried to use either the NOOP (0000) command after an initial one, and a "brute force" approach that repeats the commands each time. I have also toggled the CS/ line for each "manual" command. Nothing so far has caused this part to appear to function at all, and NO signal ever appears on the SO line.

    I am using three other parts, with separate CS/ lines to talk to each of them. Two of these work. I can't test the other without this ADS7951 working.

    A major question, as this is VERY unclear in either of the two specs: what SPI Mode is this IC to operate in. By this, I would like to know, what is the "official" SPI Mode that is required to operate this IC. By this I mean what is the Mode as described in the WikiPedia SPI Bus Page:  en.wikipedia.org/.../Serial_Peripheral_Interface_Bus.

    These appear as follows:

    ModeCPOLCPHA
    0 0 0
    1 0 1
    2 1 0
    3 1 1

    My interpretation is that this IC should work in Mode 1. Is that correct? That is what the timing diagrams appear to say. The other ICs on the bus operate on what is defined as Mode 0 on this diagram. And yes, I am switching Modes to talk to this IC.

    I don't wish to discuss this application further on-line for client confidentiality. Is there a way to get Ap help with this chip with direct communications to an Ap Engineer? I need this resolved soon, or I will have to re-spin this PCB and use more reliable ICs.

    Would appreciate any input.

  • Hello Carl

    I am taking this query offline. Please provide your email id so that we can connect you over email

    Thanks & Regards

    Abhijeet