Professional Documents
Culture Documents
04x Lab 04xtra Interfacing With Other IO Device
04x Lab 04xtra Interfacing With Other IO Device
04x Lab 04xtra Interfacing With Other IO Device
MICROPRESSOR SYSTEM
Equipments :
1. Computer station with Windows OS and MY1 8085 simulation program
2. 8085 Instruction Sets (Assembly Code)
3. 8085 Instruction Sets (Machine Code)
Introduction
The 8085 simulator program MY1 Sim85, has several built-in input output
graphical user interfaces (GUIs) developed for the users practice. Although not
exactly accurate as in the actual hardware input and output devices, but these
graphical interfaces do offer the user some added value demonstration materials in
understanding their program further. One can especially observe their simulation
program and analyze on any assembly code improvements.
Table 1 below lists out the available IO GUIs and its operating procedures:
1 8 LEDs (output) & 8 LEDs aligned in one row in one panel. There are two
panels available. The horizontal panel and the vertical
panel. Each LED requires logic HIGH to illuminate.
Direct usage bit to LED representation.
1
UniMAP
EKT222 Miroprocessor Systems Lab 4 Extra
4 7-segment LED 7-segment LED active high panel. Requires 8-bit data to
(output) send and operate the desired segment. Direct pin to
LED representation.
5 4x4 Keypad (input) 16 button panel using the 4x4 matrix. Using 5-bit
signals, 2 bit column, 2 bit row and one bit
acknowledge sent into the processor. The
acknowledge signal, DA will assert (logic HIGH) upon
valid keypress together with the 4x4 bit matrix data.
The data will stay present after the key is released until
another key is pressed.
DA - Data Acknowledge
D3 & D2 - 2-bit ROW data (00 ~ 11)
D1 & D0 - 2-bit COLUMN data (00 ~ 11)
2
UniMAP
EKT222 Miroprocessor Systems Lab 4 Extra
LABORATORY TASK
ORG 0000H
LXI SP,3FF0H ; stack memory setting
PORTA: EQU 80H ; set 80H with a name
PORTB: EQU 81H ;
PORTC: EQU 82H ;
CTRL: EQU 83H ;
As you can see, the Tables 8-bit values were prepared to illuminate the necessary
LED segments.
3
UniMAP
EKT222 Miroprocessor Systems Lab 4 Extra
Given below is a sample program to display the BCD value of a keypad on the 7-
segment LED. Values above 9 will cause the 7-segment LED to display Error. Take
note of the string of data sent to PORT A.
ORG 0000H
LXI SP,4000H
PORTA: EQU 80H
PORTB: EQU 81H
PORTC: EQU 82H
CTRL: EQU 83H
As you can see, the program will check if a key is pressed (DA=1) before that key is
released (DA=0). This process will justify a valid keystroke.
4
UniMAP
EKT222 Miroprocessor Systems Lab 4 Extra
EXERCISE
1. Create a program that will display the BCD value of a 4-bit switch on a 7-
segment LED. Use the BCD data string table from the Laboratory Task as
reference.
2. The BCD counter in Laboratory Task Part A counts on every clock pulse
supplied by the simulator software. Recreate the program so that the counter
will count on every clock pulse pressed by a PUSH BUTTON.
3. Create a program that will blink an LED according to the count of the keypad
value. For example if the key 5 is pressed, then the LED will blink 5 times
AFTER a PUSH BUTTON is pressed.
5. Create a program that will store 4 digits and then display the digits in
sequence on a 7-segment LED.
6. Using 2 push-pull switches, create a program that will fulfill the following
operation :
a. 00 the 7-segment displays 0 only
b. 01 the 7-segment will do a BCD continuous up count
c. 10 the 7-segment will do a BCD continuous down count
d. 11 the 7-segment will pause counting
5
UniMAP