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

Microprocessor Lab-00 Introduction s05

1. The document introduces assembly language programming for a microcontroller using M-IDE Studio software. It describes using the software to write, compile, simulate, and test assembly code programs on a circuit. 2. The lab procedure has students write a sample assembly code program, compile and run it in an emulator to observe register values. It also has them simulate the program's execution on a circuit in Proteus simulator software. 3. Students are tasked with writing additional assembly codes, simulating their execution on the circuit, and explaining the observed results, to learn about microcontroller programming and how code executes on hardware.

Uploaded by

Panumas Janloy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Microprocessor Lab-00 Introduction s05

1. The document introduces assembly language programming for a microcontroller using M-IDE Studio software. It describes using the software to write, compile, simulate, and test assembly code programs on a circuit. 2. The lab procedure has students write a sample assembly code program, compile and run it in an emulator to observe register values. It also has them simulate the program's execution on a circuit in Proteus simulator software. 3. Students are tasked with writing additional assembly codes, simulating their execution on the circuit, and explaining the observed results, to learn about microcontroller programming and how code executes on hardware.

Uploaded by

Panumas Janloy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1

CIVIL AVIATION TRAINING CENTER


COURSE COMMUNICATIONS MAINTENANCE
SUBJECT MICROPROCESSOR

Student Name: Course:


ID: Group:

Laboratory 0. Introduction
Objective:

1. Introduce Assembly Editor Software, Emulator and Circuit Simulator


software.
2. Familiarize with basic Assembly Instruction.

Procedure:

Lab 0.1 Assembly Editor and Emulator Software

1. Start program M-IDE Studio for MCS-51.

2. In new editor window, type Assembly instruction code as follow.


2

Table 1
Line Assembly Code 1 Register Describe the operation
No. A R0 R1 R2
1 ORG 0000H
2 MOV R0, #078H
3 MOV A, #E4H
4 MOV R1, A
5 MOV A, R0
6 MOV R2, A
7 INC A
8 XCH A, R2
9 MOV R1, A
10 MOV A, #01AH
11 MOV R0, A
12 END

3. Save file as Lab0_1.asm


4. Compile and build Hex code from an assembly code by menu Build / Build
(or press F9) and check the result from the bottom of M-IDE window.
5. If some error report, check and revise assembly code and try function Build
again until no error report. The program will build file Lab0_1.hex in the
same folder.
6. Start program TS Controls Emulator 8051. Use menu “Load HEX file” to
open Lab0_1.hex
3

7. Select menu RUN / Step (or press F11) to start simulation step by step.
8. Record results register A, R0, R1, R2 and describe the operation to Table 1
9. Repeat step 7 and 8 until finish the last instruction.

Lab 0.2 Simulator Software

10. Open Proteus 8 Professional version and draw an attached document

Circuit 1

11. Without program for MCS-51 Microcontroller, Start simulation by click


“Play button” at the left bottom corner.

Observe indication color of each port of microcontroller. Explain the result:


_______________________________________________________________

_______________________________________________________________
4

12. Simulate the operation of the circuit with the following assembly code.

Code 2: Code 3:
ORG 00H ORG 00H
MOV P3, #11110000B MOV P3, #0FH
END END

Explain the observed result in the table below.

Result 2: Result 3:

13. Simulate the operation of the circuit with the following assembly code.

Code 4: :
ORG 0000H
MOV P3,#00H
MOV A, #00000001B
WaitSW: JB P2.0, WaitSW
Loop: MOV P3,A
ACALL Delay
RR A
JMP Loop
Delay:
MOV R3,#21D
DelayLoop:
MOV TL1,#08H
MOV TH1,#1H
SETB TR1
Monitoring: JNB TF1, Monitoring
CLR TR1
CLR TF1
DJNZ R3, DelayLoop
RET
END

Explain the observed result in the table below.

Result 4:

You might also like