Go to Post I design gears and gear boxes for a living. I am HAPPY to write a check and have a solution in mailed to me. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-04-2004, 19:12
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

Got it!
Thank you B&B Electronics!
Code:
FRC   LIRT
Gnd - Gnd
 Tx < Rx
 Rx > Tx
DTR < DSR
DSR > DTR
RTS < CTS
CTS > RTS
DCD X DCD
 RI X RI
Don't connect DCD or RI to anything.
The pins are as follows (DB9):
Code:
Shell Shell (optional)
    5 5
    3 2
    2 3
    4 6
    6 4
    7 8
    8 7
1 and 9 don't connect to anything.

So if anyone fries something doing this, please tell us before we fry something!
  #2   Spotlight this post!  
Unread 06-04-2004, 20:27
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Astronouth7303
So if anyone fries something doing this, please tell us before we fry something!
LOL!

You'll have to wait until tomorrow for the info. Sorry.
__________________

  #3   Spotlight this post!  
Unread 07-04-2004, 01:48
Grommit Grommit is offline
Registered User
#0115 (Monta Vista Robotics)
 
Join Date: Oct 2002
Location: Cupertino
Posts: 47
Grommit will become famous soon enoughGrommit will become famous soon enough
Send a message via AIM to Grommit
Re: Using an FRC with the RCX?

Two questions:

1) What kind of hardware would I need on the receiving end to make this work?

2) Has anyone tried to accomplish this successfully?

Thanks, I would have never thought of trying something like this!
__________________
Shrenik Shah
Engineering Director
Team 115: Monta Vista Robotics

Congratulations to Mr. Shinta for winning Woodie Flowers at Silicon Valley!
  #4   Spotlight this post!  
Unread 07-04-2004, 06:04
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Grommit
Two questions:

1) What kind of hardware would I need on the receiving end to make this work?
For the RC, you need a cable to attach to the LEGO IR tower. For the RCX, nothing. It has it's own built in IR.

Quote:
Originally Posted by Grommit
2) Has anyone tried to accomplish this successfully?
I don't know of anyone.
__________________

  #5   Spotlight this post!  
Unread 07-04-2004, 07:09
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

Here are a few links:

Packet description: (includes example of sending IR message)
http://graphics.stanford.edu/~kekoa/rcx/protocol.html
From this website, I think that sending:
55 ff 00 f7 08 M ~M C ~C
Where C is the checksum. Sends the messageM. One thing I'm confused on is the checksum. It doesn't seem to work the way I read it in his description. Even trying to figure the checksum using his example I didn't come up with the same thing he did. It may be I just don't understand it. If you kow, tell me how to compute it.

Some more stuff on the packets: (not as good)
http://graphics.stanford.edu/~kekoa/rcx/#Protocol

Do you need to know how to send that out, or do you already have that figured out?

--EDIT--
Here is a site with examples of using it in C++. http://www.generation5.org/content/2001/rob08.asp.
Reading that, it's a great site.
__________________


Last edited by Ryan M. : 07-04-2004 at 07:13.
  #6   Spotlight this post!  
Unread 07-04-2004, 11:51
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Texan
Here are a few links:

Packet description: (includes example of sending IR message)
http://graphics.stanford.edu/~kekoa/rcx/protocol.html
From this website, I think that sending:
55 ff 00 f7 08 M ~M C ~C
Where C is the checksum. Sends the messageM. One thing I'm confused on is the checksum. It doesn't seem to work the way I read it in his description. Even trying to figure the checksum using his example I didn't come up with the same thing he did. It may be I just don't understand it. If you kow, tell me how to compute it.

Some more stuff on the packets: (not as good)
http://graphics.stanford.edu/~kekoa/rcx/#Protocol

Do you need to know how to send that out, or do you already have that figured out?

--EDIT--
Here is a site with examples of using it in C++. http://www.generation5.org/content/2001/rob08.asp.
Reading that, it's a great site.
The example from LUGNET was made for MSCOMM and VB. I just took the array and wrote the functions for the controller.

A message packet is only one additional info section.
Header (3 bytes)
OpCode (2)
Message (Info, 2)
Checksum (2)

The OpCode for Message is 0xF7. It has one argument: the message value. Every data byte is followed by it's not. So you get:
Header = 55FF00
OpCode = F708
Message = M ~M
CheckSum = (F7+M) & FF

I think we're finally getting it!

The second link is extremely helpful. And I'm glad to know about the Null-modem cable thing: The LIRT is CTE, not a CSE (it is a male, like your computer), so maybe a standard cable works!
  #7   Spotlight this post!  
Unread 07-04-2004, 13:19
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

You said the prog port earlier, but how do we access that? Or, rather, can we get enough control to do what we want? You can send text, but I haven't studied the printf() access of the port. Maybe that port will work or maybe something else is necessary. Correct me if you know the way.
__________________

  #8   Spotlight this post!  
Unread 07-04-2004, 21:17
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Texan
You said the prog port earlier, but how do we access that? Or, rather, can we get enough control to do what we want? You can send text, but I haven't studied the printf() access of the port. Maybe that port will work or maybe something else is necessary. Correct me if you know the way.
Ok. The text is transmitted as bytes (I assumed ASCII, but I'm not sure). So basically, you replace the text with bytes. A string is an array of bytes terminated by a null characcter (0x00).

I looked in printf_lib.c I traced the flow of execution from printf(), and ended up at Write_Byte_To_Uart(). Which is:
Code:
/*********************************************************
* SUBROUTINE NAME: Write_Byte_To_Uart
* PURPOSE:       Writes a byte to the UART.
*     Argument       Type           IO   Description
*     --------       -----------    --   -----------
*         data       int            I    data to transmit to the UART
* RETURNS:       void
*********************************************************/

static void Write_Byte_To_Uart(int data)
{
  TXREG = data;  /* a carriage return */
  Wait4TXEmpty();
}
I simplified it to the macro:
Code:
#define SendByte(Byte) {TXREG = Byte; Wait4TXEmpty();}
(And I don't actually know how to write macros!)

You call this repeatedly to write the whole packet.

Of course, You can't recieve: the LIRT only remains active for 3 seconds after you transmit something.
Also: this whole setup is unusual, so if it doesn't work, don't worry. We just may end up buying a pair of UART DTEs and making a double box!
  #9   Spotlight this post!  
Unread 08-04-2004, 06:28
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Astronouth7303
I simplified it to the macro:
Code:
#define SendByte(Byte) {TXREG = Byte; Wait4TXEmpty();}
(And I don't actually know how to write macros!)

You call this repeatedly to write the whole packet.
That's what I figured would work, but I wasn't sure. Don't do a lot of COMM port work.

And the macro looks fine.
__________________

  #10   Spotlight this post!  
Unread 08-04-2004, 12:53
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

Neither do I. I just read the file. It's aparently easy!
  #11   Spotlight this post!  
Unread 09-04-2004, 09:55
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

2 updates:
1. Found gray cable setup.
Code:
GRAY CABLE
 Rx Tx
 Tx Rx
DTR DTR
Gnd Gnd
RTS CTS
CTS RTS
Or am I misinterpreting?
Code:
From front:
1 2 3 4 X
 X 5 6 X

1 2 4 3 X
 X 6 5 X
X's are no connection, numbers mean it's connected to the same number.
Get the idea?


2. What's the TTL output? I was thinking of the possibility of connecting through that. The prog port is used for so much else!
  #12   Spotlight this post!  
Unread 09-04-2004, 18:48
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Astronouth7303
2 updates:
1. Found gray cable setup.
Code:
GRAY CABLE
 Rx Tx
 Tx Rx
DTR DTR
Gnd Gnd
RTS CTS
CTS RTS
Or am I misinterpreting?
Code:
From front:
1 2 3 4 X
 X 5 6 X

1 2 4 3 X
 X 6 5 X
X's are no connection, numbers mean it's connected to the same number.
Get the idea?
Where'd you get the info? I'll see if I agree.

Quote:
Originally Posted by Astronouth7303
2. What's the TTL output? I was thinking of the possibility of connecting through that. The prog port is used for so much else!
I don't know. You're much better at harware stuff than me.
__________________

  #13   Spotlight this post!  
Unread 07-04-2004, 11:34
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Using an FRC with the RCX?

Quote:
Originally Posted by Grommit
Two questions:

1) What kind of hardware would I need on the receiving end to make this work?
LEGO's RCX. That's all (You may need the official firmware to get the message packets to work). At transmission, however, you need an old COM tower, not a new USB.
Quote:
Originally Posted by Grommit
2) Has anyone tried to accomplish this successfully?
I don't think so. But it hasn't been very long. The hardest part would be the cable
Quote:
Originally Posted by Grommit
Thanks, I would have never thought of trying something like this!
Neither would I until yesterday!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FRC Program State Frozen at Power-up WillyC Control System 4 14-02-2004 18:05
Request for FLL Volunteers for FLL National Invitational at the FRC Championships Natchez General Forum 3 08-04-2003 12:19
Controlling a FIRST robot with a Lego RCX Controller? archiver 2001 5 24-06-2002 04:19


All times are GMT -5. The time now is 15:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi