To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 219
218  |  220
Subject: 
Re: Lego Network Protocol questions
Newsgroups: 
lugnet.robotics.rcx.legos, lugnet.robotics
Date: 
Sun, 6 Jun 1999 22:53:09 GMT
Viewed: 
2305 times
  
Kekoa Proudfoot <kekoa@pixel.Stanford.EDU> wrote:
I forgot to mention that one possible deficiency is the complements.  They
can be eliminated, for the most part, with careful counting of zeros.  I
haven't done any testing regarding this, so I don't know how many zeros in
a row will break reception, but I suspect that it's possible to make things
work by counting zeros and injecting an occasional FF into the stream if
the ratio of zeros to ones gets too high.

The only problem with doing this is that it complicates the choice of the
header.

So of course I was curious about getting rid of the complements.
Apparently, they are not necessary, or so my testing so far seems to
indicate.  Under the several lighting conditions I tried, and for distances
of up to 27' (the farthest I could conveniently test), repeatedly sending
long streams of only 00s or only ffs did not affect reception noticably
compared to sending streams of alternating 00s and ffs.  Therefore, I
conclude (for now at least) that the complements are not necessary and can
be eliminated without having to do anything to balance the number of zeros
and ones.

I had previously thought that sending long strings of zeros would affect
the detection of zeros and ones.  Since a zero is encoded as a pulse of IR
and a one is encoded as a pulse of nothing, the detection of a zero or a
one depends on seeing the difference between a pulse of IR (a zero) and the
ambient IR light level (a one).  I had thought that sending long strings of
zeros would raise the ambient light level, making zeros look a lot like
ones and causing the detection circuitry to fail.  But this was not the
case.

My thoughts to this point had neglected the fact that the IR pulse is
modulated with a 38.5 kHz square wave.  I now think that this is what
allows zeros to be detected no matter what data is sent.  Even when sending
a constant stream of zeros, the average incoming light level is at worst
halfway between a zero and a one, because of the modulation.  Zeros can
still be detected because the instantaneous signal stength during the
transmission of a zero always exceeds the average light level at some
point.

As a partial test of this, I tried modulating messages sent by the RCX
using 77 kHz and 167 kHz square waves, rather than the normal 38.5 kHz, and
the IR tower was able to receive these fine, indicating that there is
seemingly nothing special about 38.5 kHz except that it is considerably
faster than 2400 Hz, the bit transmission rate.

This might also shed some light on why 4800 baud does not work reliably.
In order to generate a meaningful serial signal from the modulated IR
transmission, the detection circuitry must fill in the tiny gaps between
the each of the short IR pulses that make up a zero.  This circuitry
switches from outputting a zero to outputting a one only so fast, and at
4800 baud, this often is not fast enough to produce a reliable signal 4800
baud serial signal for the H8 to interpret.  At 9600 baud, it is even even
worse - apparently, everything looks like a zero, so nothing is ever
received.

Anyways, it is possible that I have not tested enough lighting conditions
or distances to make sure that the complements do not make a difference.
It is also possible that the complements are used for error detection
rather than zero/one detection.

Given this new information, and assuming that eliminating the complements is
turns out to be fairly robust under other lighting conditions, I would
scrap the low-level format I mentioned yesterday for another one - no
suggestions yet, though.

-Kekoa



Message has 1 Reply:
  RE: Lego Network Protocol questions
 
(...) I'll back you up on this. My pbFORTH sends a simple character stream and it seems to work fine. No complements are necessary. I sure would like to be able to keep the RCX tower alive, though. I wonder if it's the character going through that (...) (25 years ago, 7-Jun-99, to lugnet.robotics.rcx.legos, lugnet.robotics)

Message is in Reply To:
  Re: Lego Network Protocol questions
 
(...) I forgot to mention that one possible deficiency is the complements. They can be eliminated, for the most part, with careful counting of zeros. I haven't done any testing regarding this, so I don't know how many zeros in a row will break (...) (25 years ago, 6-Jun-99, to lugnet.robotics.rcx.legos, lugnet.robotics)

15 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