基于51单片机设计的光矩阵,附件里面带有ppt文档和视频文件(利用proteus仿真)
仿真原理图如下(proteus仿真工程文件可到本帖附件中下载):
ppt文档:
单片机汇编源程序如下:
- ORG 0000H
- AJMP MAIN
- ORG 0100H
- MAIN: MOV P2,#00H
- KEY0: MOV P3,#0FEH
- JNB P3.4,K0
- JNB P3.5,K1
- JNB P3.6,K2
- JNB P3.7,K3
- MOV P3,#0FDH
- JNB P3.4,K4
- JNB P3.5,K5
- JNB P3.6,K6
- JNB P3.7,K7
- MOV P3,#0FBH
- JNB P3.4,K8
- JNB P3.5,K9
- JNB P3.6,K10
- JNB P3.7,K11
- MOV P3,#0F7H
- JNB P3.4,K12
- JNB P3.5,K13
- JNB P3.6,K14
- JNB P3.7,K15
- AJMP KEY0
- K0:MOV P0,#0C0H
- ACALL YSH1S
- AJMP KEY0
- RET
- K1:MOV P0,#0F9H
- ACALL YSH1S
- AJMP KEY0
- RET
- K2:MOV P0,#0A4H
- ACALL YSH1S
- AJMP KEY0
- RET
- K3:MOV P0,#0B0H
- ACALL YSH1S
- AJMP KEY0
- RET
- K4:MOV P0,#099H
- ACALL YSH1S
- AJMP KEY0
- RET
- K5:MOV P0,#092H
- ACALL YSH1S
- AJMP KEY0
- RET
- K6:MOV P0,#082H
- ACALL YSH1S
- AJMP KEY0
- RET
- K7:MOV P0,#0F8H
- ACALL YSH1S
- AJMP KEY0
- RET
- K8:MOV P0,#080H
- ACALL YSH1S
- AJMP KEY0
- RET
- K9:MOV P0,#090H
- ACALL YSH1S
- AJMP KEY0
- RET
- K10:MOV P0,#088H
- ACALL YSH1S
- AJMP KEY0
- RET
- K11:MOV P0,#083H
- ACALL YSH1S
- AJMP KEY0
- RET
- K12:MOV P0,#0C6H
- ACALL YSH1S
- AJMP KEY0
- RET
- K13:MOV P0,#0A1H
- ACALL YSH1S
- AJMP KEY0
- RET
- K14:MOV P0,#086H
- ACALL YSH1S
- AJMP KEY0
- ……………………
- …………限于本文篇幅 余下代码请从51黑下载附件…………
复制代码
所有资料51hei提供下载:
测控142班第四组 组长:张志强.rar
(1.01 MB, 下载次数: 6)
|