Post Go back to editing

ADAR1000 Daisy Chain SPI Address Pins

Hi,

I would like to control 2 ADAR1000s by daisy chaining them together

To my understanding I will connect P1 pins together on each board and on one of the boards connect the 4 SPI cables.

I also need to AD1 or AD0 to high? Is this correct. I can set it to high using the Arduinos digital pin (5V output)

I am controlling the ADAR1000 using an arduino programmed by MATLAB. I have included a code example below

writeRead(ADAR1000, [0x00 0x00 0x81]) % Reset 

So for the 2nd ADAR1000 I want to set it up as:

writeRead(ADAR1000, [0x01 0x00 0x81]) % Reset 

How would I set the AD1 and AD0 pins to achieve this?

Many thanks,

Zain

  • If you have two boards, let's call them Board 0 and Board 1, and they correspond to Chip 0 and Chip 1 with hardware addresses of 0b00 (AD0 = LOW, AD1 = LOW) and 0b01 (AD0 = HIGH, AD1 = LOW), respectively.  I would connects Board 0's P2 connector to Board 1's P1 connector. 

    On Board 0, you don't need to do anything to the AD0 or AD1 pins and the P10 pins these are connected to can be left unconnected; these are pulled low via pull down resistors that are on the board.  On Board 1, you will want to pull AD0 high.  These pins can be pulled high (1.8V) on the P10 connector.  Please reference the evaluation board schematic linked on the ADAR1000 product webpage.

    DO NOT drive 5V directly into either AD0 or AD1 (via P10) or into the level translators (via P1/P2) as this could cause damage to the ADAR1000 chip and/or the level translators that are on the board.

    If you want to soft reset all chips on the SPI bus, you only need to write 0x81 to Register 0x00 of Chip 0.  Writing to Register 0x00 of Chip 1 is redundant for Chip 1.

    Also, to write to Chip 1, you want the address value to be:

    writeRead(ADAR1000, [0x02 0x00 0x81]) % Reset 

  • Many thanks for the reply I will attempt this.

    If you could just clarify the following. If I follow your instructions the addresses will be the following?

    writeRead(ADAR1000, [0x00 0x1F 153])  Board 0

    writeRead(ADAR1000, [0x02 0x1F 153])  Board 1

  • What is '153'? 

    It looks like you are trying to write to register 0x1F to Chip/Board 0 and Chip/Board 1. 

  • The 153 is 0x99. I will explain further below what I am trying to do. 

    So I connected the ADAR1000s together using the P2 and P1 connectors as mentioned. 

    For board 1 I connected P10 pins 4 and 6 together to set AD0 High.

    P10 Layout:

    1 2

    3 4

    5 6 

    Then I need to test it. So for example this is my code to control 1 ADAR1000.

    a = arduino();

    ADAR1000 = device(a, 'SPIChipSelectPin', 'D10');

    writeRead(ADAR1000, [0x00 0x00 0x81]) % Reset

    writeRead(ADAR1000, [0x00 0x00 0x18]) % SPI Open

    writeRead(ADAR1000, [0x00 0x38 0x60]) % VGA BIAS 2

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    writeRead(ADAR1000, [0x00 0x2F 0x7F]) % Tx Bias

    writeRead(ADAR1000, [0x00 0x36 0x16])

    writeRead(ADAR1000, [0x00 0x37 0x06])

    writeRead(ADAR1000, [0x00 0x31 0x42]) % Current On

    %% TX1
    writeRead(ADAR1000, [0x00 0x1C 0x9D]) % Gain

    writeRead(ADAR1000, [0x00 0x20 0x3F]) % I

    writeRead(ADAR1000, [0x00 0x21 0x20]) % Q

    %% Load Registers
    writeRead(ADAR1000, [0x00 0x28 0x02])

    I am just a bit confused on how to control each device independently.

    writeRead(ADAR1000, [0x00 0x21 0x20]) % Q

    For the above the 0x00 is the device address? So how do I address board 0 and board 1.

    I hope this now makes sense.

  • Update.

    I setup and have realised one of the ADAR1000s is unresponsive. I took a new one out the box and it didn't work in the daisy chain I have now been testing it with an SDP-S and it is unresponsive.

    In the ADAR1000 software I can connect to it but the device will not do anything. For example I can't set max gain etc. 

    Is there a way we can test it?

    It is drawing 0.030A from the 3.3v supply and the LED is on.   

  • OK, so for Board 1 you have pulled AD0 high, which is correct.  But your code is writing to Board 0's hardware address; you have no writes to Board 1.

    To write to board 1, you would do something like this (changes in bold):

    writeRead(ADAR1000, [0x20 0x00 0x81]) % NO chips on the SPI bus reset

    writeRead(ADAR1000, [0x20 0x00 0x18]) % Chip 1 SDO enable

    writeRead(ADAR1000, [0x20 0x38 0x60]) % VGA BIAS 2

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    writeRead(ADAR1000, [0x20 0x2F 0x7F]) % Tx Bias

    writeRead(ADAR1000, [0x20 0x36 0x16])

    writeRead(ADAR1000, [0x20 0x37 0x06])

    writeRead(ADAR1000, [0x20 0x31 0x42]) % Current On

    %% TX1
    writeRead(ADAR1000, [0x20 0x1C 0x9D]) % Gain

    writeRead(ADAR1000, [0x20 0x20 0x3F]) % I

    writeRead(ADAR1000, [0x20 0x21 0x20]) % Q

    %% Load Registers
    writeRead(ADAR1000, [0x20 0x28 0x02])

    Note that when you write these:

    writeRead(ADAR1000, [0x00 0x00 0x81]) % ALL chips on the SPI bus reset

    writeRead(ADAR1000, [0x00 0x00 0x18]) % ALL chips on the SPI bus have their SDO enabled

    You do not want to enable all the SDOs as there is a SPI contention documented in the silicon errata and Rev. B preliminary datasheet here: https://wiki.analog.com/resources/errata/adar1000

  • If you are using the ADAR1000 software, you need to check/uncheck the ADDR0 and ADDR1 boxes on the Connection tab to control other chips other than Chip 0. 

    You can also set the AD0 and AD1 bits directly (like you do in the code above) in the Manual Register Write tab.  The syntax on this tab is just one hexidecimal number.  So to make these equivalent writes:

    writeRead(ADAR1000, [0x00 0x1C 0x9D]) % Gain

    writeRead(ADAR1000, [0x20 0x1C 0x9D]) % Gain

    You would just input the following for Boards 0 and 1:

    001C9D

    201C9D

  • Hi thanks again,

    So a newly opened ADAR1000 will not program via spi on arduino or via the sdp in the dedicated software. The other board I have works fine.

    I was reading the register addresses and they are all set to FF. I know after a reset the actresses are set to FF.

    So I suspect this board is stuck in a reset state and there is a fault with the SPI bus in the board.

    Do you know what I can do? 

  • Try observing the SPI lines with an oscilloscope before and after the level translators on the board.  Make sure that you are actually signals to the ADAR100 SPI pins.

  • I have now checked the SPI lines and level translators and can see that the ADAR1000 is receiving signals. The device will simply not program. 

    I have also tried a hard and soft reset. 

    Is there a returns process I can arrage?

    Many thanks,

    Zain