Download presentation
Presentation is loading. Please wait.
Published byElisabeth McDaniel Modified over 9 years ago
1
Lecture 14 Basic I/O Interface Presented By Dr. Shazzad Hosain 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 5 6 4 2 8 9 0 1 MEM 1.For 8 (eight) times 1.Send data through port A 2.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 5 6 4 2 8 9 0 1 MEM MOV BX, 8 ; count MOV AH, 7FH ; selection MOV 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, 1 INC DX DEC BX JNZ DISP1 0111 1111 SI 1.For 8 (eight) times 1.Send data through port A 2.Select a segment through port B
4
7-segment LED Display MOV BX, 8 ; count MOV AH, 7FH ; selection MOV SI, OFFSET MEM-1 MOV DX, 01H ; port B ROR AH, 1 INC DX DEC BX JNZ 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 RET DISP ENDP
5
Stepper Motor Interfaced to the 82C55 0 1 2 4 0011 = 3H 0110 = 6H 1100 = CH 1001 = 9H
6
Stepper Motor Interfaced to the 82C55 If CX > 8000H then spin right hand direction else spin left hand direction Steeper Motor
7
If CX > 8000H then spin right hand direction else spin left hand direction 33H / 66H / CCH / 99H 7654 3210 0011 0011 = 33H 0110 0110 = 66H 1100 1100 = CCH 1001 1001 = 99H
8
References Chapter 10.3 The Intel Microprocessors – by Barry B. Brey
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.