数字电压表微机原理课程设计Word文件下载.docx
《数字电压表微机原理课程设计Word文件下载.docx》由会员分享,可在线阅读,更多相关《数字电压表微机原理课程设计Word文件下载.docx(22页珍藏版)》请在冰豆网上搜索。
![数字电压表微机原理课程设计Word文件下载.docx](https://file1.bdocx.com/fileroot1/2023-1/9/36081dc1-7b76-409e-9e21-12920271ee1c/36081dc1-7b76-409e-9e21-12920271ee1c1.gif)
SS;
(2)上电后时钟自由运行,采用24小时制;
(3)利用按键,随时可实现对时功能;
三.设计要求
(4)设计原理线路;
(5)编制应用程序;
(6)联合调试,实现上述功能;
(7)编写设计说明书(含原理图,程序及说明,实验方法,过程及结果)。
四.设计提示
(1)先产生秒脉冲中断信号,在中断程序中实现时钟计数;
(2)在此基础上,可进一步实现秒表功能和倒计时功能。
数字直流电压表
1.基本要求程序:
CODESEGMENT
ASSUMECS:
CODE,DS:
CODE,ES:
CODE
ORG3390H
START:
MOVAL,20H
MOVDX,ADPORT
OUTDX,AL
INAL,DX
MOVSI,OFFSETBUF
MOV[SI],AL
INCSI
MOVCX,3
MOVBH,AL
MOVBL,05H
MULBL
MOVBL,255
DIVBL
MOVAL,AH
MOVAH,0
GOON1:
MOVBH,10
MULBH
LOOPGOON1
MOVAL,[SI]
MOVCL,4
SHRAL,CL
ANDAL,0FH
CALLDIS
JMPSTART
DISPROCNEAR
MOVCL,20H
MOVBX,OFFSETBUF
INCBX
MOVAL,[BX]
PUSHBX
MOVBX,OFFSETLED
XLAT
POPBX
PUSHDX
MOVDL,7FH
ANDAL,DL
POPDX
MOVDX,ZXK
MOVAL,CL
MOVDX,ZWK
PUSHCX
MOVCX,0100H
LOOP$
POPCX
SHRCL,1
JMPDIS1
DIS1:
MOVAL,[BX]
DELAY:
PUSHCX
CMPCL,01H
JZEXIT
EXIT:
MOVAL,00H
RET
DISENDP
ZXKEQU0FFDCH
ZWKEQU0FFDDH
LEDDB0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,88H,83H,0C6H,0A1H,86H,8EH
ADPORTDW0FFE0H
BUFDB?
?
CODEENDS
ENDSTART
2.两个通道同时显示程序:
;
MOVSI,OFFSETBUF1
MOVCX,2
MOVAL,00H
MOVSI,OFFSETBUF2
GOON2:
LOOPGOON2
CALLDISP1
CALLDISP2
DISP1PROCNEAR
MOVBX,OFFSETBUF1
XLAT
DELAY1:
CMPCL,08H
JZEXIT1
EXIT1:
DISP1ENDP
DISP2PROCNEAR
MOVCL,04H
MOVBX,OFFSETBUF2
JMPDIS2
DIS2:
DELAY2:
JZEXIT2
EXIT2:
DISP2ENDP
LEDDB0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H
BUF1DB?
BUF2DB?
3.3个通道3个内存区
P4:
P1:
P2:
MOVDX,0FFDBH
MOVAL,10010010B
MOVDX,0FFD9H
TESTAL,00000100B
JZP1
MOVAL,40H
MOVCX,0200H
CALLDISP3
TESTAL,00000010B
JZP2
TESTAL,00000001B
JZP4
DISP3PROCNEAR
MOVSI,OFFSETBUF3
GOON3:
LOOPGOON3
DIS3:
MOVBX,OFFSETBUF3
JMPDIS3
DELAY3:
JZEXIT3
EXIT3:
DISP3ENDP
MOVAL,20H
LOOP$;
DELAY2:
BUF3DB?
数字电压表硬件电路连接示意图
图1:
ADC0809与数码管显示电路的连接
图2:
ADC0809与8088、8255的连接