lecture 14 basic i/o interface presented by dr. shazzad hosain asst. prof. eecs, nsu
TRANSCRIPT
![Page 1: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/1.jpg)
Lecture 14Basic I/O Interface
Presented ByDr. Shazzad Hosain
Asst. Prof. EECS, NSU
![Page 2: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/2.jpg)
7-segment LED Display00H – 03H are the I/O ports
7654 32100000 0000 Port A0000 0001 Port B0000 0010 Port C0000 0011 Command Register
5 6 4 2 8 9 0 1MEM
1. For 8 (eight) times1. Send data through port A2. Select a segment through port B
OUT PORT, DATA OUT DX, AL
![Page 3: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/3.jpg)
7-segment LED Display00H – 03H are the I/O ports
7654 32100000 0000 Port A0000 0001 Port B0000 0010 Port C0000 0011 Command Register
5 6 4 2 8 9 0 1MEM
MOV BX, 8 ; countMOV AH, 7FH ; selectionMOV SI, OFFSET MEM-1 MOV DX, 01H ; port B
DISP1: MOV AL, AH OUT DX, AL DEC DX MOV AL, [BX+SI] OUT DX, AL CALL DELAY
ROR AH, 1INC DXDEC BXJNZ DISP1
0111 1111
SI
1. For 8 (eight) times1. Send data through port A2. Select a segment through port B
![Page 4: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/4.jpg)
7-segment LED Display
MOV BX, 8 ; countMOV AH, 7FH ; selectionMOV SI, OFFSET MEM-1 MOV DX, 01H ; port B
ROR AH, 1INC DXDEC BXJNZ DISP1
DISP1: MOV AL, AH OUT DX, AL DEC DX MOV AL, [BX+SI] OUT DX, AL CALL DELAY
DISP PROC NEAR PUSHF PUSH AX PUSH BX PUSH DX PUSH SI
POP SI POP DX POP BX POP AX POPF RETDISP ENDP
![Page 5: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/5.jpg)
Stepper Motor Interfaced to the 82C55
0
1
2
4
0011 = 3H 0110 = 6H
1100 = CH 1001 = 9H
![Page 6: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/6.jpg)
Stepper Motor Interfaced to the 82C55
If CX > 8000H then spin right hand direction else spin left hand direction
Steeper Motor
![Page 7: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/7.jpg)
If CX > 8000H then spin right hand direction else spin left hand direction
33H / 66H / CCH / 99H
7654 32100011 0011 = 33H0110 0110 = 66H1100 1100 = CCH1001 1001 = 99H
![Page 8: Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU](https://reader036.vdocument.in/reader036/viewer/2022083005/56649f275503460f94c3f527/html5/thumbnails/8.jpg)
References
• Chapter 10.3 The Intel Microprocessors – by Barry B. Brey