Go to Post Winning the robot part of the competition is not about learning or doing unneccesary work. It works just like "winning" in industry. - Max Lobovsky [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 04-05-2008, 17:36
knine143 knine143 is offline
Registered User
FRC #1047
 
Join Date: Feb 2008
Location: Irvine
Posts: 15
knine143 is on a distinguished road
Open COM Serial Port

Hey all,

I have a Garmin Etrex H which streams serial data in rs232 format. It is simply ASCII characters. A terminal program on my computer receives them and displays them on my screen just fine. Also, my RC is able to send and receive data to and from my terminal program. Both the RC and the Garmin are set to 9600 baud, no parity, and one stop bit.

However, when I attach the Garmin directly into the RC, the RC does not receive any data. I think this is because the RC is waiting for something to start communication with it, and the Garmin is also waiting. How can I open port 1 on the RC and start communication with the Garmin? I'm using Kevin Watson's serial code.

Thanks alot!
  #2   Spotlight this post!  
Unread 04-05-2008, 17:46
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,392
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Open COM Serial Port

You need to do a level shift of RS232 voltages to TTL voltages. Are you sure you have Transmit on the GPS going to the Receive Pin?

When I hook the GPS to the Vex controller, I use the orange level shifter and a null modem to get the signals to swap.
  #3   Spotlight this post!  
Unread 04-05-2008, 18:06
knine143 knine143 is offline
Registered User
FRC #1047
 
Join Date: Feb 2008
Location: Irvine
Posts: 15
knine143 is on a distinguished road
Re: Open COM Serial Port

I'm plugging it in to the program port, which I believe is already rs232. It shouldn't need a level shifter.
  #4   Spotlight this post!  
Unread 04-05-2008, 18:18
knine143 knine143 is offline
Registered User
FRC #1047
 
Join Date: Feb 2008
Location: Irvine
Posts: 15
knine143 is on a distinguished road
Re: Open COM Serial Port

I set the baud rate of port 1 (the program port ) to 9600 using Kevin's code. And since it can talk to the terminal program on my computer at baud 9600, i know its working at that baud.
  #5   Spotlight this post!  
Unread 04-05-2008, 18:59
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: Open COM Serial Port

Sounds like you might need a null modem
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
  #6   Spotlight this post!  
Unread 04-05-2008, 19:06
knine143 knine143 is offline
Registered User
FRC #1047
 
Join Date: Feb 2008
Location: Irvine
Posts: 15
knine143 is on a distinguished road
Re: Open COM Serial Port

Ya some of the things on that Wikipedia sound like it would fix the problem.

Why though would swapping the Tx and Rx lines make the Garmin send data to the RC all of a sudden?

Thanks
  #7   Spotlight this post!  
Unread 04-05-2008, 19:51
knine143 knine143 is offline
Registered User
FRC #1047
 
Join Date: Feb 2008
Location: Irvine
Posts: 15
knine143 is on a distinguished road
Re: Open COM Serial Port

The null modem worked! Thank a lot!
  #8   Spotlight this post!  
Unread 04-05-2008, 20:22
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Open COM Serial Port

Quote:
Originally Posted by knine143 View Post
Ya some of the things on that Wikipedia sound like it would fix the problem.

Why though would swapping the Tx and Rx lines make the Garmin send data to the RC all of a sudden?

Thanks
The wiring was such that Tx was connected to Tx, and Rx to Rx. The adapter simply swapped it such that Tx->Rx, and Rx<-Tx. Voila!

Lovely little things to have around, especially when you make your own cable harnesses.
  #9   Spotlight this post!  
Unread 04-05-2008, 23:32
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,320
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme
Re: Open COM Serial Port

Quote:
Originally Posted by EricVanWyk View Post
The wiring was such that Tx was connected to Tx, and Rx to Rx. The adapter simply swapped it such that Tx->Rx, and Rx<-Tx. Voila!

Lovely little things to have around, especially when you make your own cable harnesses.
Thus, if I'm not mistaken, the magic behind the Red Tether Cable (simply a null modem cable).
  #10   Spotlight this post!  
Unread 05-05-2008, 07:45
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,964
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: Open COM Serial Port

Quote:
Originally Posted by whytheheckme View Post
Thus, if I'm not mistaken, the magic behind the Red Tether Cable (simply a null modem cable).
Bingo
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
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
No Serial Port G1279 Programming 5 10-01-2008 15:15
Which Serial Port? crossedheart Programming 4 08-02-2006 11:35
Serial port question ducttapehaxor Programming 7 30-09-2005 17:55
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44
No Serial Port Jeff Waegelin Programming 15 09-01-2003 22:29


All times are GMT -5. The time now is 00:57.

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