当前位置:网站首页>Expansion of Parallel I/O Port in Single Chip Microcomputer Development
Expansion of Parallel I/O Port in Single Chip Microcomputer Development
2022-07-29 23:51:00 【HUAWEI CLOUD】
目录
1. 在ProteusThe principle diagram of the environment to establish,如图1所示,并保存为expandIO.DSN文件.
2. Will test code into a text document,并保存为expandIO .asm文件.
3. 输入源程序,Will join the rest of the system source code and compile the source code.
4. 双击芯片,将编译得到的hexFile downloaded to the chip
一、题目
3.2 拓展并行I/O口实验
二、要求
1、Draw a process flow diagram that experiment
2、Write the source program and annotate
3、Document the process
4、Document the program runs results screenshot
三、Process and result record
According to the ideas to build circuit diagram1如下:
图1:实验电路图
实现功能:Control traffic lights
The simulation traffic light control function.
Control the order:
① 南北绿灯亮,At the same time things red light 10s;
② 南北黄灯亮,At the same time things red light 2s;
③ 南北红灯亮,At the same time something green light 10s;
④ 东西黄灯亮,At the same time the north and south red light 2s;
⑤ 重复①~④.
实验过程:
1. 在ProteusThe principle diagram of the environment to establish,如图1所示,并保存为expandIO.DSN文件.
2. Will test code into a text document,并保存为expandIO .asm文件.
3. 输入源程序,Will join the rest of the system source code and compile the source code.
4. 双击芯片,将编译得到的hexFile downloaded to the chip
5. Perform simulation process to observe all directions of traffic lights indicate,Check the function program is correct.
The diagram below with the results of the experiment2~5所示:
图2:南北绿灯亮,At the same time things red light10s
图3:南北黄灯亮,At the same time things red light2s
图4:南北红灯亮,At the same time something green light 10s
图5:东西黄灯亮,At the same time the north and south red light 2s
四、思路
The flow chart is as follows:
图6:实验流程
1. 进行初始化工作,Including set the stack pointerSP,将两个373 All bits are set to the output1,Make all leds put out.
2. Define two latch address: U4的地址是0FE00H, U5的地址是0FD00H
3. 分析4 A state of two373 The output of the data values:假定“南北绿灯亮,At the same time things red light”为状态1,即:Stat1;“南北黄灯亮,At the same time things red light”为状态2,即:Stat2;“南北红灯亮,At the same time something green light”为状态3,即:Stat3;“东西黄灯亮,At the same time the north and south red light”为状态4,即:Stat4.Can analyze its the output of each state.
6. 对于状态1:东西红灯,南北绿灯
① 那么对于U4,There are only two red light,A red light the address of the corresponding place0即可.对应的控制信号是11110011即0F3H
② 对于U5,绿灯亮,Only need to put the corresponding green light0 即可,For high four does not use the port,Also put together0.控制信号为00001100即0CH
图7:状态1下U4和U5的输出
7. 对于状态2:东西红灯,南北黄灯
① 对于U4:The north and the south yellow light、What red light corresponding port place0.So the control signals for the11000011即0C3H
② 对于U5:There is no green light,A useful(低四位)置1,In less than the bit or set of0.So the control signals for the00001111即0FH
图8:状态2下U4和U5的输出
8. 对于状态3:东西绿灯,南北红灯
① 对于U4:To the north and the south red light corresponding port place0,其余位为0.So the control signals for the11111100即0FCH
② 对于U5: To put something green corresponding port0,其余位为1.Pay attention to not use a zero.So the control signals for the00000011即03H
图9:状态3下U4和U5的输出
9. 对于状态4:东西黄灯,南北红灯
① 对于U4:Yellow light things、The north and the south red light corresponding port place0,其余位置1,.So the control signals for the00111100即3CH
② 对于U5:Did not involve green light,So will useful position1即可.So the control signals for the00001111即0FH
图10:状态4下U4和U5的输出
五、源程序
边栏推荐
猜你喜欢

devops学习(五) Jenkins 简单完成持续部署

【云原生Kubernetes】二进制搭建Kubernetes集群(中)——部署node节点

Design for failure常见的12种设计思想

【无标题】

多商户商城系统功能拆解18讲-平台端商家售后

BEVDetNet:Bird‘s Eye View LiDAR Point Cloud based Real-time 3D Object Detection for Autonomous Drivi

DNA修饰碱基5-甲基胞嘧啶和8-羟基鸟嘌呤|DNA修饰量子点|规格信息

【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史

标签分发协议(LDP)

微信小程序获取手机号getPhoneNumber接口报错44002
随机推荐
ApplicationContext的三大实现
Guidelines for the Release of New WeChat Mini Programs
Hell Diggers Series #1
Tkinter:功能按钮Button
接口性能测试方案设计方法有哪些?要怎么去写?
乐理&吉他技巧
JetsonNano learning (5) JetsonNano installs PyTorch and Torchvision
C陷阱与缺陷 第5章 库函数 5.2更新顺序文件
LabVIEW为什么在存储VI时死机
devops学习(五) Jenkins 简单完成持续部署
Install PyCharm on Raspberry Pi
Android 11 : 隐私和安全
【leetcode】The sword refers to Offer II 002. Binary addition
全网最强 JVM 来袭!(至尊典藏版)
什么是色选机(color sorter)?
y81. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Monitoring Extension (12)
WLAN笔记
决策树原理及代码实现
高数下|三重积分的计算3|高数叔|手写笔记
idea设置自动去除未引用(不再引用)的引用










