Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RS232 to RS485 converter connecting 10 MC's to one PC

Status
Not open for further replies.

sainathsamba

Newbie level 6
Joined
May 29, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
AP,INDIA
Activity points
1,342
Hai,

Iam doing a project in which i have connect 10 to 15 Micro Controllers to one PC. so i have used rs232 to rs484 converter at PC and ds75176 ant each Micro Controllers. I have a question that is that possible. and while the 1st MC send data to PC at the same time if MC2 and some other MC's are send different data to PC then the PC can take it without any data loss.

Is that possible to interact different MC's with PC..........Like Tele Phone in our home
but the difference is they are communicating with each other. but in my project they only communicate with PC. MC's send the data to PC and they get their individual data from the PC...... plzzzzzzz help me on this to complete my project. I will be very thank full to u my frnds..................
 

You have to assign unique addresses to each microcontroller, so when PC interrogates the RS-485 network only one microcontroller responds at a time, the rest are “listening” but do not respond till their address is not part of a command ..

Here is an example of such protocol:
https://www.omega.com/manuals/manualpdf/M1594.pdf

IanP
:D
 

If ur two MCs are starting communication by their own....
then their might be the problem...
If PC is ur single master then there is no problem if ur doing correct addressing..
 

You have to use your PC as a master and Units 1-15 as a slaves with uarts connected to RS-485 chips that are all connected to the same bus (semi-duplex or full-duplex), with each unit having unique address (as told by IanP and BurnOut_tesla). Master sends status requests to each slave periodically and receives the answers (master takes care that no collision occurs). The communication protocol (message format) can be something like this:

StartHeader + DestAddress + MessageType + DataField + ParityByte + EndHeader

So you can define as much different messages as you want, and you can easily expand this network just by adding new units (mcu's) with new addresses (even up to 256 without repeaters, depending on the 485 chip being used).
 

If ur MC wants to initiate data transfer then u can use the token passing method...
 

thanks dude for ur replies...... i hope they will help in my project.


But i have one doubt, if one MC is talking to PC in the middle any onter MC's interrupts the pc then what happen. do the PC interact with those other MC at the same time with out making any other MC's dum

Added after 7 minutes:

And plzzzzzz give me a favor send the MC code in "C-LANGUAGE"



Thank Q,

SAINATH.
 

thats wat i told u..
u can use token passing method...
so that MC having token will only transmit the data..
or
make it single master i.e. PC end
 

Yes i understood what you said.

please give a sample c program to use token passing method.
 

This sample code must help u...

Keep sending token packet to next MC..
when any any MC has received token then only he is allowed to send the data
keep token for some time or pass it on in round robin method....
 

YEs my frnd it helps me a lot
Thanks buddy......

Added after 39 minutes:

sorry frnd i have one more doubt can u tell me the pattern how i have send from PC
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top