Re: 89C51ED2





MooseFET wrote:

"TT_Man" <Some...@xxxxxxxxxxxx> wrote:
">> > Now why does my code always start with an initialisation procedure for
variables

and the 8051 special function registers function I wonder ?

Mine usually starts:

LJMP Startup
.........................
StartUp:
MOV SP,#MainStack
MOV P1,#0FFH
MOV P2,#0FFH
MOV P3,#0FFH

WTF is that supposed to do ?

Set the stack pointer to where you want it to be- #mainStack
Set ports 1,2 and 3 to 0xFF
How hard is that?

Sorry I was missing the obvious P1, 2, 3 etc. I don't play with stacks myself.

Graham

.



Relevant Pages

  • Re: 89C51ED2
    ... MooseFET wrote: ... Set the stack pointer to where you want it to be- #mainStack ... Set ports 1,2 and 3 to 0xFF ...
    (sci.electronics.design)
  • Re: 89C51ED2
    ... krw wrote: ... Set the stack pointer to where you want it to be- #mainStack ... Set ports 1,2 and 3 to 0xFF ...
    (sci.electronics.design)
  • Re: 89C51ED2
    ... Set the stack pointer to where you want it to be- #mainStack ... Set ports 1,2 and 3 to 0xFF ... It's dumb to leave the stack ...
    (sci.electronics.design)
  • Re: 89C51ED2
    ... Set the stack pointer to where you want it to be- #mainStack ... Set ports 1,2 and 3 to 0xFF ... It's dumb to leave the stack ...
    (sci.electronics.design)
  • Re: 89C51ED2
    ... Set the stack pointer to where you want it to be- #mainStack ... Set ports 1,2 and 3 to 0xFF ... It's dumb to leave the stack ...
    (sci.electronics.design)