To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2563
2562  |  2564
Subject: 
Re: IR Port as Proximity detector.
Newsgroups: 
lugnet.robotics
Date: 
Fri, 8 Jan 1999 17:51:11 GMT
Reply-To: 
nospam-dcchen@pacbell.netANTISPAM-nospam
Viewed: 
1416 times
  
Yeah, checked on Lego Mindstorms Internal Page.

According to the info quoted below, the single byte message is wrapped
in a simple protocol "wrapper".  Much of the data is actually the
wrapper, 8:1 I think.

The 0's actually represent the light pulse, 1's are no pulse.  The
scheme uses byte complement values (XOR OhFF) to tramsmitt equal 0's and
1's to compensate for "constant signal bias".  Seems to me the acual
value transmitted is relatively a minor thing.

Any signals guys out there have a take on this?

Dave

From http://www.crynwr.com/lego-robotics/
"The IR protocol associated with sending a "message" to the RCX is
pretty simple.
Bit encoding is 2400 baud, NRZ, 1 start, 8 data, odd parity, 1 stop bit.
A '0' is
coded as a 417us pulse of 38kHz IR, a '1' bit is 417us of nothing.

At the packet level, all packets look like this:

0x55 0xff 0x00 D1 ~D1 D2 ~D2 ... Dn ~Dn C ~C

where D1...Dn are the message body, and C = D1 + D2 + ... Dn.

The data for sending an IR message is F7 followed by the 8 bit
"message". For
example:

55 ff 00 f7 08 12 ed 09 f6

is a packet sending the message "0x12" to the RCX.

Kekoa writes:

The scheme used to transmit data results in an equal number of zero bits
and one
bits, allowing a receiver to compensate for a constant signal bias
(caused by
ambient light) simply by subtracting the average signal value. Note that
the header
also has an equal number of ones and zeros; this warms up the receiver
before the
real data arrives.

The data portion of each message starts with an opcode. An opcode is
either a
request (PC to RCX) or a reply (RCX to PC). Requests have 0x80 clear,
replies
have 0x80 set. The reply corresponding to a given request is the
request's
complement and vice-versa. Opcodes seem to come in pairs; that is, there
are two
opcodes to specify each request, and there are two opcodes to specify
each reply.
These "dual" of a given request or reply opcode is the exclusive or of
that opcode
with 0x08.

Example:

Op 0x10 Alive Request / Op 0xef Alive Response
Op 0x18 Alive Request / Op 0xe7 Alive Response
0x10 and 0xef are complements
0x18 and 0xe7 are complements
0x10 and 0x18 differ only in 0x08 bit
0xef and 0xe7 differ only in 0x08 bit"



Message is in Reply To:
  Re: IR Port as Proximity detector.
 
(...) value of (...) I usually send SendMessage(255) because I somewhat believe that it would be the value containing most "energy" (because then all bits in the byte are ones). Maybe someone who knows the innermost secrests of the RCX can tell us (...) (26 years ago, 8-Jan-99, to lugnet.robotics)

3 Messages in This Thread:


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

Custom Search

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