??? 02/14/05 18:22 Modified: 02/14/05 18:28 Read: times |
#87415 - It is useful! Responding to: ???'s previous message |
Dear macsamhrain
I read your code and compile it there is a bit errors in your code(depending on your compiler) DELAY: MOV R7,#02d ;MOV R7,#02 is correct rst_inner_loop: MOV R6, #250d ;MOV R6, #250 is correct ORG 000h MOV P3, #0FFh JMP MAINCODE ; EXTERNAL INTERRUPT ORG 000h ; if external interrupt 0 is selected org 03H is correct ; if external interrupt 1 is selected org 13H is correct CONVERT: ANL A, #0AAh CJNE A,#02H, NEXT1 MOV A, #01H NEXT1:CJNE A,#20H, NEXT2 MOV A, #10H NEXT2:CJNE A,#0AH, NEXT3 MOV A, #03H NEXT3:CJNE A,#20H, NEXT4 MOV A, #04H NEXT4:CJNE A,#22H, NEXT5 MOV A, #05H NEXT5:CJNE A,#28H, NEXT6 MOV A, #06H NEXT6:CJNE A,#2AH, NEXT7 MOV A, #07H NEXT7:CJNE A,#80H, NEXT8 MOV A, #08H NEXT8:CJNE A,#82H, NEXT9 MOV A, #09H NEXT9: MOV A, #00H RET if A=02 ,20H,0AH,22H,28H,2AH,80H,82H THEN A=0 therefore i think you must change your code to CONVERT: ANL A, #0AAh CJNE A,#02H, NEXT1 MOV A, #01H SJMP END_NEXTA NEXT1:CJNE A,#20H, NEXT2 MOV A, #10H SJMP END_NEXTA NEXT2:CJNE A,#0AH, NEXT3 MOV A, #03H SJMP END_NEXTA NEXT3:CJNE A,#20H, NEXT4 MOV A, #04H SJMP END_NEXTA NEXT4:CJNE A,#22H, NEXT5 MOV A, #05H SJMP END_NEXTA NEXT5:CJNE A,#28H, NEXT6 MOV A, #06H SJMP END_NEXTA NEXT6:CJNE A,#2AH, NEXT7 MOV A, #07H SJMP END_NEXTA NEXT7:CJNE A,#80H, NEXT8 MOV A, #08H SJMP END_NEXTA NEXT8:CJNE A,#82H, NEXT9 MOV A, #09H SJMP END_NEXTA NEXT9: MOV A, #00H END_NEXTA: RET And other things. PLEASE notify me if you problem is existed yet! Regards Mehdi N.Rahni |
Topic | Author | Date |
4 bit binary input | 01/01/70 00:00 | |
Swap and Mask | 01/01/70 00:00 | |
as I read your post | 01/01/70 00:00 | |
FAO Eric the Great. | 01/01/70 00:00 | |
oops | 01/01/70 00:00 | |
Updated profile | 01/01/70 00:00 | |
It is useful! | 01/01/70 00:00 | |
already shown | 01/01/70 00:00 | |
Reformatted Code for readability | 01/01/70 00:00 | |
Neat | 01/01/70 00:00 | |
re:neat | 01/01/70 00:00 | |
risque business | 01/01/70 00:00 | |
Strobe | 01/01/70 00:00 | |
Strobe valid? | 01/01/70 00:00 | |
For any pinout![]() | 01/01/70 00:00 |