当前位置:网站首页>Static LED display developed by single chip microcomputer
Static LED display developed by single chip microcomputer
2022-07-30 11:17:00 【HUAWEI CLOUD】
一、题目
静态LED显示
二、要求
1、画出流程图
2、编写源程序并进行注释
3、记录实验过程
4、记录程序运行结果截图
三、过程及结果记录
按照思路搭建电路图1如下:
图1:实验电路图
7SEG2 Displays nixie tubes for ten digits,7SEG1 Display the digital tube for the one digit,KEY_LOAD:Countdown initial value button,KEY_START:Countdown start button
功能:KEY_LOAD按钮被按下时,Load the initial countdown value(10S);当按下KEY_START按钮时,开始倒计时,每过1S,计数器减1,直到见到“00”为止.减到“00”时,使P3.0引脚上的LED按10HzThe frequency flashes,直到再次按下KEY_LOAD按钮,Just reload the initial value,并熄灭LED;再次按下KEY_STARTThe button starts the countdown again,如此反复
1. 使用Proteus搭建实验电路图如上,并将其保存为staticLED_self.DSN 文件.
2. Write the control source program,将其保存为staticLED_self.asm.
3. 程序编译:单击上方工具栏的source,然后build all,将asm文件编译成hex文件.将可执行文件hex写入芯片
4. Execute the simulation process to observe whether the stopwatch program functions correctly.实验结果如下图所示:
图2:Load the initial value and start
图3:减到00,LED灯闪烁
四、流程
The experimental flow chart is shown below:
图4:实验流程图
1.Determine what the addresses of the two latches are0FE00H和0FD00HAnd add two display nixie tubes.按照要求将P1.0作为start的输入,P1.1作为load的输入.
2.实验开始,判断P1.1Whether the mouth is pressed,load the initial value,And let the two digital tubes display the initial value.
3.判断P1.0是否按下,Counting starts when pressed;If not pressed,returns to the initial state,等待P1.1按下.
4.计数完成后,Waiting for the load command,若无,then stay and wait,若有,Start the next cycle.
5.The control command to display the nixie tube can be written first,存在内存中,Then use relative addressing to perform data access to this continuous address,assigned to the latch.Write the control signal of the digital tube in the memory,并且按照1到9的顺序存放.Use two memory cells to store tens and ones digits,This number also corresponds to the offset in the control signal table.即数字为n的时候,偏移n进行查表,将nThe representative control signal is given to the digital tube.
6.Begin to judge the set operation first,调用初始化10的指令.Set the ones digit0,Tens place1,Then his offsets in the table are respectively0和1,使用movcThe command looks up the table to get the corresponding control signal,to the latch,That is digital tube.然后判断start信号,If so, start counting,If not, skip back to the beginning,Waiting for new instructions.当有start信号,Then call the display program,digital display.
7.Call the adjuster count.Put the number in the one digit,即30HThe corresponding number in the memory unit is subtracted1,然后和-1比较,要是不等于-1,That means the original one has not arrived yet0,Do not operate on tens.若是为-1,Indicates that the original position has arrived0,Then subtract ten1,and a location9.Compare ten,若是为-1,说明原来是0,Then it indicates that the counter has arrived00,计数结束.
8.After performing the adjustment,Do not change the display yet,Instead, the delay program is called to wait for a period of time,Refreshing the display of the nixie tube.
五、源代码
边栏推荐
- HJY-F931A/YJ three-phase voltage relay
- 2022全球数字经济大会人工智能专场:AI安全受高度关注
- Pytorch中 nn.Transformer的使用详解与Transformer的黑盒讲解
- oracle 导出dmp文件类型为“故障转储文件”
- Log4j有哪几种日志级别呢?
- 湖仓一体电商项目(一):项目背景和架构介绍
- 360 released a future-oriented EDR to protect the security of government and enterprise user terminals in an all-round way
- 神经网络学习笔记4——自动编码器(含稀疏,堆叠)(更新中)
- Database transactions, JDBC operations and data types
- 加密和安全
猜你喜欢

真正懂经营管理的CIO具备哪些特质

Classes and Objects - 6 Default Member Functions

2022全球数字经济大会人工智能专场:AI安全受高度关注

Microsoft SQL服务器被黑客入侵 带宽被窃取

Neural Network Study Notes 3 - LSTM Long Short-Term Memory Network

Linux内核设计与实现(十)| 页高速缓存和页回写

优酷VIP会员周卡只需7.5元,看《沉香如屑》用优酷视频

360闷声干大事获赞无数,数字安全如何保障?还得看企业安全云

STM32F1读取MLX90632非接触式红外温度传感器

Voltage relay h2d SRMUVS - 100 vac - 2
随机推荐
Pytorch中 nn.Transformer的使用详解与Transformer的黑盒讲解
log4js入门
Database transactions, JDBC operations and data types
【C和指针第七章】可变参数列表
How to add data to the request header when feign is called remotely
【JZ64 求1+2+3+...+n】
High energy output!Tencent's internal MyCat middleware manual, both theoretical and practical
AIX shell获取前几个月时间
鸿湖万联扬帆富设备开发板正式合入OpenHarmony主干
类和对象—6个默认成员函数
salesforce使用方法(salesforce authenticator下载)
Voltage relay h2d SRMUVS - 100 vac - 2
Security tip: FreeType in Qt
神经网络学习笔记4——自动编码器(含稀疏,堆叠)(更新中)
美团内推+校招笔试题+知识点总结
WEB3之路(一)-- solidity学习笔记
物联网技术概论:第6章
电压跟随器不要随便加
The configuration process and related syntax of writing markdown format notes in vscode
MySQL之数据库维护



