AD9576 programming problem via SPI

Hi, Im Juan.

I need to program the AD9576 via SPI, so I have set pins 22 and 49 high for this purpose. For the configuration of the registers I have used the ACE software, I have selected the reference correctly (ref1 = CMOS 200 MHz) and the outputs enabled but still nothing is displayed at the output. My biggest doubt is that the instruction word is not being sent correctly. My method is to configure the single instruction first through register 0x001 (SPI configuration B) and then update through register 0x00F (I/O update) and start sending address followed by data. It is worth mentioning that I do this by sending 8 byte packets and I don't know if this is a problem. I would like to know if there is a bug in this communication method.

Regards,

Juan Camilo Peña A.

Parents
  • Hi,

    please send me the cso file you created using the AD9576 evaluation software to see the SPI registers setting you target.

    I suppose you leave register 0x0000 to its default value of 0x00, which means the controller sends the LSB first and the address is decremented in a multibyte transfer.

    Then you set the register 0x0001 to use single instruction, which means the bit 7 is set to 1. This further means that a write operation contains only 3 bytes. I do not believe that sending 8 bytes is good. You may confuse the AD9576.

    To test you are executing correctly the write/read operations, please start by reading registers that have a non zero default value, like registers 0x0003, 0x0004, 0x0005, 0x0006.

    Then you begin writing one register, do IO Update and then you read it back (make sure the bit 5 of register 0x0001 is left at 0, the default value). 

    After you are sure you read/write register correctly, you move to the initialization procedure outlined below:

    Write all registers and then execute IO Update. Then execute the VCO calibration procedure (see page 34 in rev A data sheet), followed by a sync operation of the outputs (see page 37 in the data sheet).

    Petre

  • AD9576_RegisterMap.xls

    Hi Petre, thank you for answer.

    Below I attach the register map in xls format. Regarding the 8 byte, it was my mistake and I meant to say 8 bit. I do 8 bit transmissions to complete the 24 bit word in single instruction mode and as I mentioned I first modify register 0x001 to enable single instruction mode followed by an I/O update instruction. Checking the datasheet on page 42 (Implementation Specific Details) it mentions that Optional single-byte instruction mode: not supported, this makes me think that maybe I should always use streaming mode, correct me if I am wrong please.

  • Hi,

     "¿What would be the first instructions words to program the AD9576 register map with the SPI, if I want to use a single instruction mode for the initialization or modify some registers?"

    I recommend:

    - take the register values from the cso file

    - change the register 0x0001 to 0x80 to enable the single instruction mode

    - write all the registers values into the AD9576

    Again, there is no need to do IO Update after every single write operation. Do it after you write all registers.

    It it was me doing this, I would do the following:

    - write the register 0x0000 with value 0x24, that is enable address ascension.

    -write then groups of registers following the contiguous registers from the cco file. For example, I would write registers 0x0001 to register 0xE in streaming mode. Then I would write registers 0x20 and 0x21, then register 0x40, then registers 0x80 to 0x83, etc. At the end, I would do IO Update.

    Then apply the reference clock and start the calibration of PLL0 VCO: set bit 3 of register 0x100 to 1, then poll register 0x20 for bit 2 until it becomes back 0 (is 1 during calibration) and then clear bit 3 of register 0x100 to 0.

    Then issue a sync command to PLL0 related dividers:

    Then issue a PLL1 sync: set bit 2 of register 0x200 to 1, issue IO Update, then clear bit 2 of register 0x200 to 0, issue IO Update.

    This should be it.

    You still did not tell me if you were able to read and write registers following the debug procedure I recommended

    Petre

  • Hi Petre,

    I tried to read registers 0x004, 0x00C and 0x120 because they have a non zero default value but my test didn´t work. I think it's my SPI PIC configuration but I have a question, to read the SDI/SDO bus (pin 15) should 8 clock cycles be done after the last byte (LSB address) by sending a 0x00 or should it be done on the falling edges of the SCK ?

  • Hi,

    when the SPI sends data bytes, it puts the bits on the positive edges of SCLK (i.e. low to high transitions). The AD9576 samples them on the negative edges of SCLK (i.e. positive to negative transitions).

    Then, when the AD9576 sends bits back to the controller, it does the same: it puts bits on the positive edge of SCLK and the controller receives them on the negative edge.

    So you have to set the controller to continue to send SCLK clocks after the 16 bits instruction header for the AD9576 to be able to respond.

    If you want to read only a 8 bit word, send 8 SCLK clocks after the first 16 bits and SCLK clocks.

    Petre

  • Hi Petre,

    Sorry for dont answer before. I dont had the hardware with the AD9576 inside it. 

    I made the test that you told me about read the deafult registers of AD9576, with this test I verified the SPI communication is in MSB mode. My SPI master is a PIC in mode 0, with the SDI and SDO in different pins. I dont know if this could be the problem.

    I send 3 bytes, the first and second has the register address in read mode, the third one byte contains a 0x00, this is a dummy byte to have the SCK one more byte, to return the default value. But the voltage of the data read was of 1V.

    CLKGEN: mode = RD, register address = 0x004, default value = 0x4F

    CLKGEN: mode = RD, register address = 0x00C, default value = 0x56

    Could you help me with this, please.

    Thanks in advance and best regards.

    Juan Camilo Peña A.

  • Hi,

    "I send 3 bytes, the first and second has the register address in read mode, the third one byte contains a 0x00, this is a dummy byte to have the SCK one more byte, to return the default value. But the voltage of the data read was of 1V."

    I believe sending 0x00 as the 3rd byte creates a contention with the AD9576 trying to send the register value back to the controller. There must be a SPI setting in the controller that allows you to send a clock to the AD9576 on the SCLK line without putting a byte on its SDO line.

    Petre

Reply
  • Hi,

    "I send 3 bytes, the first and second has the register address in read mode, the third one byte contains a 0x00, this is a dummy byte to have the SCK one more byte, to return the default value. But the voltage of the data read was of 1V."

    I believe sending 0x00 as the 3rd byte creates a contention with the AD9576 trying to send the register value back to the controller. There must be a SPI setting in the controller that allows you to send a clock to the AD9576 on the SCLK line without putting a byte on its SDO line.

    Petre

Children