To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 1857
1856  |  1858
Subject: 
Re: Motor Control Register (0xf000) and Memory Space 0xFDB0-0xFD7F
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics.rcx.legos
Date: 
Sun, 1 Dec 2002 22:11:05 GMT
Reply-To: 
Dick Swan <dickswa@sbcglobal.net+spamless+>
Viewed: 
4475 times
  
This note is of interest to people who build their own RCX firmware.
It provides some additiional insight to the recent post concerning
dual use of upper memory range and the motor control register.

There's a trade-off between real time performance and using internal
on-chip RAM vs external RAM for address ranges 0xFB80 - 0xFF7F.

The H8 CPU used in the RCX has 512 bytes of internal on-chip RAM as
well as the 32K of external RAM. The internal on-chip RAM has
significantly faster access times -- onchip uses a 16-bit bus vs 8-bit
external bus and has no wait states. On-chip RAM occupies memory
addresses 0xFD80 - 0xFF7F. The H8 system control register controls
whether on-chip RAM is enabled.

The firmware I use has on-chip RAM enabled. So does the firmware that
Lego ships. I locate my stack at 0xFE00 - 0xFEFF so that it it in the
faster on-chip RAM. In my case this improves real time RCX performance
by 6-8%.

There are multiple flavors of H8 chips. One of these has 1K of on-chip
RAM at 0xFB80 - 0xFF7F. When on-chip RAM is enabled, this complete
block of 1K is blocked from external RAM use. Since the RCX has only
512 bytes of on-chip RAM, 0xFB80 - 0xFD7F is "reserved" as well and
not available for external RAM.

Another real time performance factor is the use of memory at 0xFF00 -
0xFF7F. The H8 has optimized instructions that only require 1-byte
instead of 2-byte absolute addresses for this range. I can't find my
notes on measurements of this but I recall measuring a 8-10%
performance improvement when I had linker use this space for the high
usage variables. [I use Hitachi's HEW toolchain which will
automatically do this with a single option specification].



Message is in Reply To:
  Motor Control Register (0xf000)
 
Seeing as how there's been little traffic here recently, I thought I'd post about something I found that's cleared up a little mystery (for me at least). It concerns the RCX register that is used to control the motors. This register lives at 0xf000. (...) (22 years ago, 13-Nov-02, to lugnet.robotics.rcx, lugnet.robotics.rcx.legos)

16 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