Discussion in "Project Help" started by    yogesh puri    May 24, 2017.
Wed May 24 2017, 04:04 am
#1
i am unable to simulate following code in protous. output port p1 not giving any results as per programe. i need this code on urgent basis. pl. help me.

;******************************************************************************************************
;
;******************************************************************************************************
; XTAL Freq = 12 MHz

;DATA IN PORT P3
;+++++++++++++++++++++++++++++++++++
;
;##################################################
MOV P3,#0FFH ; P3 ASSIGNED AS INPUT PORT FOR LM324 OUTPUT


MAIN:
MOV A,P3
CLR C
SUBB A,#11111110B
JNZ NEXT
AJMP EMPTY

NEXT: MOV A,P3
CLR C
SUBB A ,#11111100B
JNZ NEXT1 ; 2 KEY PRESSED
AJMP NOTOK

NEXT1: MOV A ,P3
CLR C
SUBB A ,#11111000B
JNZ NEXT2 ; 8 KEY PRESSED
AJMP OK
NEXT2:
AJMP MAIN

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

EMPTY:
;CAGE IS EMPTY
MOV P1,#11110000B
AJMP MAIN
NOTOK:
;PART IS NOT OK
MOV P1,#10101010B

AJMP MAIN
OK:
;PART IS OK
MOV P1,#00000000B
AJMP MAIN


END
Wed May 24 2017, 10:30 am
#2
All I can say looking at the post is "insufficient information"
Thu May 25 2017, 02:53 am
#3


i am unable to simulate following code in protous. output port p1 not giving any results as per programe. i need this code on urgent basis. pl. help me.

yogesh puri


It probably is giving the results as per the program, just not what you expect.
You will have to tell us what you wanted to happen.
Ideally post your Proteus simulation.
Fri May 26 2017, 04:03 am
#4
dear sir
if i simulate the above program in keil its working ok. but in proteous port p1 remains high no change in pin logic as per program. if i send bit change command then port1 logic changes, i am feeling there is something wrong with CJNE or SUBB command. pl. help

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Williamjaf
Tue Apr 16 2024, 12:25 pm
best_yyPa
Tue Apr 16 2024, 09:42 am
ErnestoExpop
Tue Apr 16 2024, 02:57 am
Jamesclepe
Mon Apr 15 2024, 11:10 am
Aliciaelora
Mon Apr 15 2024, 07:59 am
btaletvpcu
Mon Apr 15 2024, 04:36 am
UbvpwcTib
Mon Apr 15 2024, 03:13 am
AmyJow
Sun Apr 14 2024, 11:54 pm