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

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am