PG1995
Full Member level 5
Hi
I'm new to MCUs and learning Proteus and some other related programs.
I'm trying to do this problem (I think the code given in the book is not correct so the correct code is given below). I have also attached Proteus file.
I was able to build circuit in Proteus and it works too! I also played around with MCU 8051 IDE. In the linked videos I have some questions. Please help me with them. In Video #1, please ignore Q1. Thank you very much.
Video #1: https://www.youtube.com/watch?v=Os6NhBpRAjc
Video #2: https://www.youtube.com/watch?v=wQLVj3bDkGg
Correct Code:
I'm new to MCUs and learning Proteus and some other related programs.
I'm trying to do this problem (I think the code given in the book is not correct so the correct code is given below). I have also attached Proteus file.
I was able to build circuit in Proteus and it works too! I also played around with MCU 8051 IDE. In the linked videos I have some questions. Please help me with them. In Video #1, please ignore Q1. Thank you very much.
Video #1: https://www.youtube.com/watch?v=Os6NhBpRAjc
Video #2: https://www.youtube.com/watch?v=wQLVj3bDkGg
Correct Code:
Code:
ORG 00H
MOV A,#55H
AGAIN: MOV P1,A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY: MOV R5,#2
HERE1: MOV R4,#180
HERE2: MOV R3,#255
HERE3: DJNZ R3,HERE3
DJNZ R4,HERE2
DJNZ R5,HERE1
RET
END
Attachments
Last edited: