当前位置:网站首页>微机原理与技术接口 实验五 基本IO操作温度控制实验
微机原理与技术接口 实验五 基本IO操作温度控制实验
2022-07-17 15:33:00 【张时贰】
2022.5.12 早八 实验
实验五 基本IO操作温度控制实验
前言
本文章是 【微机原理技术接口】 专栏的文章,主要是实验内容
微机原理技术接口专栏 传送门
提示:本文的环境是emu8086仿真系统。
1.1 实验要求
熟悉emu8086仿真系统
掌握基本IO操作和EMU8086使用外置仿真设备的方法
使用IO方式实现温度采集和加热控制
控制温度保持在75℃到80℃并维持两分钟
1.2 理论分析
实现对温度计的控制(打开 \emu8086\DEVICES\Thermometer.exe),IN 125指从125读取数据,OUT 127指向127发送数据使用延时程序控制温度计。编写延时子程序,通过15H中断的86H子功能编写1s延时程序。
127端口持续输出1,使用循环将装置加热到75°C
通过125端口读入装置温度,判断温度是否在75°C - 80°C,并作出相应的处理
通过循环,3执行2分钟
1.3 汇编语言
提示:所有实验源码已在Github整理
;IN 125,OUT 127指\emu8086\DEVICES\Thermometer.exe,从125读取数据,向127发送数据
MOV AL,1
OUT 127,AL ;打开加热,然后在LP0循环一直到大于75
LP0:
IN AL,125
CMP AL,75
JL LP0 ;<75跳转LP0继续加热
MOV CX,120 ;一次1s,两分钟为120次
LP:
IN AL,125 ;125指\emu8086\DEVICES\Thermometer.exe,从125读取数据,向127发送数据
CMP AL,75
JL LOW ;<75跳转LOW
CMP AL,80
JLE OK ;<80跳转OK,否则顺序执行HIGH
HIGH:
MOV AL,0
OUT 127,AL ;温高关加热
JMP OK
LOW:
MOV AL,1
OUT 127,AL ;温低开加热
JMP OK
OK: ;1秒延时判断
PUSH CX ;压栈保护记录两分钟的CX,因为延时程序也用CX
CALL DELAY5MS ;75℃到80℃
POP CX
LOOP LP
DELAY5MS PROC NEAR ;延时,15H中断的86H子功能
;wait 1 seconds (1 million microsecpnds)
;000F4240H = 1,000,000 = CX,DX 微秒
MOV CX,15
MOV DX,4240H
MOV AH,86H
INT 15H
RET
DELAY5MS ENDP
1.4 实验结果

边栏推荐
- How to delay loading JS
- Enabling cities to "plan, build, operate, manage and serve" -- MAPGIS CIM platform explores "cim+" multi scenario applications
- Conversion between Swift binary data and hexadecimal string
- function/symbol ‘pango_context_set_round_glyph_positions‘ not found in library ‘libpango-1.0.so.0‘x
- Two misunderstandings of digital transformation
- 渐变色按钮功能按钮绘制C语言示例
- Kernel mode and user mode
- C语言绘图示例-商标徽标
- Research on Wenhua commodity index
- Valid bracket sequence of "Niuke | daily question"
猜你喜欢

数字化转型的两种误区

mysql学习笔记-约束

Research on Wenhua commodity index

02-3、指针和引用的区别
![[embedded unit test] construction of C language unit test framework](/img/d4/ba7e5ffa1a782c2478d1f6682f2637.png)
[embedded unit test] construction of C language unit test framework

Enabling cities to "plan, build, operate, manage and serve" -- MAPGIS CIM platform explores "cim+" multi scenario applications

【嵌入式单元测试】C语言单元测试框架搭建

Redis Distributed cache - Redis Cluster
![[PostgreSQL] PostgreSQL 15 optimizes distinct](/img/7c/89d05171902dd88bd2b5c352c3614f.png)
[PostgreSQL] PostgreSQL 15 optimizes distinct

TCP拥塞控制详解 | 7. 超越TCP
随机推荐
Opencv draw a black rectangle and write the serial number
Fundamentals of scala (3): operators and process control
Solution of connecting MySQL instance with public network
LeetCode_77_组合
LeetCode_ 216_ Combined sum III
『牛客|每日一题』有效括号序列
Swift 二进制数据与16进制字符串的相互转换
FreeRTOS personal notes - protection of critical values
MySQL cannot be started? Relevant components missing? System upgrade? Component mismatch? Start reinstalling MySQL
使用原生js实现按钮的全选功能,简单清晰
TiKV Follower Read
MAPGIS igserver Kyushu - expand service development under the control of localization environment
STM32F407 NVIC
MapGIS IGServer九州-驾驭国产化环境下的拓展服务开发
LeetCode刷题——查找和最小的 K 对数字#373#Medium
2022.07.14 summer training personal qualifying (IX)
C语言绘图示例-调色板
[vulnhub range] prime:1 record of shooting process
Dual machine hot standby of Huawei firewall (NGFW)
[untitled] CV learning 1 conversion