2017年7月23日 星期日

Digilent Analog Discovery Kit

Digilent Analog Discovery Kit(ADK in short) is an integrated instrument including
a. 2 channels oscilloscope
b. 16 channels logic analyzer
c. 2 channel arbitrary waveform generator(AWG)
d. 16 channels pattern generator
e. +/- 5V, 50mA power supply


2. TRM - pcb, IC list - overkill for provided components
Top side of the ADK PCB

Bottom side of the ADK PCB
3. software feature - FFT, SA, AWG, PG
4. personal application - BERT, long record pattern generator,

10-bit digital sinewave generation
Matlab code
==========
% pattern file generation for Digilent Analog Discovery Kit
% 2013/01 wjlee
clear;
close all;
%the file format for Waveforms's pattern generator
%line1(header): Bus 1,[9] MSB,[8],[7],[6],[5],[4],[3],[2],[1],[0] LSB
%line2: b0000000000,0,0,0,0,0,0,0,0,0,0
%line3: b0000000001,0,0,0,0,0,0,0,0,0,1
%line1025: b1111111111,1,1,1,1,1,1,1,1,1,1
reclen=1000; %the patgen record length(max=1024)
adcbit=10;   %ADC resolution
dacbit=10;   %DAC resolution
theta=0:2*pi/reclen:2*pi*(1-1/reclen);
adcfull=2^adcbit-1;
dacfull=2^dacbit-1;
amp=round(dacfull*(sin(theta)+1)/2);
plot(amp);
hold on;
grid on;
plot(amp,'r.');
axis([1 reclen 0 dacfull]);


%write data to file
disp('     ');
disp('Generate the "pgenw.csv" for Digilent Analog Discovery Kit Pattern Generator');
disp('     ');
%pgenw='pgenw.csv';
%fid1=fopen(pgenw,'w');
fid1=fopen('pgenw.csv','w');
if dacbit==10
   fprintf(fid1,'Bus 1,[9] MSB,[8],[7],[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
   ampbin=dec2bin(amp,10);
   for i=1:reclen,
     fprintf(fid1,'b%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s \n',ampbin(i,:),ampbin(i,1),ampbin(i,2),ampbin(i,3),ampbin(i,4),ampbin(i,5),ampbin(i,6),ampbin(i,7),ampbin(i,8),ampbin(i,9),ampbin(i,10));
   end
end;
fclose(fid1);
%if dacbit==9 then
%   fprintf(fid1,'Bus 1,[8] MSB,[7],[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
%end;
%if dacbit==8 then
%   fprintf(fid1,'Bus 1,[7] MSB,[6],[5],[4],[3],[2],[1],[0] LSB \n','  ');
%end;
==========


沒有留言:

張貼留言