计算机与通信综合实验报告武汉大学电气工程学院XXX201X302540XXX目录计算机与通信综合实验硬件实验...................................................................................................1实验一A/D转换实验..............................................................................................................1一、实验目的...................................................................................................................1二、实验内容...................................................................................................................1三、实验接线图...............................................................................................................1四、程序流程图...............................................................................................................1五、实验程序及运行界面...............................................................................................2六、实验步骤...................................................................................................................5七、实验接线及运行结果...............................................................................................6实验二8255A并行口实验(一)..........................................................................................8一、实验目的...................................................................................................................8二、实验内容...................................................................................................................8三、实验接线图...............................................................................................................8四、程序流程图...............................................................................................................8五、实验程序及运行界面...............................................................................................9六、实验步骤.................................................................................................................10七、实验接线及运行结果.............................................................................................10实验三8255A并行口实验(二)............................................................................................13一、实验目的.................................................................................................................13二、实验内容.................................................................................................................13三、实验接线图.............................................................................................................13四、程序框图.................................................................................................................13五、实验程序及运行界面.............................................................................................14六、实验步骤.................................................................................................................18七、实验接线及运行结果.............................................................................................18计算机与通信综合实验软件实验.................................................................................................21实验感悟.........................................................................................................................................24武汉大学电气工程学院XXX2014302540XXX1计算机与通信综合实验硬件实验实验一A/D转换实验一、实验目的了解模/数转换基本原理,掌握ADC0809的使用方法。二、实验内容利用实验系统上电位器提供的可调电压作为0809模拟信号的输入,编制程序,将模拟量转换为数字量,通过数码管显示出来。三、实验接线图图1-1实验一接线图四、程序流程图武汉大学电气工程学院XXX2014302540XXX2图1-2实验一程序流程图五、实验程序及运行界面5.1程序指南(1)ADC0809的START端为A/D转换启动信号,ALE端为通道选择地址的锁存信号,实验电路中将其相连,以便同时锁存通道地址并开始A/D采样转换,其输入控制信号为CS和WR,故启动A/D转换只须如下两条指令:MOVDX,ADPORT;ADC0809端口地址OUTDX,AL;发CS和WR信号并送通道地址(2)用延时方式等待A/D转换结果,使用下述指令读取A/D转换结果。MOVDX,ADPORT;ADC0809端口地址INAL,DX(3)循环不断采样A/D转换的结果,边采样边显示A/D转换后的数字量。5.2实验程序CODESEGMENT;H0809.ASMASSUMECS:CODEADPORTEQU8000hPAEQU0FF21H;字位口PBEQU0FF22H;字形口PCEQU0FF23H;键入口武汉大学电气工程学院XXX2014302540XXX3ORG1000HSTART:JMPSTART0BUFDB?,?,?,?,?,?data1:db0c0h,0f9h,0a4h,0b0h,99h,92h,82h,0f8h,80h,90h,88h,83h,0c6h,0a1hdb86h,8eh,0ffh,0ch,89h,0deh,0c7h,8ch,0f3h,0bfh,8FHSTART0:CALLBUF1ADCON:MOVAX,00MOVDX,ADPORTOUTDX,ALMOVCX,0500HDELAY:LOOPDELAYMOVDX,ADPORTINAL,DXCALLCONVERSCALLDISPJMPADCONCONVERS:MOVAH,ALANDAL,0FHMOVBX,OFFSETBUFMOV[BX+5],ALMOVAL,AHANDAL,0F0HMOVCL,04HSHRAL,CLMOV[BX+4],ALRETDISP:MOVAL,0FFH;00HMOVDX,PAOUTDX,AL武汉大学电气工程学院XXX2014302540XXX4MOVCL,0DFH;20H;显示子程序,5msMOVBX,OFFSETBUFDIS1:MOVAL,[BX]MOVAH,00HPUSHBXMOVBX,OFFSETDATA1ADDBX,AXMOVAL,[BX]POPBXMOVDX,PBOUTDX,ALMOVAL,CLMOVDX,PAOUTDX,ALPUSHCXDIS2:MOVCX,00A0HLOOP$POPCXCMPCL,0FEH;01HJZLX1INCBXRORCL,1;SHRCL,1JMPDIS1LX1:MOVAL,0FFHMOVDX,PBOUTDX,ALRETBUF1:MOVBUF,00HMOVBUF+1,08HMOVBUF+2,00H武汉大学电气工程学院XXX2014302540XXX5MOVBUF+3,09HMOVBUF+4,00HMOVBUF+5,00HRETCODEENDSENDSTART5.3程序运行界面图1-3实验一程序运行界面六、实验步骤①将0809CS4插孔连到译码输出8000H插孔、连JX6→JX17。②将通道0模拟量输入端IN0连电位器W1的中心插头AOUT1(0-5V)插孔。③运行实验程序如在PC机和实验系统联机状态下,运行该实验程序,可用鼠标左键单击菜单栏“文件”或工具栏“打开图标”,弹出“打开文件”的对话框,然后打开8kAsm文件夹,点击H0809.ASM文件,单击“确定”即可装入A/D转换实验源文件,再单击工具栏中编译,即可完成源文件自动编译、装载目标代码功能,再单击“调试”中“R运行”或工具图标运行,即开始运行程序。如果在没有PC机的情况下,则在8086K系统显示监控提示符“P.”时,用户段地址固定为0000(省略输入),按SCAL键,输入起始偏移地址1000,按EXEC键,在系统上显示“08