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.

serial communication of multi terminals with single pc

Status
Not open for further replies.

afridii

Junior Member level 1
Junior Member level 1
Joined
May 15, 2013
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,413
i am designing a prototype of multi microcontrollers with single pc using shared medium. data collision is avoided using software and terminal's address based communication. i used a common Tx Rx and ground of these microcontrollers(terminals) and connected with PC. i have used two microcontrollers' terminals and the problem is that
when i connect a single microcontroller via db9 port the communication is fine but as i connect the other terminal with PC, communication no longer works correctly, and this is perhaps due to loading of two terminals, and i checked this loading by using a program in which i sent characters in infinite loop. the terminal sends the characters continuously but as i connect the other terminal it stops sending the characters, i also used max232 ic in each terminal, how can i resolve this issue,
kindly someone help,

regards
 

By design, RS232 is a point-to-point rather than a multidrop (bus) interface.

Some instrument manufacturers use an extended RS232 interface with a tri-statable driver, e.g. MAX3323E. It can work in a multi-drop RS232 bus, if the "slaves" provide a separate TX-enable signal.
 
you mean my topology shown in fig below is not applicable for rs232 standard,
note in the fig there is one max232 ic but i used this ic with each terminal and hence data in shared medium is in rs232 standard.
only through software at pc and ucontroller will not be enough?

regards
 

i found the problem and its solution:
since the Tx of ucontroller is at ground when no transmit occur from it, thus when the other terminal transmit its byte, the pulses just grounded by the ground voltage of the idle terminal and cannot reach to Rx of the PC,
the solution is that we should just tri-state the Tx of each terminal and when a terminal want to respond (transmit a byte to PC), it will connect its Tx with Tx bus line of the shared medium,
there should be no problem when PC broadcast a byte. i did not try it, but i am sure it will work out.
 

Your system is not working as a master-slave circuit. So when data is sent from PC all the uCs will receive the same data and when more than one uC sends data on the common Tx line then data willl clash and the original data is lost.
 

the solution is that we should just tri-state the Tx of each terminal
Yes. As already mentioned in post #2, you need a special RS232 driver that has a tristate capability. Standard drivers, e.g. MAX232 haven't it.

Your system is not working as a master-slave circuit. So when data is sent from PC all the uCs will receive the same data and when more than one uC sends data on the common Tx line then data willl clash and the original data is lost.
There are hardware and software prerequisites of a multi-drop network. Hardware requirements have been mentioned. Softwarewise, addressing of individual terminals must be implemented, creating a master-slave topology. Continuous sending of data as described in post #1 can't work.
 

actually it is a password based control access system in which only that ucontroller will respond whose address is just broadcast, while the rest will not. and the PC broadcast bytes should be received by all the ucontrollers bc only then control access to shared Tx(ucontroller perspective) line by terminals will be possible.
there is a lot of work in the ucontorller code to be done to ensure safe communication in such simple hardwared topology.

regards

- - - Updated - - -

i will let you people know whether the circuit will work or not after i check my circuit for the approach i mentioned in post #4,
 

So, Only if address matches then that particular uC will send data to PC. right? If that is the condition then there is no problem in using MAX232. Can you post the Circuit? You have one MAX232 which is connected to 5 or 6 uC boards. Voltage on the RS232 side has nothing to do with the problem. Maybe current at TTL side of MAX232 is not su fficient as it is connected to many uCs. Try putting a pullup resistor on TTL Rx and Tx lines and see.
 

You have one MAX232 which is connected to 5 or 6 uC boards
This would work. The description in post #1 is however different, one MAX232 for each terminal.

There's definitely no problem of loading the MAX232 with multiple RX pins. Tri-stating TX is a bit more complicated, but possible with most µC.
 

i have used the topology (which only two uc terminals are there) as:
both uc's Rx are shorted and connected with Tx of PC
Tx of only terminal 1 (whose address is 'A') is connected with Rx of PC,
but again when i enter 'A' in hypter terminal, i don't receive a byte from the PC, but when i disconnect the Rx of terminal 2, the communication between terminal 1 and the PC is just fine, so now what can be the problem??

Note: tri-state buffer is on TTL side.

1818516000_1372250560.png

regards
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top