Microprocessor Lab-00 Introduction s05
Microprocessor Lab-00 Introduction s05
Laboratory 0. Introduction
Objective:
Procedure:
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
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.
Circuit 1
_______________________________________________________________
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
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
Result 4: