qz9_8255_SOLN - program to monitor the system continually...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EE390 QZ 9 Name : Section : I.D. 1. Assume you have an 8255A chip that is used as an isolated I/O with port A at address 5000H, Port B at address 5001H, Port C at address 5002H, and the Control Register at address 5003H. Port C is connected to eight different LED’s and port A and port B are connected to 16 switches. If any switch in port A is ON, the upper portion of port C Will be ON. If any switch in port B is turned ON, then the lower portion of port C will ON and OFF with some delay on each case. Write a DOCUMENTED
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: program to monitor the system continually START: MOV DX, 5000H ; INPUT PORT A IN AL, DX AND AL, 0FFH ; CHECK IF ANY SWITCH IS ON JZ CONT MOV AL, 0F0H ; MAKE UPPER C ON CONTINUOUSLY MOV DX, 5002H OUT DX, AL CONT: MOV DX, 5001H ; INPUT PORT B IN AL, DX AND AL, 0FFH ; CHECK IF ANY SWITCH IN PORT B IS ON JZ START ; IF NO SWITCH IS ON, THEN REPEAT MOV AL, 0FH ; IF ANY SWTICH IN B IS ON MOV DX, 5002H ; MAKE LOWER C ON ON_OFF: OUT DX, AL CALL DELAY ; CALL DELAY XOR AL, 0FH ; ALTERNATE LOWER C ON AND OFF. JMP ON_OFF...
View Full Document

This note was uploaded on 05/17/2010 for the course EE EE390 taught by Professor Mohandes during the Spring '10 term at King Fahd University of Petroleum & Minerals.

Page1 / 2

qz9_8255_SOLN - program to monitor the system continually...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online