??? 06/15/07 08:48 Read: times Msg Score: -1 -1 Answer is Wrong |
#140825 - You need to set the Stack Pointer Register Responding to: ???'s previous message |
Asif Ali said:
ORG 0000H LJMP MAIN ORG 0030H MAIN: LCALL DELAY ;quater second delay MOV P1,#000H MOV P3,#000H LCALL DELAY ;quater second delay MOV P1,#0FFH MOV P3,#0FFH SJMP MAIN DELAY: MOV R7,#250 AGN: MOV R6,#250 HRE: NOP NOP DJNZ R6,HRE DJNZ R7,AGN RET END Asif : You haven't initialized the Stack Pointer. I haven't checked this, but I think the default value of SP is 07h which is R7. In this case, the delay routine returns to 0000H and you will not get blinking. Jerson |