Home/Support/Support Forum/RCM6700 'TCP_TO_SERIAL' 5-WIRE Example?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

RCM6700 'TCP_TO_SERIAL' 5-WIRE Example?

0 votes
Hello. I am using a RCM6700 development kit to test the development of a Serial to Ethernet server for use in an existing hardware application. I have been successfully running the example found in 'C:\DCRABBIT_10.72\Samples\tcpip\rabbitweb\TCP_TO_SERIAL.C' to communicate between an Ethernet port and a Serial RS232 port. I would like to enable the 5-Wire handshaking on the development board to also test that feature but I am not sure what all is needed to accomplish this. I understand I need to install the jumpers on 'JP7' of the development kit but is there a different example program I need to run to test the 5-Wire interface operation?
asked May 26, 2015 in Rabbit by jbreedlo New to the Community (1 point)
Ok, let me preface the following with this statement, "I am horrible when it comes to programming!". Anyway, I have found in the RS232.lib that you enable hardware flow control on serial port D with the "void serDflowcontrolOn(void); " command. I put this command line into the TCP_TO_SERIAL.C file and jumpered JP7, but I can't seem to get flow control working correctly. I am using a windows 7 PC with Tera Term to test the serial to ethernet communications. When I turn on flow control in Tera Term, the development kit will no longer pass data until I disable it. Can anyone explain what I am doing incorrectly?

Thanks.
Maybe I am not entering the command correctly? The RS232.lib files says I should get some warning messages during compile but I don't seem to get any like these:

/*** BeginHeader serDflowcontrolOn */
void serDflowcontrolOn(void);
/*** EndHeader */

#ifdef SER_NO_FLOWCONTROL
    #fatal "Can't use serDflowcontrolOn if SER_NO_FLOWCONTROL has been defined."
#endif

//defaults for flow control RTS/CTS
#ifndef SERD_RTS_PORT
    #define SERD_RTS_PORT PCDR
    #warnt "SERD_RTS_PORT not defined: defaulting to PCDR"
#endif

#ifndef SERD_RTS_SHADOW
    #define SERD_RTS_SHADOW PCDRShadow
    #warnt "SERD_RTS_SHADOW not defined: defaulting to PCDRShadow"
#endif

#ifndef SERD_RTS_BIT
    #define SERD_RTS_BIT 2
    #warnt "SERD_RTS_BIT not defined: defaulting to 2"
#endif

#ifndef SERD_CTS_PORT
    #define SERD_CTS_PORT PCDR
    #warnt "SERD_CTS_PORT not defined: defaulting to PCDR"
#endif

#ifndef SERD_CTS_BIT
    #define SERD_CTS_BIT 3
    #warnt "SERD_CTS_BIT not defined: defaulting to 3"
#endif

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
Try add follow code, to your program:
Code:
// Defaults for flow control RTS/CTS, #define SERD_RTS_PORT PCDR #define SERD_RTS_SHADOW PCDRShadow #define SERD_RTS_BIT 2 #define SERD_CTS_PORT PCDR #define SERD_CTS_BIT 3 void main() { serDopen("your baudrate"); serDflowcontrolOn(); // turn on flowcontrol // your program in here }
answered Jun 1, 2015 by edha Community Contributor (71 points)
selected Jun 15, 2015 by jbreedlo
Thanks for your help. I actually purchased a book on C-Programming and have started to learn a little about it just so that I can at least alter code when required (doubt I'll ever be able to actually write it from scratch...but anyway). For anyone else how may have this question and is also not a programmer, I found another way to accomplish this is to just add ' #use "RS232.lib" ' to the code and then use ' serDflowcontrolOn() ' or whatever port you want to enable flow control on. This will show the warning messages for the flow control defaults during compile and makes it a bit easier to turn on multiple ports with flow control.
...