Discussion in "General help Guidance and Discussion" started by    madhuprasanna    Sep 28, 2007.
Fri Sep 28 2007, 07:40 am
#1
can anyone pls help me out .i want c code for interfacing one serial port to two microcontrollers and sending data and receiving data simultaneously.
my mail :
[email protected]
[email protected]
 tienduhieu like this.
Fri Sep 28 2007, 09:51 am
#2
Its not simple.. as you have to take care of lot of things..
like if both send data simultaneously then there will be collision and you will not get anything or wrong data at the PC.

you need to make a protocol and design an intelligent hardware.. which can check if any other controller is sending data.. if collision occurs some how.. then there should not be a retransmission of data frame. etc..

There is a SB-Bus protocol made by San Bergmans from Netherlands. You can either use it or can have reference from it. In SB-Bus you can connect 125 devices to a single RS232 Port.
Take a look at it.. at http://sbprojects.com/sbbus/sbbus.htm
 madddytienduhieu like this.
Fri Sep 28 2007, 11:32 am
#3
hi ajay,
i know it is very difficult.in our project iam asked to use RS485 and RS232 interface to connect to a single serial port.i got the connection part but iam confused with the part of coding.
can u help me out..pls

 tienduhieu like this.
Fri Sep 28 2007, 11:42 am
#4
did you see the SB-BUS protocol? you can take it as a reference to make your own protocol to communicate with multiple devices connected to a single RS232 port.
Don't go for coding right now.. just make a protocol overview and try to test it..
 madddytienduhieu like this.
Fri Sep 28 2007, 11:59 am
#5
ok i will try that way too...
thanks... :-)
 tienduhieu like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm
Robertgurse
Wed Apr 24 2024, 02:43 pm
Richardedils
Wed Apr 24 2024, 04:07 am
Malcolmaccek
Wed Apr 24 2024, 01:21 am