Post Go back to editing

How to choose for read FIFO SPI interface for AD6641?

1 How to choose for read FIFO SPI interface for AD6641? In which register of SPI and what values we need to write?

2 How to choose the SPORT interface? In which register of SPI and what values we need to write?

How to initialize a fill command through the SPI port without standby? In which register of SPI and what values we need to write?

4 How to use bits of the register 0x102?

Parents
  • Hi,

    Here are some more specific answers:

    1 How to choose for read FIFO SPI interface for AD6641? In which register of SPI and what values we need to write?

    FIFO readback via SPI is always enabled with 0x107[1:0] = 0x00.

     

        write_reg(0x107, 0x00) // Set to SPI Readback

        write_reg(0x102, 0x04) // Fill Reset

        write_reg(0x102, 0x08) // Dump Reset

       

        n = int(floor(num_samples/64)) – 1

        write_reg(0x104, n) // Write the Number of samples.

        write_reg(0x102, 0x01) // Initiate FILL

     

        status = read_reg(0x10A)    // Read the status

     

        // Keep Reading the status until status[0] == 1 (full)

     

       write_reg(0x102 , 0x02) // Initiate dump

     

        int data_array[num_samples] // Initialize readback array

        for (int i=0 ; i < num_samples ; ++i) {

            low_byte = read_reg(0x10B)

            high_byte = read_reg(0x10C)

            data_array[i] = float(high_byte * 256 + low_byte)

        }

        write_reg(0x102, 0x00) // Clear the dump bit

    2 How to choose the SPORT interface? In which register of SPI and what values we need to write?  Set  address 0x107 [1:0] =10 for SPORT

      

     

    How to initialize a fill command through the SPI port without standby? In which register of SPI and what values we need to write?  To initiate a fill, set address 0x102[0] =1

     

     

    4 How to use bits of the register 0x102?     See above in (1).



    I would be interested to understand why you are not using the data capture card.  Was there a problem procuring this?


    Regards,

    David

Reply
  • Hi,

    Here are some more specific answers:

    1 How to choose for read FIFO SPI interface for AD6641? In which register of SPI and what values we need to write?

    FIFO readback via SPI is always enabled with 0x107[1:0] = 0x00.

     

        write_reg(0x107, 0x00) // Set to SPI Readback

        write_reg(0x102, 0x04) // Fill Reset

        write_reg(0x102, 0x08) // Dump Reset

       

        n = int(floor(num_samples/64)) – 1

        write_reg(0x104, n) // Write the Number of samples.

        write_reg(0x102, 0x01) // Initiate FILL

     

        status = read_reg(0x10A)    // Read the status

     

        // Keep Reading the status until status[0] == 1 (full)

     

       write_reg(0x102 , 0x02) // Initiate dump

     

        int data_array[num_samples] // Initialize readback array

        for (int i=0 ; i < num_samples ; ++i) {

            low_byte = read_reg(0x10B)

            high_byte = read_reg(0x10C)

            data_array[i] = float(high_byte * 256 + low_byte)

        }

        write_reg(0x102, 0x00) // Clear the dump bit

    2 How to choose the SPORT interface? In which register of SPI and what values we need to write?  Set  address 0x107 [1:0] =10 for SPORT

      

     

    How to initialize a fill command through the SPI port without standby? In which register of SPI and what values we need to write?  To initiate a fill, set address 0x102[0] =1

     

     

    4 How to use bits of the register 0x102?     See above in (1).



    I would be interested to understand why you are not using the data capture card.  Was there a problem procuring this?


    Regards,

    David

Children
No Data