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 / 2783
2782  |  2784
Subject: 
Re: Programming the RCX using Lego's RCX Software
Newsgroups: 
lugnet.robotics.rcx
Date: 
Thu, 12 Jan 2006 09:39:33 GMT
Viewed: 
6985 times
  
On Thu, 12 Jan 2006 06:22:22 GMT
"Mike Walters" <mgwalters@[stopspam]yahoo.com> wrote:

1)  Is the best timer resolution I can get using the default OS and
RCX software 0.1 seconds?

In the GUI thing, I think so. The actual firmware ticks every 0.01
seconds though, but you can't really tell where between ticks you are.

2)  If I use software counters to try to time things to a better
resolution, how repeatable would the counts be?  In other words, how
much does the OS interrupt user program flow to do things like IR
comms and stuff?  Will my counts vary dramatically?

They may, but probably not. The monitoring code is a pretty constant
drain unless the user switches port monitoring (view button on rcx),
and the IR handling shouldn't wake up unless there's something being
sent.

3)  Do the tones and music get launched as a separate task?  The
reason I ask is that it seems like the program continues on to the
next step without waiting for the tones or music to end.

Basically yes. It won't use much CPU as I believe the tone is generated
in hardware and the main processing only intervenes to change pitch or
turn it on/off.

4)  The use of wait, repeat(until), and repeat(while) with sensors is
driving me a bit crazy.  Not because I don't understand the concept
of wait, repeat(until) and repeat(while), but because it is unclear
how these instructions treat the sensor inputs in the RCX software.
In some cases, it seems like a "pressed" touch sensor just means that
the sensor is "closed".  In other cases, it seems like a "pressed"
sensor means that the sensor *gets* pressed.  In other words, it
seems like some of the instructions treat the touch sensor as edge
triggered and some as level triggered.

AFAICR it's all level triggered. The sensor ports are all polled in the
first place, and usually the only one which keeps any state beyond the
currently read word is the rotation sensor. There are however "count"
and "pulse" modes for sensors, but they would not apply to a light
sensor. You'll probably see some rather annoying latency effects
though.

6)  Is there somewhere I should go to learn answers to these
questions and others like them?  There are a lot of webpages out
there related to Mindstorms, but I didn't find any one place to
answer these kinds of questions about the RCX 2.0 Software.

Your best bet is probably to learn about NQC, as it uses the same
firmware. I guess there are people out there who know more exactly what
the RIS software does.

Kekoa Proudfoot's page contains the information that made NQC possible,
which includes a few observations you may want to read:
http://graphics.stanford.edu/~kekoa/rcx/



Message is in Reply To:
  Programming the RCX using Lego's RCX Software
 
I am relatively new to the RIS, the RCX, and the RCX software. Just like many of you, I discovered pretty quickly that the RCX software is not intuitive to someone who has done programming before. What I can visualize doing in C, I struggle to (...) (19 years ago, 12-Jan-06, to lugnet.robotics.rcx)

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