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 / 144
143  |  145
Subject: 
Re: Tasks vs. program slots
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sat, 18 Sep 1999 06:14:51 GMT
Viewed: 
4701 times
  
Hello Dave,

First, let me thank you for NQC ... you've made my RCX playing
tremendously more rewarding.

I've been wanting to use a Sharp IR receiver to demodulate the signal
from a LEGO remote control, and then a PIC to decode the rx output
for use by an external controller (not the RCX).  Would you please
give me a little more of an explanation of the remote's transmitted
signal ... comm protocol, timing, etc.  My lack of knowledge is
keeping me from making any sense out of what I see on the 'scope
coming out of the Sharp IR receiver.

Thanks,
- Nick -

Dave Baum wrote:
[snip]
> The remote control always sends the same sort of packet:
> 
> d2 xx yy
> 
> where xxyy is a sixteen bit bit-field indicating what features should be
> activated:
> 
> xxyy
> 0001 Message 1
> 0002 Message 2
> 0004 Message 3
> 0008 Motor A Forward
> 0010 Motor B Forward
> 0020 Motor C Forward
> 0040 Motor A Backward
> 0080 Motor B Backward
> 0100 Motor C Backward
> 0200 Run Program 1
> 0400 Run Program 2
> 0800 Run Program 3
> 1000 Run Program 4
> 2000 Run Program 5
> 4000 Stop Program
> 8000 Beep
> 
> These can be ORed together.  I don't know if all combinations are legal,
> but you can certainly combine the motor options together.
> 
> The remote sends multiple copies of the packet while the button is held
> down, then sends a d20000 when the button is released.
> 
> Unfortunately, I think these codes are ignored when encountered within a
> program.  I tried the one to run program 5 from within an NQC program:
> 
> asm { 0xd2, 0x20, 0x00 };
> 
> It had no effect.
> 
> Dave Baum



Message has 1 Reply:
  Re: Tasks vs. program slots
 
(...) What exactly does the Sharp IR receiver do? If it uses Sharp's ASK modulation, then you may have a problem. Ideally, what you want is something like a phototransistor to a good preamp, followed by a bandpass around 38kHz, then some sort of (...) (27 years ago, 18-Sep-99, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: Tasks vs. program slots
 
(...) The remote control always sends the same sort of packet: d2 xx yy where xxyy is a sixteen bit bit-field indicating what features should be activated: xxyy 0001 Message 1 0002 Message 2 0004 Message 3 0008 Motor A Forward 0010 Motor B Forward (...) (27 years ago, 18-Sep-99, to lugnet.robotics.rcx.nqc)

14 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
    

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