Post Go back to editing

SPI Read protocol unclear for AD5142

I'm using the AD5142 for my application. I can write to the device and update the wiper position etc  fine using the description of the SPI interface and protocol in the data sheet. However, I cannot currently use the read functionality (Command number 3). Unlike using the SDO pin for daisy chaining devices, the datasheet only briefly mentions that SDO can also be used to read internal device state via command number 3 and never gives and example or description of how.

- For instance, do I need to use a 24 clock cycle and read the result back in the last 8 bits after the 16-bit request? 
- The datasheet says that the the SDO pin will provide 16-bit shifted version of SDI input for daisy chaining. This seems to conflict with the statement that it can be used for reading via command 3 as well.

Another ambiguity in the datasheet are Tables 11 and 17 which describe the meaning of the address bits in the SPI command. There is a column called "Stored Channel Memory" that I cannot find a description for in the datasheet. Is this the addressing used for selecting the address within EEPROM to read back? And just so its clear: I have a 2.2k pullup on SDO as required in the datasheet.



Added that I have 2.2k pullup on SDO
[edited by: jonnew at 2:20 PM (GMT 0) on 15 Jul 2020]
Parents
  • Are you using a part as a standalone or in daisy chaining?

    A standalone part requires a 16 clock cycle as given in figures 2,3,4.

    You will read the result back in the next frame, following the command 3 in the current frame.

    In the daisy chaining mode, in the same frame, SDO pin will provide the 16 bit shifted version of the SDI input. There is no conflict here as both addresses different requirements.

    EEPROM is the stored channel memory. You can select EEPROM using Command 3 by writing D1:D0 = 01.

    Table 11 has been provided with respect to Table 10. 

  • I have finally figured this out. The issue is that the clock speed was too high for the open-drain SDO with pullup (2.2k) to handle. I simply slowed my clock down from 20 to 1 MHz, which luckily is OK for my application, and the 16-bit standard SPI protocol worked fine.

Reply Children
No Data