raul260291
Junior Member level 1
Hi Firends,
I am working for project which uses the serial communication using 8051.
I used the keil software to write the program and it simulates well in the KEIL.
Coming to Proteus, the output differs from the expected one.
please help me...
This is the prototype program to glow the LED for a particular key.
MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
THER:
MOV P1,#00H
CLR RI
RPT: JNB RI,RPT
MOV A,SBUF
MOV R3,A
CLK: CJNE R3,#31H,ANTI_CLK
SETB P1.4
ACALL DELAY
SJMP THER
ANTI_CLK: CJNE R3,#32H,STOP
SETB P1.2
ACALL DELAY
SJMP THER
STOP: CJNE R3,#30H,ILLEGAL
SETB P1.0
ACALL DELAY
SJMP THER
ILLEGAL:SETB P1.6
ACALL DELAY
SJMP THER
DELAY:
MOV R5,#255
HERE1:MOV R4,#255
HERE:MOV R2,#255
HERE2JNZ R2,HERE2
DJNZ R4,HERE
DJNZ R5,HERE1
RET
END
The above program works well in the KEIL but not in Proteus.
Here is the hardware DESIGN picture. please tell if there are any wrong hardware connections
I am working for project which uses the serial communication using 8051.
I used the keil software to write the program and it simulates well in the KEIL.
Coming to Proteus, the output differs from the expected one.
please help me...
This is the prototype program to glow the LED for a particular key.
MOV TMOD,#20H
MOV TH1,#-3
MOV SCON,#50H
SETB TR1
THER:
MOV P1,#00H
CLR RI
RPT: JNB RI,RPT
MOV A,SBUF
MOV R3,A
CLK: CJNE R3,#31H,ANTI_CLK
SETB P1.4
ACALL DELAY
SJMP THER
ANTI_CLK: CJNE R3,#32H,STOP
SETB P1.2
ACALL DELAY
SJMP THER
STOP: CJNE R3,#30H,ILLEGAL
SETB P1.0
ACALL DELAY
SJMP THER
ILLEGAL:SETB P1.6
ACALL DELAY
SJMP THER
DELAY:
MOV R5,#255
HERE1:MOV R4,#255
HERE:MOV R2,#255
HERE2JNZ R2,HERE2
DJNZ R4,HERE
DJNZ R5,HERE1
RET
END
The above program works well in the KEIL but not in Proteus.
Here is the hardware DESIGN picture. please tell if there are any wrong hardware connections