Post Go back to editing

AD9102 Trigger and UPDATE bit (0x1D)

Hello everybody,

tried to send the registers which are in the example6.regval to FPGA, after that, I sent 0x01 to register 0x1D and then set Trigger high and low. But I have no Sine wave from DAC.

1- Should I repeat UPDATE bit (0x1D) for the trigger as well?

2- Is any specific time for trigger needed?

3- Is any specific time for UPDATE bit (0x1D) needed?

4- For Sine wave from DDS, should I write some data into the RAM? 

5- How can I read the sent data (from FPGA) through AD9102 software?

Regards,

Akbar



DDS
[edited by: akbar at 2:54 PM (GMT 0) on 30 Apr 2019]
Parents
  • Hello Akbar,

    1-4: no

    5: click on the "Register_Contents" tap at the bottom of the GUI.

    Regards,

    Will

  • Dear Will,

    after loading example6.regval, trigger high and low is done by "write active tab". 

    1- What does do the "write active tab" ? Which register and bit are going to be changed?

    2- Is the example6.regval a specific configuration for using the eval-Board and GUI ? 

    Was it a proper decision using the example6.regval configuration to communicate between FPGA and DAC ? (I did the same, but no output Sine wave)

    Regards,

    Akbar

    • Dear Will,

    so what about trigger ?

    and the method which I write data from 0x00 to 0x007F, was it correct?

    Regards,

    Akbar

  • Dear Akbar,

    For the trigger you want to make sure that jumper jp1 is open.

    The way you write the SPI, you want to bring CS_B high after writing reg0x0, and low again before writing reg0x1, and leave it low for the remainder of the SPI writes.

    If the SPI writes were not successful, you may also want to try writing each register separately (CS_B low, command, data, CS_B high).

    Regards,

    Will

  • Dear Will,

    surprised hearing that!

    You suggest "bring CS_B high after writing reg0x0, and low again before writing reg0x1, and leave it low for the remainder of the SPI writes."

    So why it has not been mentioned in the datasheet? Or is it a suggestion in this case?

    Regards,

    Akbar

  • Dear Akbar,

    The datasheet did mention that but not in great detail. According to page 18 of the datasheet, "The SPI port automatically increments the register address if CS_B stays low beyond the first data-word allowing writes to or reads from a set of contiguous addresses." If you don't bring CS-B high after writing reg0x0, it may interpret the next write command as data for reg0x1.

    Since reg0x0 is the configuration register, it is a good idea to finish the write by bring CS_B high, before proceeding to other registers.

    Regards,

    Will

  • Dear Will,

    Thank you for your reply.

    According to page 18 of the datasheet and as I understood, I brought CS_B low and kept it low, sent '0' [15] through SDIO as write command and '0' [14:0] as the address of Reg0x00. Then I sent the second byte '0' as data [15:0].

    After that, for the second register and second data (Reg 0x01 to 0x7F), I did not send the next address, because SPI port automatically increments the register address if CS_B stays low.

    Finally, for RAMUPDATE, Address 0x1D, I brought CS_B low, sent write command, address of Reg0x1D [14:0], then 0x01 as data for Reg0x1D.

    Regards,

    Akbar

  • Dear Akbar,

    I think what you are doing is fine. Just make sure that you can read back the correct values. Except the RAMUPDATE bit of course, since it is self clearing.

    Regards,

    Will

  • Dear Will,

    Thank you again for your reply.

    To Readback:

    1- can I read immediately after sending last data?

    Should I consider spesific time and then send the read command?

    2- should I follow same procedure? (CS_B low, first address, data, CS_B high, again CS_B low and so on...).

    Regards,

    Akbar

  • Dear Akbar,

    1, You want to do it after you write the RAMUPDATE bit and bring CS_B high.

    2. Yes.

    Regards,

    Will

  • Dear Will,

    I did following:

    CS_B low, first address, data, CS_B high, again CS_B low and so on... for every address, finally Readback was sucssefull but still I have not any out put signal.

    Regards,

    Akbar

  • Dear Akbar,

    I am sorry to hear that.

    The register values that you read back after you wrote through FPGA, are they the same as the values that you read back (by clicking on Register_Contents tab) before you modified the board? How did you apply the trigger_B signal?

    Regards,

    Will

Reply
  • Dear Akbar,

    I am sorry to hear that.

    The register values that you read back after you wrote through FPGA, are they the same as the values that you read back (by clicking on Register_Contents tab) before you modified the board? How did you apply the trigger_B signal?

    Regards,

    Will

Children
  • Dear Will,

    as far as I remember, they were the same, but I am not 100% sure. I will let you know on Monday.

    1- Referring to your suggestion, jumper jp1 is open and I have connected the TP30 directly to the Trigger port.

    2- Actually, with the logic (FPGA), the trigger is high as default. I don't know whether default hight is correct? 

    So I set it high again (or keep it high again) not after one clock cycle, but only a few u sec, then low and again a delay, after that Readback is executed.

    Regards,

    Akbar

  • Another thing is that the SRAM data are left aligned meaning the 12 bits are 15:4, not 11:0 as in the data sheet page 27. You may want to read back a few SRAM registers to make sure they are what you wrote.

    Regards,

    Will

  • Dear Will,

    I will write only 33 registers and readback 128 registers.

    33 registers are:

    x"0000",   data = x"0000", 
    x"0001",   data = x"0E00",  
    x"0002",   data = x"0000",  
    x"0003",   data = x"0000",  
    x"0007",   data = x"4000",  
    x"0008",   data = x"0000",  
    x"000C",   data = x"1F00",  
    x"000D",   data = x"0000",  
    x"000E",   data = x"0000",  
    x"001D",   data = x"0000",  
    x"001E",   data = x"0000",  
    x"001F",   data = x"0000",  
    x"0020",   data = x"000E",  
    x"0025",   data = x"0000",  
    x"0027",   data = x"1232",  
    x"0028",   data = x"0111",  
    x"0029",   data = x"0200",  
    x"002B",   data = x"0101",  
    x"002C",   data = x"0003",  
    x"002D",  data = x"0000",  
    x"0031",   data = x"0000", 
    x"0035",   data = x"4000",  
    x"0037",   data = x"7E00",  
    x"003E",   data = x"0750",  
    x"003F",   data = x"7500",  
    x"0043",   data = x"0000",  
    x"0044",   data = x"0002",  
    x"0045",   data = x"0000",  
    x"0047",   data = x"0000",  
    x"005C",   data = x"0FA0",  
    x"005D",   data = x"0000",  
    x"005E",   data = x"0000",  
    x"005F",   data = x"7FFF" 

    Write:

    Readback:

    I readback Reg0x01  as 00E7

    and

    I readback Reg0x02 as 0070. 

    Refering to datasheet, [2:0] for both Reg0x1 and Reg0x02 RESERVED bits.

    Are the read data correct, even the RESERVED bits

    Regards,

    Akbar

  • Dear Will,

    in this regard, I should mention that I want to generate Sin wave, so I guess there is nothing to deal with SRAM or did I get it wrong?

    Regards,

    Akbar

  • Dear Akbar,

    The read data are not correct. Reg0x01 is ok as [2:0] are reserve bits, but non-reserve bits on other registers (reg0x02 reg0x07) not match either.

    Can you zoom in on the reg0x02 and also include SCLK.

    Regards,

    Will

  • That is correct. If you just want sine wave, you should use the DDS functionality and you don't need SRAM (unless you want to modulate the sine wave with SRAM data).

    Will

  • Yellow is SCLK

    0x02:

    0x07:

    and 0x7F:

    0x0E:

    0x0B:

    0x0C, 0x0B, 0x0A, 0x09:

    Trigger is high, after 2ms is low:

    Here the Yellow is Trigger.

  • Dear Will,

    as I mentioned previously,

    1- I copied the registers from "example6.regal" and sent to AD9102,

    2- due to unsuccessful result (sine wave), I only tried to send only 33 registers of the whole "example6.regal".

    Consequently, it would be greatly appreciated

    3- if you check these 33 registers and let me know whether they are correct or not:

    33 registers are:

    x"0000",   data = x"0000", 
    x"0001",   data = x"0E00",  
    x"0002",   data = x"0000",  
    x"0003",   data = x"0000",  
    x"0007",   data = x"4000",  
    x"0008",   data = x"0000",  
    x"000C",   data = x"1F00",  
    x"000D",   data = x"0000",  
    x"000E",   data = x"0000",  
    x"001D",   data = x"0000",  
    x"001E",   data = x"0000",  
    x"001F",   data = x"0000",  
    x"0020",   data = x"000E",  
    x"0025",   data = x"0000",  
    x"0027",   data = x"1232",  
    x"0028",   data = x"0111",  
    x"0029",   data = x"0200",  
    x"002B",   data = x"0101",  
    x"002C",   data = x"0003",  
    x"002D",  data = x"0000",  
    x"0031",   data = x"0000", 
    x"0035",   data = x"4000",  
    x"0037",   data = x"7E00",  
    x"003E",   data = x"0750",  
    x"003F",   data = x"7500",  
    x"0043",   data = x"0000",  
    x"0044",   data = x"0002",  
    x"0045",   data = x"0000",  
    x"0047",   data = x"0000",  
    x"005C",   data = x"0FA0",  
    x"005D",   data = x"0000",  
    x"005E",   data = x"0000",  
    x"005F",   data = x"7FFF" 

    x"001D",   data = x"0001", 

    By the way,

    4- reminder:

    the goal is to generate sine, triangle and square wave with AD9102. So, I have generated them using AD9102 Evaluation Board. 

    Now, I must do the same, generating sine, triangle and square wave  but sending registers from FPGA to AD9102.

    Regards,

    Akbar

  • Dear Akbar,

    The registers are double buffered, and they don't get updated until you write 0x1 to the RAMUPDATE register. Thus you can't read them back immediately.

    Regards,

    Will

  • Dear Will,

    Thank you for the reply, yes, for sure I write 0x1 to the RAMUPDATE register. So I did.

    Refering to your previouse responses in this topic, I write 0x1 to the RAMUPDATE register immediately after writing last register, then I read 128 registers back.

    Regards,

    Akbar