??? 02/14/06 22:52 Read: times |
#109991 - Formatted Fragments Responding to: ???'s previous message |
Don't you get an error with two "LABEL1"'s and a call to 900uc when it should be 900us ??
Assuming 11.059Mhz crystal, you're delay is right. But other than that, this appears to be just fragments with errors and no apparent flow. Jon ORG 0 LJMP START ORG 40H START: MOV R0,#09 MAIN: JB P1.0,$ JNB P1.0,$ DJNZ R0,MAIN MOV R0,#05 CLR A ; MAIN2: ACALL delay_900uc MOV C,P1.0 RLC A DJNZ R0,MAIN2 RLC A RLC A RLC A CJNE A,#38,LABEL1 ; LABEL1: MOV P2,0FFH LABEL1: CJNE A,#39,LABEL2 MOV P2,00H LABEL2: JMP MAIN ; delay_900us: ; TT0: MOV R2,#2 MOV R1,#152 TT1: DJNZ R1,TT1 DJNZ R2,TT1 NOP RET END |