51单片机心形灯汇编程序_第1页
51单片机心形灯汇编程序_第2页
51单片机心形灯汇编程序_第3页
51单片机心形灯汇编程序_第4页
51单片机心形灯汇编程序_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

51单片机心形灯汇编程序51单片机心形灯汇编程序51单片机心形灯汇编程序资料仅供参考文件编号:2022年4月51单片机心形灯汇编程序版本号:A修改号:1页次:1.0审核:批准:发布日期:ORG 0000HMAIN: MOV R1,#08H MOV A,#7FHDAN2: MOV P2,A CALL DELAY RR A DJNZ R1,DAN2 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN3: MOV P3,A CALL DELAY RR A DJNZ R1,DAN3 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN4: MOV P1,A CALL DELAY RR A DJNZ R1,DAN4 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#0FEHDAN1: MOV P0,A ACALLDELAY RL A DJNZ R1,DAN1 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH ;单个跑马灯 MOV R1,#08H MOV A,#7FHDAN22: MOV P2,A CALL DELAY1 RR A DJNZ R1,DAN22 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN33: MOV P3,A CALL DELAY1 RR A DJNZ R1,DAN33 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN44: MOV P1,A CALL DELAY1 RR A DJNZ R1,DAN44 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#0FEHDAN11: MOV P0,A ACALLDELAY1 RL A DJNZ R1,DAN11 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH ;单个跑马灯 MOV R1,#08H MOV A,#7FHDAN222: MOV P2,A CALL DELAY2 RR A DJNZ R1,DAN222 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN333: MOV P3,A CALL DELAY2 RR A DJNZ R1,DAN333 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN444: MOV P1,A CALL DELAY2 RR A DJNZ R1,DAN444 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#0FEHDAN111: MOV P0,A ACALLDELAY2 RL A DJNZ R1,DAN111 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH ;单个跑马灯 MOV R1,#08H MOV A,#7FHD1AN22: MOV P2,A CALL DELAY3 RR A DJNZ R1,D1AN22 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHD1AN33: MOV P3,A CALL DELAY3 RR A DJNZ R1,D1AN33 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHD1AN44: MOV P1,A CALL DELAY3 RR A DJNZ R1,D1AN44 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#0FEHD1AN11: MOV P0,A ACALLDELAY3 RL A DJNZ R1,D1AN11 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH ;单个跑马灯 MOV R1,#08H MOV A,#7FHDAN2A: MOV P2,A CALL DELAY4 RR A DJNZ R1,DAN2A MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN3A: MOV P3,A CALL DELAY4 RR A DJNZ R1,DAN3A MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN4A: MOV P1,A CALL DELAY4 RR A DJNZ R1,DAN4A MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H ;单个跑马灯 MOV A,#0FEHDAN1A: MOV P0,A ACALLDELAY4 RL A DJNZ R1,DAN1A MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN2A1: MOV P2,A CALL DELAY4 RR A DJNZ R1,DAN2A1 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN3A1: MOV P3,A CALL DELAY4 RR A DJNZ R1,DAN3A1 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H MOV A,#7FHDAN4A1: MOV P1,A CALL DELAY4 RR A DJNZ R1,DAN4A1 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#12H MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H ;单个跑马灯 MOV A,#0FEHDAN1A1: MOV P0,A ACALLDELAY4 RL A DJNZ R1,DAN1A1 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#4JIAOTI: ;交替闪烁 MOV P0,#01010101B MOV P1,#01010101B MOV P2,#01010101B MOV P3,#01010101B CALL DELAY MOV P0,#B MOV P1,#B MOV P2,#B MOV P3,#B CALL DELAY DJNZ R1,JIAOTI MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08HQUAN: ;闪烁的频率由慢变快 MOV P0,#00H MOV P1,#00H MOV P2,#00H MOV P3,#00H CALL DELAY MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH CALL DELAY DJNZ R1,QUAN MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#08H;渐渐变亮,然后熄灭 MOV A,#07FHJIAN2: MOV P2,A ACALLDELAY1 RR A ANL A,P2 DJNZ R1,JIAN2 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#00H MOV P3,#0FFH MOV R1,#08H MOV A,#07FHJIAN3: MOV P3,A ACALLDELAY1 RR A ANL A,P3 DJNZ R1,JIAN3 MOV P0,#0FFH MOV P1,#0FFH MOV P2,#00H MOV P3,#00H MOV R1,#08H MOV A,#07FH JIAN4: MOV P1,A ACALLDELAY1 RR A ANL A,P1 DJNZ R1,JIAN4 MOV P0,#0FFH MOV P1,#00H MOV P2,#00H MOV P3,#00H MOV R1,#08H MOV A,#0FEHJIAN1: MOV P0,A ACALLDELAY1 RL A ANL A,P0 DJNZ R1,JIAN1 MOV P0,#00H MOV P1,#00H MOV P2,#00H MOV P3,#00H MOV P0,#B MOV P1,#01010101B MOV P2,#01010101B MOV P3,#01010101B ANL P2,#00010101B CALL DELAY ANL P2,#00000101B CALL DELAY ANL P2,#00000001B CALL DELAY ANL P2,#00000000B CALL DELAY ANL P3,#00010101b CALL DELAY ANL P3,#00000101b CALL DELAY ANL P3,#00000001b CALL DELAY ANL P3,#00000000b CALL DELAY ANL P1,#00010101b CALL DELAY ANL P1,#00000101b CALL DELAY ANL P1,#00000001b CALL DELAY ANL P1,#00000000b CALL DELAY ANL P0,#B CALL DELAY ANL P0,#B CALL DELAY ANL P0,#B CALL DELAY ANL P0,#00000000B CALL DELAY ORL P0,#01000000b CALL DELAY ORL P0,#01010000b CALL DELAY ORL P0,#01010100b CALL DELAY ORL P0,#01010101b CALL DELAY ORL P1,#00000010b CALL DELAY ORL P1,#00001010b CALL DELAY ORL P1,#00101010b CALL DELAY ORL P1,#b CALL DELAY ORL P3,#00000010b CALL DELAY ORL P3,#00001010b CALL DELAY ORL P3,#00101010b CALL DELAY ORL P3,#b CALL DELAY ORL P2,#00000010b CALL DELAY ORL P2,#00001010b CALL DELAY ORL P2,#00101010b CALL DELAY ORL P2,#b CALL DELAY ANL P0,#00010101B ANL P2,#00101010B CALL DELAY ANL P0,#00000101B ANL P2,#00001010B CALL DELAY ANL P0,#00000001B ANL P2,#00000010B CALL DELAY ANL P0,#00000000B ANL P2,#00000000B CALL DELAY ANL P1,#B ANL P3,#00101010B CALL DELAY ANL P1,#B ANL P3,#00001010B CALL DELAY ANL P1,#B ANL P3,#00000010B CALL DELAY ANL P1,#00000000B ANL P3,#00000000B CALL DELAY ORL P1,#01000000B ORL P3,#00000001B CALL DELAY ORL P1,#01010000B ORL P3,#00000101B CALL DELAY ORL P1,#01010100B ORL P3,#00010101B CALL DELAY ORL P1,#01010101B ORL P3,#01010101B CALL DELAY ORL P0,#00000000B ORL P2,#00000001B CALL DELAY ORL P0,#00001010B ORL P2,#00000101B CALL DELAY ORL P0,#00101010B ORL P2,#00010101B CALL DELAY ORL P0,#B ORL P2,#01010101B CALL DELAY ORL P0,#B ORL P2,#B CALL DELAY ORL P0,#B ORL P2,#B CALL DELAY ORL P0,#B ORL P2,#B CALL DELAY ORL P0,#B ORL P2,#B CALL DELAY ORL P1,#00000011B ORL P3,#B CALL DELAY ORL P1,#00001111B ORL P3,#B CALL DELAY ORL P1,#00111111B ORL P3,#B CALL DELAY ORL P1,#B ORL P3,#B CALL DELAY ANL P1,#01111111B ANL P3,#B CALL DELAY ANL P1,#00111111B ANL P3,#B CALL DELAY ANL P1,#00011111B ANL P3,#B CALL DELAY ANL P1,#00001111B ANL P3,#B CALL DELAY ANL P1,#00000111B ANL P3,#B CALL DELAY ANL P1,#00000011B ANL P3,#B CALL DELAY ANL P1,#00000001B ANL P3,#B CALL DELAY ANL P1,#00000000B ANL P3,#00000000B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#B ANL P2,#B CALL DELAY ANL P0,#00000000B ANL P2,#00000000B CALL DELAY MOV R1,#4JIAOT: ;交替闪烁 MOV P0,#00110011B MOV P1,#00110011B MOV P2,#00110011B MOV P3,#00110011B CALL DELAY MOV P0,#B MOV P1,#B MOV P2,#B MOV P3,#B CALL DELAY DJNZ R1,JIAOT MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV R1,#6SIGE: MOV P0,#B MOV P1,#01111111B MOV P2,#01111111B MOV P3,#01111111B CALL DELAY1 MOV P0,#B MOV P1,#00111111B MOV P2,#00111111B MOV P3,#00111111B CALL DELAY1 MOV P0,#B MOV P1,#00011111B MOV P2,#00011111B MOV P3,#00011111B CALL DELAY1 MOV P0,#B MOV P1,#00001111B MOV P2,#00001111B MOV P3,#00001111B CALL DELAY1 MOV P0,#B MOV P1,#00000111B MOV P2,#00000111B MOV P3,#00000111B CALL DELAY1 MOV P0,#B MOV P1,#000000111B MOV P2,#00000011B MOV P3,#00000011B CALL DELAY1 MOV P0,#B MOV P1,#00000001B MOV P2,#00000001B MOV P3,#00000001B CALL DELAY1 MOV P0,#00000000B MOV P1,#00000000B MOV P2,#00000000B MOV P3,#00000000B CALL DELAY1 DJNZ R1,SIGE MOV P0,#B MOV P1,#01111111B MOV P2,#01111111B MOV P3,#01111111B CALL DELAY1 MOV P0,#B MOV P1,#00111111B MOV P2,#00111111B MOV P3,#00111111B CALL DELAY1 MOV P0,#B MOV P1,#00011111B MOV P2,#00011111B MOV P3,#00011111B CALL DELAY1 MOV P0,#B MOV P1,#00001111B MOV P2,#00001111B MOV P3,#00001111B CALL DELAY1 MOV P0,#B MOV P1,#00000111B MOV P2,#00000111B MOV P3,#00000111B CALL DELAY1 MOV P0,#B MOV P1,#000000111B MOV P2,#00000011B MOV P3,#00000011B CALL DELAY1 MOV P0,#B MOV P1,#00000001B MOV P2,#00000001B MOV P3,#00000001B CALL DELAY1 MOV P0,#00000000B MOV P1,#00000000B MOV P2,#00000000B MOV P3,#00000000B CALL DELAY2 MOV P0,#B MOV P1,#00000001B MOV P2,#00000001B MOV P3,#00000001B CALL DELAY2 MOV P0,#B MOV P1,#00000011B MOV P2,#00000011B MOV P3,#00000011B CALL DELAY2 MOV P0,#B MOV P1,#00000111B MOV P2,#00000111B MOV P3,#00000111B CALL DELAY2 MOV P0,#B MOV P1,#00001111B MOV P2,#00001111B MOV P3,#00001111B CALL DELAY2 MOV P0,#B MOV P1,#00011111B MOV P2,#00011111B MOV P3,#00011111B CALL DELAY2 MOV P0,#B MOV P1,#00111111B MOV P2,#00111111B MOV P3,#00111111B CALL DELAY2 MOV P0,#B MOV P1,#01111111B MOV P2,#01111111B MOV P3,#01111111B CALL DELAY2 MOV P0,#B MOV P1,#B MOV P2,#B MOV P3,#B CALL DELAY2 MOV P0,#B MOV P1,#01111111B MOV P2,#01111111B MOV P3,#01111111B CALL DELAY2 MOV P0,#B MOV P1,#00111111B MOV P2,#00111111B MOV P3,#00111111B CALL DELAY MOV P0,#B MOV P1,#00011111B MOV P2,#00011111B MOV P3,#00011111B CALL DELAY2 MOV P0,#B MOV P1,#00001111B MOV P2,#00001111B MOV P3,#00001111B CALL DELAY2 MOV P0,#B MOV P1,#00000111B MOV P2,#00000111B MOV P3,#00000111B CALL DELAY2 MOV P0,#B MOV P1,#000000111B MOV P2,#00000011B MOV P3,#00000011B CALL DELAY2 M

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论