# converting from floating point to i and q channels in ad9364 no-os software

Hi everyone,

I have a simple question that I would like some clarification on. I am using the zcu102 board with the fmcomms4 and using the baremetal with the no-os software. I have 128bit data which I have converted it to fixed point from floating point. I would like to then like to convert this data into i and q for QPSK modulation. in the no-os software and in the dma example we have the following code that is provided:

```for(index = 0; index < tx_count; index += 1)
{
index_i1 = index;
index_q1 = index + (tx_count / 4);
if(index_q1 >= tx_count)
index_q1 -= tx_count;
data_i1 = (sine_lut[index_i1] << 20);
data_q1 = (sine_lut[index_q1] << 4);
Xil_Out32(DAC_DDR_BASEADDR + index * 4, data_i1 | data_q1);
}```

The code is converting a sine wave to data_i1 and data_q1 and then writing it to the DMA. How would I do the same for my data and convert it to i and q samples and send it to the DMA. should I just shift it like it has been done in the example code.

Thanks.

• You have to load your custom data into the sine_lut array and then you can follow the same logic for separating the I and Q data as given in the axi_dac_core.c

Note that your modulated custom data format should be as below:

• Hi , thank you for responding back, would you please clarify what you mean loading my custom data to the sine_lut array. Assuming I have 200 bits, how would I load it? should I 'or ' it with the sine wave or just transmit the 200 bits in the raw format? i.e. the sine_lut array is like: sin_lut_array[200] = {1,0,0,0,1,1,1....} .

thank you again

• The format has to be in 2's complement 16 bit data. refer to the below links: