为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

计算机课程设计

2017-10-10 32页 doc 157KB 14阅读

用户头像

is_003124

暂无简介

举报
计算机课程设计计算机课程设计 计算机课程设计 院 系: 数学与计算机科学学院 专 业: 计算机科学与技术 年 级: 2004 级 _________ __________ 学 号:_ 240492201姓 名: 蒋思阳 _ 指导教师: 游玲 __ 2007年 12 月 25 日 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils cant...
计算机课程设计
计算机课程 计算机课程设计 院 系: 数学与计算机科学学院 专 业: 计算机科学与技术 年 级: 2004 级 _________ __________ 学 号:_ 240492201姓 名: 蒋思阳 _ 指导教师: 游玲 __ 2007年 12 月 25 日 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 单片机实验 实验题目:8279实现加法计算器 实验器材:PC机,MC-51实验机,8279芯片,LED显示灯。 实验目的:利用8279芯片实现通过2X8键盘输入加数和被加数并计算出结果,同时将加数、被加数和结果都在LED灯上显示出来。 实验: 1、图: meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 2、8279PCB板图: 3、接线:内部已经连好。 4、关键程序说明: 4-1、按键判断: 程序如下: WAIT: LCALL GETKEY ;读键盘 CJNE A,#0FFH,CONT ;判断是否有键输入 MOV A,B CJNE A,#3CH,KEY_A ;输入键是'C',转CLEAR_T LCALL CLEAR_T KEY_A: CJNE A,#3AH,KEY_D ;输入键是'A',转START_T LCALL START_T KEY_D: CJNE A,#3DH,KEY_B ;输入键是'D',转SET_T LCALL SET_T KEY_B: CJNE A,#3BH,WAIT ;输入键是'B',转DENGYU LCALL DENGYU CONT: CJNE R6,#0FFH,WAIT ;若判断标志则循环 LCALL DISPLAY ;显示 MOV R6,#0 ;清标志 SJMP WAIT ;循环 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 相关说明:1、进入程序后判断是否有键读入; 2、当有键输入时判断输入的是A、B、C、D中的哪个键; 3、输入A键时进入等待第二个数字输入,然后执行加法,最后跳回等待B键输入; 4、输入B键时执行“等于”功能,并将加法结果在LED灯上显示; 5、输入C键时对LED灯的显示进行清除; 6、输入D键时可以开始输入第一个数字,然后跳回等待按键输入。 4-2、加法过程: 程序如下: SET_T: ;设置初值子程序 MOV R4,#7 LCALL GETWORD MOV A,B MOV B,#10 DIV AB SWAP A ADD A,B MOV R3,A ;保存第一次输入的值 RET SET_1: MOV R4,#5 LCALL GETWORD MOV A,B MOV B,#10 DIV AB SWAP A ADD A,B MOV R2,A ;保存第二次输入的值 SJMP START_2 START_T: ;等待第二次值的输入 LCALL GETKEY LCALL SET_1 ; START_2: ;执行加法 MOV A,R2 ADD A,R3 DA A MOV R7,A LJMP KEY_B meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 相关说明:1、当按下D键后,程序跳转到SET_T,进行读入第一个值,并在 LED灯上显示,然后跳回等待按键输入; 2、当按下A键后,程序跳转到START_T,首先跳转到SET_1,等 待第二个值的输入,之后跳转到START_2执行加法运算,并将结果存入R7,最 后跳转到KEY_B,等待B键的按下。 4-3、显示结果: 程序如下: DENGYU: ;显示加法结果 MOV A,R7 ANL A,#0FH ADD A,#10H MOV R5,A MOV R4,#2 LCALL DISLED ;显示结果的个位 MOV A,R7 SWAP A ANL A,#0FH MOV R5,A MOV R4,#3 LCALL DISLED ;显示结果的十位 RET 、当B键按下后,程序跳转到DENGYU然后分别显示结果的个位相关说明:1 和十位; 2、显示后程序跳转回等待新的按键输入。 5、实验原理图及PCB板图: 略。 6、实验程序: 见附录。 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 实验心得: 在大学期间,从接触硬件的相关课程开始,就已经对硬件产生了恐惧。不论是课程的学习,还是心中的看法(之前总觉得硬件没前途......)。直到大四这学期开设了单片机课程,对我的人生观产生了巨大的影响。 首先是对硬件的认识发生了变化。从原本的不屑一顾,到现在的虚心劲取。才逐渐发现,硬件在IT行业中的重要性。有了兴趣之后,开始认真的听课,认真的学习硬件知识。越是深入的了解,越是产生更多的兴趣。特别是它的实用性、多变性以及趣味性,都是我选择硬件为发展方向的理由。 但是我清楚的明白,自身的硬件水平还很低很浅,学习单片机技术有一定的难度,不花费一番努力是很难学会的,但是我相信只要不断努力就一定能成功,套用一句广告歌词:努力总有回报~因此抱着试探和磨练的心态,选择了单片机作为课程设计。 实验任务分配下来后,一开始确实很迷茫。因为完全没有头绪,无从下手。看这网页中搜索的浩瀚的资料,真是一个头两个大,也第一次体会到了长时间对这电脑屏幕想吐的感觉。 之后我静下心来,仔细挖掘这次实验的问题所在。,,,,实现加法计算器,关键在于,,,灯的显示和按键触发的处理。相通这些后我开始查阅关于,,,,芯片的介绍,从芯片组成到口令原理,开始深入的学习。但是问题也接踵而至。 首先,,,,的状态字就分为八大类,每一类下面还有好多小的分类,到底这次实验我所需要用到的是哪一种,这是一个问题;其次,试验机上,,,,与,,,灯内部的连线已经接好,如何通过,,,,去控制,,,灯的显示这又是一个问题;最后,改变,,,按键的内容与作用该如何实现,这才是这次实验所需要解决的根本问题。 只有做不到,没有想不到。面对问题,我们不能逃避。只有一步一步的去发现去探索,才可以解决问题。在网上曾看到关于如何学习单片机的文章,里面说道:学习单片机一方面要提高自身的知识水平和编程能力,同时多看多学别人已经写好的模块也是一种好的。由于本人确实水平有限,再加上时间的限制,我开始翻阅一些别人已经做好的有关实验程序,希望从中获取或者可以给我启发的模块程序。 终于,在“,,,,实现秒表计时功能”的内容中,找到了我所想要的模块。因为这个实验和我所做的实验都存在一个相同之处:通过按键控制。 到这里,问题似乎迎刃而解了,其实不然,因为还有最后显示结果的环节没有实现。在检查了所有程序后依然找不到问题所在。读键盘没问题,键盘控制功能也没问题,加法实现也没问题,显示结果似乎也没问题。到这一步,我感觉自己黔驴技穷了。然而,就在我放弃最后显示结果环节准备将程序抄写下来提交报告时,脑中灵光一闪:显示最终结果的方法出现了。原来,,,,芯片中控制,,,灯的显示与控制地址有关,而控制地址又是与偏移量紧紧相关的。在搞清楚这一点后我开始动手修改最后的显示结果部分,结果终于在,,,灯上显示出来了。 通过这次实验,我认为学习的不仅仅是知识,更重要的是解决问题时坚毅不拔的精神,人不会被打败,只有被摧毁。在求知的道路上我们不能轻易放弃,不能放纵退缩。只有迎难而上,放能摘取胜利的果实~ meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects 附录: 实验程序: Z8279 EQU 0FF82H ;8279 状态/命令口地址 D8279 EQU 0FF80H ;8279 数据口地址 LEDMOD EQU 00H ;左边输入 八位字符显示 ;外部译码键扫描方式,双键互锁 LEDFEQ EQU 2FH ;扫描速率 LEDCLS EQU 0C1H ;清除显示 RAM LEDWR0 EQU 80H ;设定的将要写入的显示RAM地址 READKB EQU 40H ;读 FIFO RAM 地址 0 的命令字 ORG 0000H AJMP START ORG 0040H START: MOV SP,#60H LCALL INIT8279 ;初始化8279 MOV R3,#0H ;第一次输入的值 MOV R2,#0H ;第二次输入的值 MOV R7,#0H ;结果 MOV R6,#0FFH ;标志 LCALL DIS_mS ;调用显示LED灯最后两位 WAIT: LCALL GETKEY ;读键盘 CJNE A,#0FFH,CONT ;判断是否有键输入 MOV A,B CJNE A,#3CH,KEY_A ;输入键是'C',转CLEAR_T LCALL CLEAR_T KEY_A: CJNE A,#3AH,KEY_D ;输入键是'A',转START_T LCALL START_T KEY_D: CJNE A,#3DH,KEY_B ;输入键是'D',转SET_T LCALL SET_T KEY_B: CJNE A,#3BH,WAIT ;输入键是'B',转DENGYU LCALL DENGYU meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects CONT: CJNE R6,#0FFH,WAIT ;若判断标志则循环 LCALL DISPLAY MOV R6,#0 ;清标志 SJMP WAIT ;循环 CLEAR_T: ;显示清零子程序 MOV R3,#0H ;第一次输入的值清零 MOV R2,#0H ;第二次输入的值清零 MOV R6,#0FFH ;置判断标志 RET DENGYU: ;显示加法结果 MOV A,R7 ANL A,#0FH ADD A,#10H MOV R5,A MOV R4,#2 LCALL DISLED MOV A,R7 SWAP A ANL A,#0FH MOV R5,A MOV R4,#3 LCALL DISLED RET SET_T: ;设置初值子程序 MOV R4,#7 LCALL GETWORD MOV A,B MOV B,#10 DIV AB SWAP A ADD A,B MOV R3,A ;保存输入的值 RET meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects SET_1: MOV R4,#5 LCALL GETWORD MOV A,B MOV B,#10 DIV AB SWAP A ADD A,B MOV R2,A ;保存输入的值 SJMP START_2 START_T: ;等待第二次的值输入 LCALL GETKEY LCALL SET_1 START_2: ;执行加法运算 MOV A,R2 ADD A,R3 DA A MOV R7,A LJMP KEY_B SET_TOK: LCALL DIS_mS LCALL DISPLAY RET GETWORD: ;读数子程序 WKEY1: LCALL GETKEY ;读键盘 CJNE A,#0FFH,WKEY1 ;无键输入,则再读 MOV A,B ADD A,#0C6H JC ERROR1 ;判断输入是否大于9 MOV A,B SUBB A,#30H MOV R5,A LCALL DISLED ;显示输入的字符 MOV B,#10 MUL AB PUSH ACC ;保存输入的值 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects WKEY2: LCALL GETKEY ;读键盘 CJNE A,#0FFH,WKEY2 ;无键输入则再读 MOV A,B ADD A,#0C6H JC ERROR2 ;判断输入是否大于9 MOV A,B SUBB A,#30H DEC R4 MOV R5,A LCALL DISLED ;显示输入的字符 MOV B,A POP ACC ADD A,B MOV B,A ;把得到的值存在B MOV A,#0FFH ;置合法输入标志 AJMP KEYOK ERROR2: POP ACC ERROR1: MOV A,#0 ;置非法输入标志 KEYOK: RET INIT8279: ;8279初始化子程序 PUSH DPH ;保存现场 PUSH DPL PUSH ACC LCALL DELAY ;延时 MOV DPTR ,#Z8279 MOV A,#LEDMOD ;置8279工作方式 MOVX @DPTR,A MOV A,#LEDFEQ ;置键盘扫描速率 MOVX @DPTR,A MOV A,#LEDCLS ;清除 LED 显示 MOVX @DPTR,A POP ACC ;恢复现场 POP DPL POP DPH RET meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects ;读取键盘子程序 GETKEY: PUSH DPH ;保存现场 PUSH DPL PUSH PSW MOV DPTR,#Z8279 MOVX A,@DPTR ;读8279状态 ANL A,#07H ;屏蔽D7-D3 JNZ GETVAL ;判断是否有键输入 MOV A,#0H ;置标志(无键输入) SJMP NKBHIT GETVAL: MOV A,#READKB ;读 FIFO RAM 命令 MOVX @DPTR,A MOV DPTR,#D8279 MOVX A,@DPTR ;读键 ANL A,#3FH ;屏蔽 SHIFT 和 CTRL 键 MOV DPTR,#KEYCODE ;键码表起始地址 MOVC A,@A+DPTR ;查表 MOV B,A ;置返回键值 MOV A,#0FFH ;置标志(有键输入) NKBHIT: POP PSW ;恢复现场 POP DPL POP DPH RET ;显示字符子程序 DISLED: PUSH DPH ;保存现场 PUSH DPL PUSH ACC MOV A,#LEDWR0 ;置显示起始地址 ADD A,R4 ;加位置偏移量 MOV DPTR,#Z8279 MOVX @DPTR,A ;设定显示位置 MOV DPTR,#LEDSEG ;置显示常数表起始位置 MOV A,R5 MOVC A,@A+DPTR ;查表 MOV DPTR,#D8279 MOVX @DPTR,A ;显示数据 POP ACC ;恢复现场 POP DPL POP DPH RET meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects DELAY: ;延时子程序 PUSH 0 ;保存现场 PUSH 1 MOV 0,#0H DELAY1: MOV 1,#0H DJNZ 1,$ DJNZ 0,DELAY1 POP 1 ;恢复现场 POP 0 RET DIS_mS: MOV A,R0 ANL A,#0FH MOV R5,A MOV R4,#0 LCALL DISLED ;显示LED灯右边起第一位 MOV A,R0 SWAP A ;高低半字节交换 ANL A,#0FH MOV R5,A MOV R4,#1 LCALL DISLED ;显示LED灯右边起第二位 RET DISPLAY: MOV A,R3 ANL A,#0FH ADD A,#10H MOV R5,A MOV R4,#6 LCALL DISLED ;显示LED灯右边起第三位 MOV A,R3 SWAP A ANL A,#0FH MOV R5,A MOV R4,#7 LCALL DISLED ;显示LED灯右边起第四位 MOV A,R2 ANL A,#0FH ADD A,#10H MOV R5,A MOV R4,#4 LCALL DISLED ;显示LED灯右边起第五位 meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects MOV A,R2 SWAP A ANL A,#0FH MOV R5,A MOV R4,#5 LCALL DISLED ;显示LED灯右边起第六位 MOV A,R1 ANL A,#0FH ADD A,#10H MOV R5,A MOV R4,#2 LCALL DISLED ;显示LED灯右边起第七位 MOV A,R1 SWAP A ANL A,#0FH MOV R5,A MOV R4,#3 LCALL DISLED ;显示LED灯右边起第八位 LCALL DIS_mS RET ;LED显示常数表 LEDSEG: DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H ;'0,1,2,3,4,5,6,7' DB 7FH,6FH,77H,7CH,39H,5EH,79H,71H ;'8,9,A,B,C,D,E,F' ;键盘键码表 KEYCODE:DB 30H,31H,32H,33H,34H,35H,36H,37H ;'0,1,2,3,4,5,6,7' DB 38H,39H,3AH,3BH,3CH,3DH,3EH,3FH ;'8,9,A,B,C,D,E,F' END meters village between road hardening, 11 km of pass group Highway, livelihood project; ordered advance XX finished pupils canteen, and wangji alone finished small teaching floor, and wangji alone finished pupils canteen, and ancient Dang "culture tourism features village", and wangji alone village and Bula village River suspension, and Bula village la Los end of pass group Highway, and XX Meters village debris flow disaster control, building project; started has victims will LOS, wood child moving, and autumn baby, pass group highway construction project; solid do "a water two dirt" regulation, and wood added Jia village, XING side fumin, and XX meters village pass village Highway hardening, and ancient Dang village disaster Hou traffic reconstruction, and Bula village whole village advance, and day care center, major project of early work. Second, develop eco-agriculture construction of the Canyon. Economic development of eco-agricultural construction in an important position, accelerated "8321" works completed caoguo 23700 acres planted, bubble 4125 acres planted walnuts, sumac 4000 acres planted, Yun Huang Lian 6040 acres planted, tea-oil tree planting 8887.8 acres. To cultivate new economic growth points, good farmers ' well-off society of the industrial base. Third, start a poverty alleviation project. Storming the headquarters was established, well-organized, well arranged, formation of 7 supporting task force launched the poverty file state cards work in a timely manner, the task force entered the village door communication policy, mobilization mass base, making poverty eradication plan, and find out about poverty, assist in the implementation of projects
/
本文档为【计算机课程设计】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索