To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2086
2085  |  2087
Subject: 
RE: power_off()
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 8 Oct 2001 15:44:10 GMT
Reply-To: 
<rhempel@&antispam&bmts.com>
Viewed: 
1732 times
  
Hi
I have been trying to get the power_off() function to work, but
every time I
call it it either hangs the RCX just before turning off, or turns the RCX
off and I can not turn it back on. In both cases I have to remove the
batteries and wait for the memory to die.
The code I have is something like:

shutdown()
{
cputs("end");
msleep(1000);
lcd_clear;
power_off();
}

Mike,

I ran into a similar problem  when debugging pbForth years ago. Make
sure that the stack pointer is saved somewhere in the on-chip memory
of the RCX BEFORE putting the RCX to sleep.

The sleep function puts the external RAM into a low-power state that
is not restored until a little after the RCX wakes up. If the stack
pointer is aimed at the external RAM, the memory fetches will be garbage...

Hope this helps

Cheers, Ralph

--------------------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbForth>

Buy "Extreme Mindstorms: an Advanced Guide to Lego Mindstorms"
<http://www.amazon.com/exec/obidos/ASIN/1893115844/hempeldesigngrou>
--------------------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------------------



Message is in Reply To:
  power_off()
 
Hi I have been trying to get the power_off() function to work, but every time I call it it either hangs the RCX just before turning off, or turns the RCX off and I can not turn it back on. In both cases I have to remove the batteries and wait for (...) (23 years ago, 8-Oct-01, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR