注意:访问本站需要Cookie和JavaScript支持!请设置您的浏览器! 打开购物车 查看留言付款方式联系我们
初中电子 单片机教材一 单片机教材二
搜索上次看见的商品或文章:
商品名、介绍 文章名、内容
首页 电子入门 学单片机 免费资源 下载中心 商品列表 象棋在线 在线绘图 加盟五一 加入收藏 设为首页
全部内容 本站公告 购物咨询 付款确认 购物反馈 网站建议 贵宾交流 商品评论 文章评论 发新留言
标题: 〖index〗单片机数字钟套件,我编辑的程序(5243)………… 商品评论
发送时间:2012/11/15 17:42:51 更新时间:2012/11/15 17:50:26
留言内容:
http://www.51dz.com/0/s---1758--.htm,我自己编辑的程序,直接可以使用,具有21点,20%亮度,6点到50%亮度,7点100%亮度,;
ORG 0000H
JMP LEFEIJ
ORG 000BH
JMP TT0

COM EQU 20H
DAT EQU 21H
P4M1 EQU 0B3H
P4M0 EQU 0B4H
P3M1 EQU 0B1H
P3M0 EQU 0B2H
P2M1 EQU 095H
P2M0 EQU 096H
P1M1 EQU 091H
P1M0 EQU 092H
P0M1 EQU 093H
P0M0 EQU 094H

ORG 0066H

LEFEIJ:
CALL CHUSHIHUA
MOV 8EH,#80H
MOV TMOD,#00010010B
MOV TH0,#6
SETB TR0
SETB ET0
SETB EA

MAIN:
JNB 20H.0,MAIN2
CLR 20H.0
CALL JIAMIAO
CALL LIANGDU
MAIN2:

DJNZ 6BH,MAINOUT
MOV 6BH,6AH
CALL XIANSHIJISUAN
CALL XIANSHIZ

MAINOUT:
CALL LEDOUT
;JMP MAINEND
;DJNZ R7,$
CALL KEY


MAINEND:
JMP MAIN


LEDOUT:

JB 20H.2,LEDLIANG
LEDMIE:
DJNZ 4EH,LEDOUTEND
MOV 4EH,4DH
SETB 20H.2
MOV P1,#10000000B
MOV P3,#01111111B
JMP LEDOUTEND

LEDLIANG:

DJNZ 4CH,LEDOUTEND
MOV 4CH,4BH
CLR 20H.2
MOV P1,#10000000B
MOV P3,24H
MOV P1,23H

LEDOUTEND:
RET

LIANGDU:
JnB 20H.1,LIANGDUEND
CLR 20H.1
MOV A,36H
CLR C
CJNE A,#21,LIANGDU2
MOV 4BH,#30
MOV 4DH,#2
MOV 6AH,#32
JMP LIANGDUEND

LIANGDU2:
CJNE A,#7,LIANGDU3
MOV 4BH,#1
MOV 4DH,#31
MOV 6AH,#32
JMP LIANGDUEND

LIANGDU3:
CJNE A,#6,LIANGDU4
MOV 4BH,#24
MOV 4DH,#8
MOV 6AH,#32
JMP LIANGDUEND
LIANGDU4:
;
LIANGDUEND:
RET

TT0:

PUSH ACC
PUSH PSW

DJNZ 30H,TT0END
MOV 30H,#160

INC 33H
MOV A,33H
CJNE A,#50,TTTT02
SETB 20H.7
TTTT02:

CJNE A,#100,TT0END
MOV 33H,#0
CLR 20H.7

SETB 20H.0

TT0END:
POP PSW
POP ACC


2012-11-15 17:45:48 [index]〖124.90.138.152〗:RETI

JIAMIAO:
INC 34H
MOV A,34H
CJNE A,#60,JIAMIAOEND
MOV 34H,#0

;MOV 30H,#86
;MOV 33H,#0

INC 35H
MOV A,35H
CJNE A,#60,JIAMIAOEND
MOV 35H,#0

INC 36H
MOV A,36H
SETB 20H.1
CJNE A,#24,JIAMIAOEND
MOV 36H,#0

JIAMIAOEND:
RET

2012-11-15 17:46:12 [index]〖124.90.138.152〗:CHUSHIHUA:
MOV P1M1,#00000000B
MOV P1M0,#01111111B
MOV P3M1,#00000000B
MOV P3M0,#10000000B
MOV P1,#10000000B
MOV P3,#01111111B

MOV 20H,#255
MOV 21H,#255
MOV 3FH,#0
MOV 3EH,#0
MOV 3DH,#0
MOV 3CH,#0
MOV 3BH,#0
MOV 3AH,#0
MOV 39H,#0
MOV 38H,#0
MOV 37H,#0

2012-11-15 17:46:33 [index]〖124.90.138.152〗:MOV 36H,#19
MOV 35H,#0
MOV 34H,#0
MOV 33H,#0
MOV 30H,#40
MOV 4BH,#1
MOV 4DH,#31
MOV 4CH,4BH
MOV 4EH,4DH
MOV 6AH,#32
MOV 6BH,6AH

MOV 4FH,#20
MOV 50H,#01111111B
MOV 51H,#01111110B
MOV 52H,#01111101B
MOV 53H,#01111011B
MOV 54H,#01110111B
MOV 55H,#01101111B
MOV 56H,#01011111B

MOV 5AH,#0
MOV 5BH,#3
MOV 5CH,#4
MOV 5DH,#0
MOV 5EH,#128
MOV 5FH,#8
RET

2012-11-15 17:46:55 [index]〖124.90.138.152〗:XIANSHIJISUAN:
MOV A,36H
MOV B,#10
DIV AB
MOV 3EH,B
MOV 3FH,A
MOV A,35H
MOV B,#10
DIV AB
MOV 3CH,B
MOV 3DH,A
MOV A,34H
MOV B,#10
DIV AB
MOV 3AH,B
MOV 3BH,A
MOV A,33H
MOV B,#10
DIV AB
MOV 38H,B
MOV 39H,A
RET

2012-11-15 17:47:22 [index]〖124.90.138.152〗:XIANSHIZ:
MOV R0,#4AH
MOV DPTR,#LEDDBYIN
WEIZ0:
CJNE @R0,#1,WEIZ1
MOV A,3AH
MOV 24H,56H
JB 20H.7,MAOHAOMIE
SETB 24H.7
MAOHAOMIE:

JMP XIANSHIZEND
WEIZ1:
CJNE @R0,#2,WEIZ2
MOV A,3BH
MOV 24H,55H

JMP XIANSHIZEND

2012-11-15 17:47:46 [index]〖124.90.138.152〗:WEIZ2:
CJNE @R0,#3,WEIZ3
MOV A,3CH
MOV 24H,52H

JMP XIANSHIZEND
WEIZ3:
CJNE @R0,#4,WEIZ4
MOV A,3DH
MOV 24H,54H

JMP XIANSHIZEND
WEIZ4:
CJNE @R0,#5,WEIZ5
MOV A,3EH
MOV 24H,53H

JMP XIANSHIZEND
WEIZ5:
CJNE @R0,#6,WEIZ6
MOV A,3FH
MOV 24H,51H


WEIZ6:
MOV 4AH,#0

XIANSHIZEND:
INC 4AH
MOVC A,@A+DPTR

MOV 23H,A
RET

2012-11-15 17:48:07 [index]〖124.90.138.152〗:KEY:
JB 24H.0,KEY1

JB P1.7,KEYEND5
MOV 26H,24H
SETB 20H.6
JMP KEYEND5

KEY1:
JB 24H.1,KEY2

JB P1.7,KEYEND5
MOV 26H,24H
SETB 20H.6
JMP KEYEND5

KEY2:
JB 24H.3,KEY3

JB P1.7,KEYEND5
MOV 26H,24H
SETB 20H.6
JMP KEYEND5

KEY3:
JB 24H.5,KEYEND5
JB 20H.6,KEYON
MOV 5AH,#0
MOV 5BH,#22
MOV 5CH,#4
MOV 5DH,#0
MOV 5EH,#128
MOV 5FH,#8
CLR 20H.5
JMP KEYEND5

2012-11-15 17:48:30 [index]〖124.90.138.152〗:KEYEND5:
JMP KEYEND


KEYON:

JB 20H.5,KEYOFF
MOV 5DH,#0
MOV 5EH,#128
MOV 5FH,#8
DJNZ 5AH,KEYEND
DJNZ 5BH,KEYEND
MOV 5BH,#22
;DJNZ 5CH,KEYEND
;MOV 5CH,#4
SETB 20H.5
CLR 20H.6

JNB 26H.0,INCSHI
JNB 26H.1,INCFEN
JNB 26H.3,INCMIAO

JMP KEYEND
INCSHI:
INC 36H
MOV A,36H
CJNE A,#24,KEYEND
MOV 36H,#0
JMP KEYEND
INCFEN:
INC 35H
MOV A,35H
CJNE A,#60,KEYEND
MOV 35H,#0
JMP KEYEND
INCMIAO:
INC 34H
MOV A,34H
CJNE A,#60,KEYEND
MOV 34H,#0
JMP KEYEND

2012-11-15 17:48:57 [index]〖124.90.138.152〗:KEYOFF:
JNB 20H.5,KEYEND
MOV 5AH,#0
MOV 5BH,#22
;MOV 5CH,#4
DJNZ 5DH,KEYEND
DJNZ 5EH,KEYEND
MOV 5EH,#128
;DJNZ 5FH,KEYEND
;MOV 5FH,#8
CLR 20H.5
CLR 20H.6
JMP KEYEND

KEYEND:


RET


LEDDBYIN:
DB 11110111b,11000001b,10111011b,11101011b,11001101b,11101110b,11111110b
DB 11000011b,11111111b,11101111b,00000000b,00000000b,10001000b,10101010b
end

2012-11-15 17:50:26 [index]〖124.90.138.152〗:http://www.51dz.com/0/s---1758--.htm该套件可以直接使用,取消了闹钟,取消了校准,3按键单独控制时,分,秒的加数字设定,不能减
快速回复:

本站实事求是保留用户意见和问题!拒绝广告和灌水!但系统只显示最近2年或者最近2万次留言(约5000标题)!过期留言自动删除!重要内容请自行备份!不便之处请谅解!
本站协议 | 版权信息 |  关于我们 |  本站地图 |  营业执照 |  发票说明 |  付款方式 |  联系方式
深圳市宝安区西乡五壹电子商行——粤ICP备16073394号-1;地址:深圳西乡河西四坊183号;邮编:518102
E-mail:51dz$163.com($改为@);Tel:(0755)27947428
工作时间:9:30-12:00和13:30-17:30和18:30-20:30,无人接听时可以再打手机13537585389