当前位置:网站首页>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的输出
五、源程序
边栏推荐
猜你喜欢
随机推荐
codeforces 线段树题单
WLAN笔记
玻璃表面修饰DNA|DNA修饰的上转换纳米材料|DNA-UCNPs实验原理
全国双非院校考研信息汇总整理 Part.8
Mysql8.0新特性之详细版本
树莓派上安装 wiringPi 2.6 解决 gpio readall 命令的错误
暴力递归到动态规划 04 (数字字符串转化)
深度学习的随机种子
2022/7/29 考试总结
The Sandbox Partners with Gravity to Bring RO Ragnarok to the Metaverse
全国双非院校考研信息汇总整理 Part.4
Wincc报表教程(SQL数据库的建立,wincc在数据库中保存和查询数据,调用Excel模板把数据保存到指定的位置和打印功能)
在树莓派上安装 PyCharm
全国双非院校考研信息汇总整理 Part.7
C陷阱与缺陷 第3章 语义“陷阱” 3.10 为函数main提供返回值
WIN2008的IIS上下载文件大小限制之修改
Design for failure常见的12种设计思想
从面试官角度分析:面试功能测试工程师主要考察哪些能力?
决策树原理及代码实现
MySQL active/standby switch