Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Open COM Serial Port (http://www.chiefdelphi.com/forums/showthread.php?t=67458)

knine143 04-05-2008 17:36

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!

Foster 04-05-2008 17:46

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.

knine143 04-05-2008 18:06

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.

knine143 04-05-2008 18:18

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.

whitetiger0990 04-05-2008 18:59

Re: Open COM Serial Port
 
Sounds like you might need a null modem

knine143 04-05-2008 19:06

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

knine143 04-05-2008 19:51

Re: Open COM Serial Port
 
The null modem worked! Thank a lot!

EricVanWyk 04-05-2008 20:22

Re: Open COM Serial Port
 
Quote:

Originally Posted by knine143 (Post 745573)
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.

whytheheckme 04-05-2008 23:32

Re: Open COM Serial Port
 
Quote:

Originally Posted by EricVanWyk (Post 745601)
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).

Daniel_LaFleur 05-05-2008 07:45

Re: Open COM Serial Port
 
Quote:

Originally Posted by whytheheckme (Post 745635)
Thus, if I'm not mistaken, the magic behind the Red Tether Cable (simply a null modem cable).

Bingo ;)


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

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