You are on page 1of 7

MICROPROCESSORS

EXPERIMENT NO. 5

DATA TRANSMISSION THROUGH


KEYPAD

m
er as
co
eH w
o.
rs e
ou urc

Name: ANGELES, EMERIE R.


o
aC s
v i y re

Course/Section: COE121L / E02


ed d
ar stu
sh is

Date of Performance: July 1, 2020


Th

Date of Submission: July 8, 2020

Engr. Isagani Villamor


Professor

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
PART ONE: KEYPAD SCANNING
Q1. Run the program to complete the table below.

Pressed Key Content of R0


0 0x00
1 0x01
2 0x02
3 0x03
4 0x04

m
5 0x05

er as
6 0x06

co
eH w
7 0x07

o.
8
rs e 0x08
ou urc
9 0x09
10 0x0A
o

11 0x0B
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
PART TWO: DATA TRANSMISSION THROUGH KEYPAD

Q1. Run the program to complete the table below.

Pressed Key LED output display (in Binary)


0 1111 1111
1 1111 1110
2 1111 1101
3 1111 1100
4 1111 1011

m
5 1111 1010

er as
6 1111 1001

co
eH w
7 1111 1000

o.
8
rs e 1111 0111
ou urc
9 1111 0110
10 1111 0101
o

11 1111 0100
aC s
v i y re

Q2. What instruction and where should it be added to display


the correct output in the LED? Explain why.
ed d
ar stu

The instruction added from the program was the CPL A where
sh is

it is placed between the instructions MOV A,RO and MOV PI,


Th

A. The command CPL means complement. This instruction

complements the content of the A register before displaying

on the LEDS that will result in a correct output.

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
Q3. After the changes made in Part II question Q2, run the

m
program and complete the table below.

er as
co
eH w
Pressed Key LED output display (in Binary)

o.
0
rs e 0000 0000
ou urc
1 0000 0001
2 0000 0010
o
aC s

3 0000 0011
v i y re

4 0000 0100
5 0000 0101
ed d

6 0000 0110
ar stu

7 0000 0111
8 0000 1000
sh is

9 0000 1001
Th

10 0000 1010
11 0000 1011

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
Q4. What is the output of the program? Give at least 4
samples and illustrate using a picture or a drawing with an
explanation.

The LEDs below, indicates a logic 0 or 1 value. Each of the led

light indicates a specific bit and are displayed from bit 0 to 7

from right to left. The colored or lighted boxes indicate a logic

value of 1 while the white boxes indicate a logic value of 0. In

m
er as
co
eH w
this case, the assigned value from a specific key on the

o.
rs e
ou urc
keypad, in reference with figure 2 of the experiment, was
o

displayed in the LEDs in their binary form.


aC s
v i y re
ed d
ar stu
sh is
Th

Figure 1: Key number 1 was pressed and resulted with a binary equivalent of 0000 0001

Figure 2: Key number 3 was pressed and resulted with a binary equivalent of 0000 0011
This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
Figure 3: Key number 7 was pressed and resulted with a binary equivalent of 0000 0111

m
er as
co
eH w
o.
rs e
ou urc
Figure 4: Key number 5 was pressed and resulted with a binary equivalent of 0000 0101
o
aC s

NOTE:
v i y re
ed d
ar stu
sh is
Th

Q5. Why do we need to clear the general-purpose flag F0?


What will be the effect of not clearing the F0?

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
The purpose of clearing the flag F0 is to not have a value of

zero in accumulator because when flag F0 set, the

accumulator is zero.

m
er as
co
eH w
o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000765504945 from CourseHero.com on 09-21-2021 17:50:55 GMT -05:00

https://www.coursehero.com/file/66003260/COE121L-E02-LabReport-05-ANGELESEMERIEpdf/
Powered by TCPDF (www.tcpdf.org)

You might also like