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:
Message is in Reply To:
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
|
|
|
|