Lab - 5: Introduction To 8051 Microcontroller: 5.1 Objective
Lab - 5: Introduction To 8051 Microcontroller: 5.1 Objective
Lab - 5: Introduction To 8051 Microcontroller: 5.1 Objective
1
21395
Microcontroller and Microprocessor lab 5
2
21395
Microcontroller and Microprocessor lab 5
1. This task is designed to get you familiar with ASEM-51 assembler. Write a simple assembly language
code in which you move a value in register A. Then from register A, move this value to registers R0-R7.
Save this file as .asm and generate .hex file and simulate it. Write the code in following space. A
microcontroller simulator helps in viewing the inside of a microcontroller. Hex file of code is loaded in
the simulator which shows the code in ‘disassembled code window’. Values of different registers and data
in RAM is also shown and updated at each step of the code.
ORG 00H
Mov A, #0BH
MOV R0, A
MOV R2, A
MOV R3, A
MOV R4, A
MOV R5, A
MOV R6, A
MOV R7, A
END
2. Write an assembly language code in which a value is moved in register A. Then from register A, 06H is
added to this value and moved to register R0. Keep adding 06H and move the data from R1 to R7
registers. Now load the hex file of this code in the simulator and use the simulator to single step the
program. Examine and write down the values of registers (PC, ACC, and R0-R9) on each step and show
to your instructor.
ORG 00H
Mov A, #10H
ADD A, #06H
Mov R0, A
ADD A, #06H
Mov R1, A
ADD A, #06H
Mov R2, A
ADD A, #06H
Mov R3, A
ADD A, #06H
3
21395
Microcontroller and Microprocessor lab 5
Mov R4, A
ADD A, #06H
Mov R5, A
ADD A, #06H
Mov R6, A
ADD A,#06H
Mov R7,A
END
5.8 Assessment sheet:
CMS ID: 21395
DATE: 04-05-2015
1-introduction to 8051
Problem Number
2-description
Working
Lab Performance
Viva
Instructor's Verification
4
21395