Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/25/01 17:45
Read: times


 
#13502 - RE: again_simple program for testing 8051
Kamala,

> Always port 3 pins are
at low state.

then there is a chance that your code works correcly, but do you know that your delay takes nearly 40 seconds?
remove the outmost loop to get a nice visible blinking.
also, if you locate your code at 100h make sure that you put a jmp at address 0h, because thats the address the MCU is starting at when negating RESET.
You may also locate your entire code at 0h because you don't use any interrupts.


Brian,

mov sp,030h ;init stack pointer
mov P1,000h ;clear P1 "inputs"

those are direct to dorect memory mov's
the first one certainly causes trouble - not in your code though because you don't use any calls.

and for you too, the MCU will run into a field of 0xFF after the first instruction, until it reaches 100h.
you guys are very lucky that 0xFF is actually a one byte instruction, otherwise your codes would have never worked.

and by the way, if you had actually managed to clear P1 your code would have never worked.

Cheers, Roger



List of 3 messages in thread
TopicAuthorDate
again_simple program for testing 8051            01/01/70 00:00      
RE: again_simple program for testing 8051            01/01/70 00:00      
RE: again_simple program for testing 8051            01/01/70 00:00      

Back to Subject List