毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

数控直流稳压电源设计方案 第6页

更新时间:2010-2-19:  来源:毕业论文
数控直流稳压电源设计方案 第6页
KEYSCAN:   PUSH         PSW
           PUSH         ACC
           PUSH         B
           PUSH         DPH
           PUSH         DPL
           SETB         RS0
           SETB         RS1
           ACALL        DELAY1                 ;消抖延时
           JNB          P3.3,LIST
           MOV          DPTR,#PORTA            ;恢复B口输出低电平
           MOV          A,#00H
           MOVX         @DPTR,A
           POP          DPL
           POP          DPH
           POP          B
           POP          ACC
           POP          PSW
           RETI                                ;没有按
LIST:      MOV          DPTR,#PORTC
           MOVX         A,@DPTR
           MOV          3BH,A
           MOV          R2,#0FEH
           MOV          R3,#00H
LINE0:     MOV          DPTR,#PORTA
           MOV          A,R2
           MOVX         @DPTR,A
           MOV          DPTR,#PORTC
           MOVX         A,@DPTR
           JB           ACC.0,LINE1
           MOV          A,#0
           AJMP         TRYK
LINE1:     JB           ACC.1,LINE2
           MOV          A,#1
           AJMP         TRYK
LINE2:     JB           ACC.2,LINE3
           MOV          A,#2
           AJMP         TRYK
LINE3:     JB           ACC.3,NEXT
           MOV          A,#3
           AJMP         TRYK
NEXT:      ;INC          R3
           MOV          A,R3
           ADD          A,#4
           MOV          R3,A

           MOV          A,R2
           JNB          ACC.3,EXIT
           RL           A
           MOV          R2,A
           AJMP         LINE0
EXIT:      MOV          DPTR,#PORTA              ;恢复B口输出低电平
           MOV          A,#00H
           MOVX         @DPTR,A
           POP          DPL
           POP          DPH
           POP          B
           POP          ACC
           POP          PSW
           RETI                                  ;没有按
TRYK:      ADD          A,R3
           MOV          3AH,A


LETK:      MOV          DPTR,#PORTC
           MOVX         A,@DPTR
           XRL          A,3BH
           JZ           LETK
           MOV          DPTR,#PORTA              ;恢复B口输出低电平
           MOV          A,#00H
           MOVX         @DPTR,A
           POP          DPL
           POP          DPH
           POP          B
           POP          ACC
           POP          PSW
           RETI

 

 

 

;*******************电流设置****************
SETONE:
           SETB         RS0
           SETB         RS1
           ;SETB         01H                     ;置显示闪烁位
SETONE1:   MOV          A,3AH
           CJNE         A,#10,L1
L1:        JNC          SETONE1

           JB           00H,L3
           CJNE         A,#2,L2                  ;2000MA
           MOV          DISP0,#2
           MOV          DISP1,#0
           MOV          DISP2,#0
           MOV          DISP3,#0

           ;CLR          01H
           CLR          RS0
           CLR          RS1
           PUSH         PSW
           SETB         RS1
           ACALL        BCDHEX                   ;十辣位BCD变十辣进制
           ACALL        SUBBV                    ;*2再送DA
           POP          PSW
           CLR          A
           RET
L2:        MOV          3AH,#0FFH
           JNC          SETONE1
           SETB         00H

L3:        MOV          @R1,A                    ;即时刷新显示缓冲区
           INC          R1
           MOV          3AH,#0FFH
www.751com.cn
           ;CLR          01H
           CLR          RS0
           CLR          RS1

           PUSH         PSW
           SETB         RS1
           ACALL        BCDHEX                  ;16字节BCD变二进制
           ACALL        SUBBV                   ;*5/8
           POP          PSW
           CLR          A
           RET
;**********加电流
JIA:       MOV          3AH,#0FFH
           MOV          A,DISP3
           INC          A
           MOV          DISP3,A
           CJNE         A,#10,OUT
           MOV          DISP3,#0
           MOV          A,DISP2
           INC          A
           MOV          DISP2,A
           CJNE         A,#10,OUT
           MOV          DISP2,#0
           MOV          A,DISP1
           INC          A
           MOV          DISP1,A
           CJNE         A,#10,OUT
           MOV          DISP1,#0
           MOV          A,DISP0

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

数控直流稳压电源设计方案 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。