ADAR1000 SPI

 Hello, I am using ADAR1000 but unfortunately, there is no reference source code. I could not find anywhere. Just we have SPI PROGRAMMING EXAMPLE in the Datasheet. I want to make and control the SPI communication protocol without using GUI. Can you provide example source code?

Best Regards.

Top Replies

Parents Reply Children
  • Yes thank you very much, I think its possible and not difficult to implement it....my only question is, that I dont know how to write the adresses...for example there is the following function to send a byte:

    # Function to send a byte to specific GPIO pin
    def tfr_byte2(data):
        for i in range (0,8):
            GPIO.output(DATA, data & 0x01)
            pulseHigh(W_CLK)
            data=data>>1
        return
    this was the example for AD9850, but for ADAR1000 you have all the adresses and contents, for example 0x180064. Can you just tell me how you would do it for this adress using the function tfr_byte?
    It really would help me a lot...
  • 0
    •  Analog Employees 
    on Aug 5, 2019 3:36 PM over 1 year ago in reply to AShuhl817

    A few things:

    • You need to clock in the 16 preceding address bits, so you need to change the range function
    • You also need to keep the CSB high, unless you are writing bits to the SPI

    So, I think you'd want to change the tfr_byte2() to something like this (changed in bold):

    def tfr_byte2(data):

        GPIO.output(CSB, false)  #Pull the CSB low to enable the SPI port
        for i in range (0,24):
            GPIO.output(DATA, data & 0x01)
            pulseHigh(W_CLK)
            data=data>>1
        GPIO.output(CSB, true)  #Pull the CSB high to disable the SPI port

         return

    You will need to take care of the CSB-to-GPIO pin number mapping in your code.

    Also, in your initialization code of the GPIO lines, you'll want to start the CSB pulled high with:

    #Initialization Code

    GPIO.output(CSB, true)  #Pull the CSB high to disable the SPI port

    No guarantees that this works, but it should give you a pretty good start.  Hope this helps.

  • hi , I have one question...with the ADAR1000 you also can set up the phase assignment. With the phase assignment you can choose your maxima of azimut and elevation angle...

    Could you give me an advice how I can realize an elevation angle of 20 degrees for example with the phase assignment?

    Thanks in Advance

  • 0
    •  Analog Employees 
    on Aug 16, 2019 5:02 PM over 1 year ago in reply to AShuhl817

    This is very system dependent.  I would recommend taking a look at: https://en.wikipedia.org/wiki/Phased_array