0% found this document useful (0 votes)
157 views

Lab Assignment #2 8255A INTERFACE (LED) : Green

This document describes an 8255A interface used to control LEDs on a board. The 8255A has 3 I/O ports (A, B, C) and port B is used to control 4 LEDs by setting the first 4 bits of the port to 0001, 0010, 0100, 1000 to light the upper red, green, yellow, and second red LED respectively. The task is to reverse the order the LEDs light by changing the code to light the LEDs from second red to upper red.

Uploaded by

Ibrahim Hejab
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views

Lab Assignment #2 8255A INTERFACE (LED) : Green

This document describes an 8255A interface used to control LEDs on a board. The 8255A has 3 I/O ports (A, B, C) and port B is used to control 4 LEDs by setting the first 4 bits of the port to 0001, 0010, 0100, 1000 to light the upper red, green, yellow, and second red LED respectively. The task is to reverse the order the LEDs light by changing the code to light the LEDs from second red to upper red.

Uploaded by

Ibrahim Hejab
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1

Lab Assignment #2 8255A INTERFACE (LED)


ADDRESS
10H ~ 17H

I/O PORT
8255A-CS1/ 8255A-CS2

DESCRIPTION
8255A-CS1(DOT & ADC INTERFACE) 18H : A PORT DATA REGISTER 1AH : B PORT DATA REGISTER 1CH : C PORT CONTROL REGISTER 8255-CS2(LED & STEPPING MOTOR) 19H : A PORT DATA REGISTER 1BH : B PORT DATA REGISTER 1DH : C PORT CONTROL REGISTER 1FH : CONTROL REGISTER

8255 is a programmable peripheral interface. It has 3 I/O ports named as port A, B, C Port B is controlling the four LEDs on the board, by we keeping high any of the first four bits as following: (0001 for the upper RED LED) (0010 for the GREEN LED) (0100 for the YELLOW LED) (1000 for the Second RED LED)

Prepared By: Ibrahim Hazmi

2 This Code was used to Glow the upper RED, the GREEN, the YELLOW, then the Second RED LED Respectively. The Task is to REVERSE the ORDER of LEDs Glowing to be from the Second RED to the upper RED LED by CHANGING the RED PART of the Code ;***************************************** ; MDA-Win8086 EXPERIMENT PROGRAM * ; FILENAME : LED.ASM ; PROCESSOR : I8086 ;***************************************** CODE SEGMENT ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE ; PPIC_C EQU 1FH PPIB EQU 1BH ; ORG 1000H MOV AL,10000000B OUT PPIC_C,AL ; L1: MOV AL,11110001B L2: OUT PPIB,AL CALL TIMER SHL AL,1 TEST AL,00010000B JNZ L1 OR AL,11110000B JMP L2 ; INT 3 ; TIMER: MOV CX,1 TIMER2: PUSH CX MOV CX,0 TIMER1: NOP NOP NOP NOP LOOP TIMER1 POP CX LOOP TIMER2 RET ; CODE ENDS END

Prepared By: Ibrahim Hazmi

You might also like