AnsweredAssumed Answered

Read CFR registers of AD9914 in parallel acces mode with FPGA

Question asked by _USER_ on Jul 7, 2015
Latest reply on Jul 19, 2015 by LouijieC

Hi every body,

 

I have a question abou how to read the values that i wrote inside the control register of the DDS AD9914 through FPGA by using parallel acces mode.

I fact the problem is that what i wrote inside does not give me the result that i expect, so i need to readback and compare the values to see if they are the same.

I'm using NIOS II to implement a function to read,but there is no result,i don't know where the read values is going to be save when i configure the RDB pin and the 8/16 bits data read.

This is my C code:

 

void read(unsigned int addr){

         unsigned int cmd_r = 0x01;

        unsigned  int data=IORD_ALTERA_AVALON_PIO_DATA(DATA_BASE);

        IOWR_ALTERA_AVALON_PIO_DATA(DATA_BASE,((data<<16)&0xFFFF0000)+((addr<<8)&0xFFFFF00)+(cmd_r));

        printf("CFRh = %X\n", data);

      

        return;

    }

 

Best regards.

Outcomes