DPRG List  

[DPRG] HELP with 68HC11 stack problem

Subject: [DPRG] HELP with 68HC11 stack problem
From: Dean Hall dwhall256 at yahoo.com
Date: Wed Jun 20 13:29:39 CDT 2001


Here's my guess:

The ability to access external RAM depends on the
level of the MODA and MODB pins at reset.  Sounds like
the HC11 is in single-chip mode at power-up and
pressing reset (with now-stable levels on MODA and
MODB) puts it in expanded (external memory) mode.

If this is the case, you need a "microprocessor
supervisor" that creates a low-going pulse some small
time after power-up.  MAXIM specializes in these
devices and will send you samples for free.  The
simple ones are 3-pin TO-92 packages; the fancy ones
with extra features are 6-pin SOIC.  You could even
make your own with an RC delay circuit feeding into a
low-going one-shot.


> From: Clay Timmons <ctimmons at cadence.com>
> To: dprglist at dprg.org, "tcrobots at orbis.net"
> <tcrobots at orbis.net>,
> "NMI Technical Dept." <nmitech at newmicros.com>
> Subject: [DPRG] HELP with 68HC11 stack problem
> HELP!   I'm having a problem with a 68HC11
> microcontroller board.
> I consider myself a near expert on the 68HC11 but
> this one has me baffled.
> I'm not even sure of the most basic question.  Is
> this a software or hardware
> problem.   I've spent about 3 hours tracking down
> this one and still haven't
> found it.  For reference I'm using a New Micros
> NMIY-0020 board and
> Imagecraft ICC11 C-compiler.
> My code runs fine when the very first instruction is
>  LDS #0x00FF
> which loads the stack pointer to the 256 byte RAM
> internal to the HC11 itself.
> When I cange the code to LDS #0x4000 to initalize
> the stack pointer
> to external RAM  I have a problem.   On powerup
> nothing happens
> but then if I hit the reset button it works fine.  
> I can't figure out why
> it would hang on powerup but work after reset? 
> Powerup should be
> the same as reset right...  I also really wonder
> what its doing when
> it appears to hang.
> Anyone ever set the stack to external memory?    Any
> advantage/disadvantage?
> I think everything should work the same with the
> stack in external or internal
> memory.  My code has grown and grown and now I'm
> needing more stack space.
> The external memory is a ST Microelectronics NVSRAM.
>   I started to suspect
> that it takes some time after powerup before you can
> access it.  I added some
> delay in the code to compensate but it had no
> effect.  So much for that idea.
> Any ideas, even crazy ones, are appreciated,
> -Clay Timmons-

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

More information about the DPRG mailing list