- 1、本文档共88页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[工学]《微型计算机原理》第七章 输入输出与中断
第七章 输入/输出与中断 I/O接口概述 CPU与外设之间数据传送的方式 中断技术 内容与要求: 1.了解I/O的作用、寻址方式、控制方式。 2.理解I/O设备与主机之间的交换数据的控制方式(程序控制I/O方式、中断I/O方式、直接存储器存取DMA方式)。 3.理解中断原理、中断系统、Intel8259A中断。 7.1 I/O接口概述 I/O接口的作用 CPU与外设交换的信息 I/O接口的基本结构 I/O端口的编址 Case 1: 8-bit data ports FORMAT IN dest, source Example: 1. IN AL, port# 2. MOV DX, port# IN AL, DX FORMAT OUT dest, source Example: 1. OUT port#, AL 2. MOV DX, port# OUT DX, AL Case 2: 16-bit data ports Example: 1. IN AX, port# 2. MOV DX, port# IN AX, DX Example: 1. OUT port#, AX 2. MOV DX, port# OUT DX, AX Example: assume that AX=98F6H and that the port address is 47H. OUT 47H, AX ;send out AX to port 47H 48H The following are the differences between peripheral I/O and memory-mapped I/O. In memory-mapped I/O, we must use instructions accessing memory locations to access the memory-mapped I/O ports instead of IN and OUT instructions. For example, an instruction such as “MOV AL, [2000]” will access an input port of memory address 2000 and “MOV [2010], AL” will access the output port. In memory-mapped I/O, the entire 20-bit address, A0-A19, must be decoded. This is in contrast to peripheral I/O, in which only A0-A7 or A0-A15 are decode, depending on whether the port address is 8- or 16-bit, Furthermore, since the 20-bit address involves both the segment and an offset, the DS register must be loaded before memory-mapped I/O is accessed. For example, If physical memory address 35000H is used for the input port, the following instructions can be used to access the port. MOV AX, 3000H ;load the segment value MOV DS, AX MOV AL, [5000] ;bring in 1 byte from address 3500H Physical address 35000H is generated by shifting left DS one hex digit and adding it to offset address 5000(30000+5000)=35000H).Since all 20-bit address are decoded, the decoding circuitry for memory-mapped I/O is more expensive. In memory-mapped I/O circuit interfacing, control signals MEMR and MEMW are used. This is in contrast to peripheral
您可能关注的文档
- [工学]TC上机步骤.ppt
- [工学]TCA循环.ppt
- [工学]THP预编码.pdf
- [工学]TCPIP协议第1章概述.ppt
- [工学]THZTL-1实验指导书.pdf
- [工学]UG50教程第6章.ppt
- [工学]Tracepro学习教程.ppt
- [工学]TP4V10.ppt
- [工学]VB 程序设计08.ppt
- [工学]VB6常用方法汇编.doc
- c程序员面试题及答案.doc
- 第01讲 运动的描述(练习)(解析版)-【上好课】2025年高考物理一轮复习讲练测(新教材新高考).pdf
- c的面试题及答案.doc
- 第01讲 运动的描述(练习)(原卷版)-【上好课】2025年高考物理一轮复习讲练测(新教材新高考).pdf
- 2003年非典后航空复盘分析报告.pdf
- 第02讲 匀变速直线运动的规律(练习)(解析版)-【上好课】2025年高考物理一轮复习讲练测(新教材新高考).pdf
- 第02讲 匀变速直线运动的规律(练习)(原卷版)-【上好课】2025年高考物理一轮复习讲练测(新教材新高考).pdf
- c考试题库及答案.doc
- c面试题及答案.doc
- 汽车管件及座椅骨架、异形金属结构件生产线改造项目(技术改造)报告表.pdf
文档评论(0)