- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
量差分输出、电流模式数/模转换器(DAC)的线性度
LSB=(max(VOUT)-min(VOUT))/65535;
INL(1)=0;
DNL(1)=0;
for i=2:65536
INL(i)=(VOUT(i)-(VOUT(1)+(i-1)*LSB))/LSB;
DNL(i)=(VOUT(i)-VOUT(i-1)-LSB)/LSB;
end
%Plot INL
figure(2)
plot(DacCodes, INL);
title('DAC Integral Linearity');
xlabel('DAC Input Code');
ylabel('INL (LSBs)');
axis([0 65536 min(INL)*1.1 max(INL)*1.1]);
set(gca,'XTick',0:16384:65536)
%Plot DNL
figure(3)
plot(DacCodes, DNL);
title('DAC Differential Linearity');
xlabel('DAC Input Code');
ylabel('DNL (LSBs)');
axis([0 65536 min(DNL)*1.1 max(DNL)*1.1]);
set(gca,'XTick',0:16384:65536)
txtstr=sprintf('INL MAX = %f', max(INL));
disp (txtstr);
txtstr=sprintf('INL MIN = %f', min(INL));
disp (txtstr);
txtstr=sprintf('DNL MAX = %f', max(DNL));
disp (txtstr);
txtstr=sprintf('DNL MIN = %f', min(DNL));
disp (txtstr);
16位脚本产生的曲线
来源:维库开发网
上一篇:浅析IPv6的发展和完善
下一篇:FPGA并行数字序列传输与接口技术应用