微机原理与接口技术第七章作业_第1页
微机原理与接口技术第七章作业_第2页
微机原理与接口技术第七章作业_第3页
微机原理与接口技术第七章作业_第4页
微机原理与接口技术第七章作业_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Chapter 73.(1) Program-controlled I/O: All control is directly under the control of the program, so changes can be readily implemented. The order in which devices are serviced is determined by the program, this order is not necessarily fixed but can be altered by the program, as necessary. It is rel

2、atively easy to add or delete devices. But a great deal of time may be spent on testing the status inputs of the I/O devices, when the devices do not need servicing.(2) Interrupt-controlled I/O: It is accomplished by having the I/O device generate an interrupt signal which is tested directly by the

3、hardware of the CPU. The simplest type of interrupt facility is that the processor executes a subprogram branch at some specific address whenever an interrupt input is detected by the CPU. The return address is saved by the processor as a part of the interrupt process.(3) DMA: Direct memory access (

4、DMA) is a feature of modern computers which allows certain hardware subsystems within the computer to access system memory independently of the central processing unit (CPU). In the process of data transmitting, the DMA controller is participated in the process, and dont need the interference of the

5、 CPU.6. MOV DX ,43H MOV AL ,10100010 OUT DX,AL7.Suppose the address of 8255 is 0FFE0H0FFE3H. The program is as follows:DATA SEGMENTDB 100H DUP(?)DATA ENDSCODE SEGMENT ASSUME CS:CODE ,DS DATASTART:MOV AX,DATA MOV DS,AX MOV AL,10010000 MOV DX,0FFE3H OUT DX,AL MOVDX, 0FFE0H IN AL,DX INC DX NOTAL OUTDX,

6、ALRETCODE ENDS END START11. Suppose the port address of 8254 is 40H-43H,the control word of counter 0 is 00110000B=30H, and the count constant is 1000.The initialization program is as follows:MOV AL,30HOUT43H,ALMOV AX,1000OUT40H,AL MOV AL,AHOUT40H,AL12. The port address of 8254 is 38H-3BH. The contr

7、ol word of counter 0 is 00110110B=36H. The count constant is 100K*10ms=1000.The initialization is as follows:MOV AL,36HOUT3BH,ALMOV AX,1000OUT38H,AL MOV AL,AHOUT38H,AL16. The baud rate is 100*(1+7+1+2)=1100bps19. Suppose the port address of 8250 is 3F8H-3FEH.XTAL1=1.8432MHz, BAUD=2400.Programmable b

8、aud generator: 1.8432M/(2400*16)=48=30H 3F8HLine control register: 10011111B=1FH 3FBHInterrupt enable register: 00000001B=01H 3F9HThe initialization program is as follows:MOVDX,3FBHMOVAL,80HOUTDX,ALMOVDX,3F8HMOVAX,30HOUTDX,AL INC DXMOV AL,AHOUTDX,ALMOVDX,3FBHMOVAL,1FHOUTDX,AL MOVDX,3FCHMOVAL,03HOUTD

9、X,ALMOVDX,3F9HMOVAL,01HOUTDX,AL21. (1) (2) The initialization program of 8255:MOVDX,103HMOVAL,10010000B MOVDX,ALThe port address of 8250 is 108H10EH.XTAL1=1.8432MHz, BAUD=2400 Programmable baud generator=1.8432M/(2400*16)=48=30H 108HLine control register: 00001111B=0FH 10BHInterrupt enable register:

10、 00000000B=00H 109HThe initialization program of 8250 is as follows:MOVDX,10BHMOVAL,80HOUTDX,ALMOVDX,108HMOVAX,30HOUTDX,ALMOVDX,109HMOVAL,AHOUTDX,ALMOVDX,10BHMOVAL,0FHOUTDX,AL MOVDX,10CHMOVAL,03HOUT DX,ALMOV DX,109HMOV AL,0 OUT DX,AL 24. Suppose DREQ1 is active high, DACK1 is active low. Use block transfer mode.Address of 8237 is 0310H031FH.The program is as follows: MOV DX, 031DH MOV AL, 0 OUT DX, AL MOV DX, 0312H MOV AL, 00H MOV DX, AL MOV AL, 20H MOV DX, AL MOV DX, 03

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论