Professional Documents
Culture Documents
EXPERIMENT NO. 1
m
er as
THE 8051 INSTRUCTION SET
co
eH w
o.
rs e
ou urc
o
Course/Section:CPE108L/E02
ed d
ar stu
Group No.: 1
sh is
Th
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
PART ONE: Familiarization with the simulator
Q1. What are the contents of the registers A, R6, and R0?
Q2. What is the output of the program? What do you think is the
effect of the changes you have made in the program?
m
because the value 256 can't be expressed in two
er as
bits of hexadecimal as it is 100H which has 3
co
eH w
digits. It will instead give the result of 0x00.
o.
rs e
ou urc
Q3. What are the added instructions to the new program?
o
aC s
v i y re
MOV B, #3CH
ADD A, B
ed d
ar stu
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
If the destination of the ADD is changed to R0, it
will give syntax error since the destination of
ADD should not be the temporary register.
Instead, if we can add the code MOV R0, A to
copy the result of the sum from register A for R0
to be the destination.
m
er as
ROM address Assembly Language Result
co
0000 CLR A Acc=0X00
eH w
0001 MOV R5, #35H R5=0X35
o.
0003
rs e MOV R7, #45H R7=0X45
ou urc
0005 MOV A, #0 Acc=0X00
0007 ADD A, R5 A=0X00
o
aC s
TABLE 2
ROM Assembly Machine Byte Size of the
Address Language Language instruction
sh is
(OpCode)
Th
0000 CLR A E4 1
0001 MOV R5, #35H 7D 35 2
0003 MOV R7, #45H 7F 45 2
0005 MOV A, #0 74 00 2
0007 ADD A, R5 2D 1
0008 ADD A, R7 2F 1
0009 ADD A, #27H 24 27 2
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
Q3-II. What is the total number of bytes of the program?
11
m
er as
Q5-II. Complete table 4 and 5 to RAM locations content.
co
TABLE 4
eH w
RAM 0x18 0x19 0x1A 0x1D 0x1F
o.
Locations
rs e
ou urc
Content 0x50 0x60 0x70 0x90 0x80
TABLE 5
0x10 0x11 0x12 0x15 0x17
o
RAM
aC s
Locations
v i y re
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
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 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
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 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
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 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
DICUSSION
In experiment, the focus was on the general
principle of a microcontroller and the 8051
instruction set. We’ve discussed on how to know
the contents on a certain registers, the parts of
the EdSim51 Simulator, and its instructions set. It
also allows us to write simple assembly language
m
er as
co
commands to the EdSim51 simulator.
eH w
o.
rs e
ou urc
In the part two of the experiment we have
discussed on how to locate the contents of the
o
aC s
v i y re
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
CONCLUSION
At the end of this experiment, we have
m
integrated circuit that is designed to do a specific
er as
co
eH w
operation. It includes a processor, memory,
o.
rs e
ou urc
input/output interface, data & address bus on a
o
the RAM.
This study source was downloaded by 100000765504945 from CourseHero.com on 08-23-2021 17:40:15 GMT -05:00
https://www.coursehero.com/file/71554106/DavidAscan-CPE108LE02-Experiment1docx/
Powered by TCPDF (www.tcpdf.org)