Dynamic c lan to rs232 conversion

Thread Starter

natann999

Joined Dec 11, 2012
11
Hi
I need A program in dynamic c to program a rabbit to receive a byte by lan (tcp/ip) and send the same byte by rs232 threw the rabbits port.
It should do it in both ways lan to rs232 and rs232 to lan.
Please help me i need this program very much and i know nothing about dynamic c
Thank you very much
 

Papabravo

Joined Feb 24, 2006
21,159
I did not realize that rabbits now have evolved to the point that they have bio-electronic interfaces. That's gotta be some cool stuff!!
 

panic mode

Joined Oct 10, 2011
2,715
There are code samples for both TCP/IP and RS232, play with them and combine them. The fastest way is to just add RS232 to TCP/IP project.

// specify few common baud rates (serial port using 8-N-1) //
const long BAUDRATE[] = { 4800, 9600, 19200, 38400, 57600 };

// make sure to check documentation for any signal
// that need to be turned on to enable the RS232 port,
// in case or RCM3700, PE5 must be set low
// set low to enable rs232 device /
BitWrPortI(PEDR, &PEDRShadow, 0, 5);

// choose port, usually port C and D are easily accessible
// port open functions are serCopen, serDopen for example
// open serial port 'D' with selected baud rate
serDopen(BAUDRATE[my_baud_rate]);
 

Thread Starter

natann999

Joined Dec 11, 2012
11
hi
i did what you offered and it worked so thanks but there still is a little problem
the rabbit sends the data only once after i open the socket do i need to flush a buffer or something?
i hope you can help and thanks anyway
 
Top