Hi, I have got the DCA1000 EVM and the raw data from it. But I find the data format in DCA1000 EVM is not the same as the data from TSW1400 EVM. So where can I find the data format in DCA1000 EVM. Thank you !
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, I have got the DCA1000 EVM and the raw data from it. But I find the data format in DCA1000 EVM is not the same as the data from TSW1400 EVM. So where can I find the data format in DCA1000 EVM. Thank you !
This is the data format I have found in data sheet, and I write a matlab code to calculate I/Q data. But that doesn't look right. Is there anything wrong with my program
% change based on sensor config %---------------------------------------------------------------------
numADCBits = 16; % number of ADC bits per sample
numLanes = 4; % do not change. number of lanes is always 4 even if only 1 lane is used. unused lanes
isReal = 0; % set to 1 if real only data, 0 if complex dataare populated % with 0
%---------------------------------------------------------------------
%% read file and convert to signed number
% read .bin file
fid = fopen(fname,'r');
adcData = fread(fid, 'uint16'); % compensate for offset binary format
adcData = adcData - 2^15;
fclose(fid);
%% organize data by LVDS lane
% reshape data based on two samples per LVDS lane
adcData = reshape(adcData, numLanes*2, []);
% combine real and imaginary parts of complex number
adcData = adcData([1,2,3,4],:) + sqrt(-1)*adcData([5,6,7,8],:);
cdat = adcData;
I have solved the problem, I share my code here! And thank you for your help
%% read file and convert to signed number
% read .bin file
fid = fopen(fname,'r');
adcData = fread(fid, 'uint16'); % compensate for offset binary format
fclose(fid);
% Bin_adcData = dec2bin(adcData,16);
adcData(adcData>2^15)=adcData(adcData>2^15)-2^16;
%% organize data by LVDS lane
% reshape data based on two samples per LVDS lane
adcData = reshape(adcData, numLanes*2, []);
% combine real and imaginary parts of complex number
adcData = adcData([1,2,3,4],:) + sqrt(-1)*adcData([5,6,7,8],:);
cdat = adcData;