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 / 1114
1113  |  1115
Subject: 
Re: What are Opcodes for ...
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 3 May 2001 21:27:11 GMT
Viewed: 
2007 times
  
There's a good document in the Lego SDK that explains all of the
opcodes.  If you want to see which opcodes particular NQC instructions
are using, just generate a code listing with the -l option.  Then refer
to the Lego documentation for the format of the operands, etc.

Dave

In article <3AF19A45.95D2E96D@ids.kun.nl>, Stef Mientki
<s.mientki@ids.kun.nl> wrote:

hi All, (specially Dave)

I'm building a realtime graphical viewer ,like Michael Gasperi's Mr.
Sensor, but with more possibilities (see
  http://baserv.uci.kun.nl/~smientki/Lego_Knex/Lego_electronica/Mindscope.
  htm
My goal is to get an 100 Hz througput from RCX to PC.
At this moment I've reached 40 Hz, and the main bottleneck seems to be
the baudrate of 2400 Hz.
So I think I'll reach 100 Hz with 4800 Baud and some other minor
modifications.

SetSerialComm()
SetSerialPacket()
SetSerialData()
SendSerial()

and the constant values used in these opcodes.

I use the following NQC program, which I want to adept dynamically by the
program according to the selected signals:
----------------------
task aap()
{
int x;
  SetSerialComm(SERIAL_COMM_DEFAULT);
  SetSerialPacket(SERIAL_PACKET_DEFAULT);

  SetSerialData(0,0xAA);
  repeat (100)
  {
    x=SENSOR_1;
    SetSerialData(1,(x & 0x7F));
    SetSerialData(2,((x / 128) & 0x7F));
    x=SENSOR_2;
    SetSerialData(3,(x & 0x7F));
    SetSerialData(4,((x / 128) & 0x7F));
    SendSerial(0,5);
  }
}
-------------------

best regards
Stef Mientki



--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: What are Opcodes for ...
 
hi Dave, thanks, I forgot that information totally, I normally use the site of Kekoa, which is easier to access. By the way, I presume you mean option -L instead of -l ;-) (...) -- met vriendelijke groet, Stef Mientki email: s.mientki@ids.kun.nl (...) (23 years ago, 3-May-01, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  What are Opcodes for ...
 
hi All, (specially Dave) I'm building a realtime graphical viewer ,like Michael Gasperi's Mr. Sensor, but with more possibilities (see (URL) goal is to get an 100 Hz througput from RCX to PC. At this moment I've reached 40 Hz, and the main (...) (23 years ago, 3-May-01, to lugnet.robotics.rcx.nqc)

4 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