1 / 8

Lecture 14 Basic I/O Interface

Lecture 14 Basic I/O Interface. Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU. 7-segment LED Display. 00H – 03H are the I/O ports 7654 3210 0000 0000 Port A 0000 0001 Port B 0000 0010 Port C 0000 0011 Command Register. MEM. 5 6 4 2 8 9 0 1. For 8 (eight) times

dianne
Télécharger la présentation

Lecture 14 Basic I/O Interface

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 14Basic I/O Interface Presented By Dr. ShazzadHosain Asst. Prof. EECS, NSU

  2. 7-segment LED Display 00H – 03H are the I/O ports 7654 3210 0000 0000 Port A 0000 0001 Port B 0000 0010 Port C 0000 0011 Command Register MEM 5 6 4 2 8 9 0 1 • For 8 (eight) times • Send data through port A • Select a segment through port B OUT PORT, DATA OUT DX, AL

  3. 7-segment LED Display 00H – 03H are the I/O ports 7654 3210 0000 0000 Port A 0000 0001 Port B 0000 0010 Port C 0000 0011 Command Register MEM 5 6 4 2 8 9 0 1 SI 0111 1111 DISP1: MOV AL, AH OUT DX, AL DEC DX MOV AL, [BX+SI] OUT DX, AL CALL DELAY ROR AH, 1 INC DX DEC BX JNZ DISP1 MOV BX, 8 ; count MOV AH, 7FH ; selection MOV SI, OFFSET MEM-1 MOV DX, 01H ; port B • For 8 (eight) times • Send data through port A • Select a segment through port B

  4. 7-segment LED Display DISP PROC NEAR PUSHF PUSH AX PUSH BX PUSH DX PUSH SI POP SI POP DX POP BX POP AX POPF RET DISP ENDP DISP1: MOV AL, AH OUT DX, AL DEC DX MOV AL, [BX+SI] OUT DX, AL CALL DELAY ROR AH, 1 INC DX DEC BX JNZ DISP1 MOV BX, 8 ; count MOV AH, 7FH ; selection MOV SI, OFFSET MEM-1 MOV DX, 01H ; port B

  5. Stepper Motor Interfaced to the 82C55 0011 = 3H 1 0110 = 6H 2 0 4 1001 = 9H 1100 = CH

  6. Stepper Motor Interfaced to the 82C55 Steeper Motor If CX > 8000H then spin right hand direction else spin left hand direction

  7. If CX > 8000H then spin right hand direction else spin left hand direction 7654 3210 0011 0011 = 33H 0110 0110 = 66H 1100 1100 = CCH 1001 1001 = 99H 33H / 66H / CCH / 99H

  8. References • Chapter 10.3 The Intel Microprocessors – by Barry B. Brey

More Related