To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1800
1799  |  1801
Subject: 
Re: direct manipulation of bits in RCX registers using NQC
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 13 Sep 2005 13:57:21 GMT
Viewed: 
5863 times
  
On Tue, September 13, 2005 1:28 am, Matt Jones wrote:
In lugnet.robotics.rcx.nqc, Brian Davis wrote:
In lugnet.robotics.rcx.nqc, Matt Jones wrote:
   Perhaps - but the standard firmware implements a "virtual machine", and so
you don't generally have access to physical registers. But...

I'm not sure if I get this, because of C code examples I've seen, which I'll
discuss again below.

Matt,

There are a few ways you can program your RCX.  The main choice is if you use the
standard firmware, or not.  The firmware is pretty much like Windows Operating
System.  If you use NQC & the standard firmware, you don't need to worry about many
of the low level things, like setting bits to port 6.  You just set the port to
"passive".

Another option is to use BrickOS, which is a "C" based language, and is more like
writing your own operating system.  With this, you do have access to the hardware at
the bit level.  That may be the C code you're looking at.

   You can configure the input port that the light sensor is connected to as a
"passive" sensor (so it's unpowered) but read it out as a raw value (or even a
percent, just like a "real" light sensor):


I've tried this already, and as you say, it works, but the sensitivity goes waay
down.

Unfortunately, this is pretty much your only option.  There is no way to power the
sensor, but switch the light off.  That's all part of the sensor, and the sensor
does not have that ability.

Steve



Message has 1 Reply:
  Re: direct manipulation of bits in RCX registers using NQC
 
(...) I agree with Steve that the code samples you posted are probably BrickOS. Now to acheive what you want, it might be a waste of power, but you could always blank off the light itself with a peice of black card or thin black packing plastic. If (...) (19 years ago, 13-Sep-05, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: direct manipulation of bits in RCX registers using NQC
 
(...) Hi Brian, Thanks for your response. (...) I'm not sure if I get this, because of C code examples I've seen, which I'll discuss again below. (...) I've tried this already, and as you say, it works, but the sensitivity goes waay down. For a (...) (19 years ago, 13-Sep-05, to lugnet.robotics.rcx.nqc)

13 Messages in This Thread:


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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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