单片机实验-单片机并行IO口的应用实验.pdf

上传人:H****o 文档编号:56669594 上传时间:2022-11-02 格式:PDF 页数:3 大小:181.62KB
返回 下载 相关 举报
单片机实验-单片机并行IO口的应用实验.pdf_第1页
第1页 / 共3页
单片机实验-单片机并行IO口的应用实验.pdf_第2页
第2页 / 共3页
点击查看更多>>
资源描述

《单片机实验-单片机并行IO口的应用实验.pdf》由会员分享,可在线阅读,更多相关《单片机实验-单片机并行IO口的应用实验.pdf(3页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、单片机并行 I/O 口的应用实验一、实验目的1、熟悉Proteus软件和Keil 软件的使用方法。2、熟悉单片机应用电路的设计方法。3、掌握单片机并行I/O 口的直接应用方法。4、掌握单片机应用程序的设计和调试方法。二、实验内容或原理1、利用单片机并行I/O 口控制流水灯。2、利用单片机并行I/O 口控制蜂鸣器。三、设计要求1、用 Proteus软件画出电路原理图。要求在P1.0 至 P1.7 口线上分别接LED0 至 LED7 八个发光二极管,在P3.0 口线上接一蜂鸣器。2、编写程序:要求LED0 至 LED7 以秒速率循环右移。3、编写程序:要求LED0 至 LED7 以秒速率循环左移。

2、4、编写程序:要求在灯移动的同时,蜂鸣器逐位报警。四、实验报告要求1、实验目的和要求。2、设计要求。3、实验程序流程框图和程序清单。4、电路原理图。5、实验结果6、实验总结。7、思考题。五、思考题1、编程实现LED0 至 LED7 以十六进制计数规律亮灯?原理图:文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M

3、10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10

4、M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A1

5、0M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A

6、10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3

7、A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L

8、3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4

9、L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3程序清单:/*(1)LED0LED7以秒速率循环右移蜂鸣器逐位报警*/ORG 0000H MAIN:MOV A,#11111110B;赋初值LOOP:MOV P1,A;赋值给 P1 口CPL P3.0 ;低电平有效LCALL DELAY;调用延时电路SETB P3.0 ;控制蜂鸣器叫的时间间隔LCALL DELAY RL A LJMP LOOP DELAY:MOV R7,#0FFH LOOP1:MOV R

10、6,#0F4H LOOP2:MOV R5,#02H DJNZ R5,$;$当前的 PC 值,R5 的内容减1 不为零,继续执行该语句DJNZ R6,LOOP2 DJNZ R7,LOOP1 RET END/*(2)LED0LED7以十六进制计数规律亮灯*/ORG 0000H MOV A,#0FFH LOOP:MOV P1,A LCALL DELAY DEC A CJNE A,#0FFH,LOOP MOV A,#0FFH LJMP LOOP DELAY:MOV R7,#0A7H LOOP1:MOV R6,#0ABH LOOP2:MOV R5,#10H DJNZ R5,$;$当前的 PC 值。R5

11、的内容减 1 不为零DJNZ R6,LOOP2 DJNZ R7,LOOP1 RET END 文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M

12、10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10

13、M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A1

14、0M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A

15、10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3

16、A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L

17、3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3文档编码:CP7Z10F7R7E7 HK9J6O2E1Y1 ZA4L3A10M10E3

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁