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.

Multiple UART interfacing

engr_joni_ee

Advanced Member level 3
Advanced Member level 3
Joined
Nov 3, 2018
Messages
836
Helped
2
Reputation
4
Reaction score
7
Trophy points
18
Visit site
Activity points
6,991
We have somewhat around 50 electronic boards. Each electronic board has a Microcontroller with UART interface. We need to develop a Python based software application to communicate with all the electronic boards. Any suggestion which additional hw I would need between the electronic boards and the PC. I normally use MCP2221 by Microchip as USB-UART bridge for one Microcontroller. I am not sure if there are multiple electronic boards with UART interface then how this can be done.
 
Hi,

an interface topology where multiple devices are connected is called "bus".
Now that you have a UART --> do a search for "UART bus" or "serial bus" or similar.

If you are looking for hardware --> add the keyword "hardware" --> example: search for "serial bus hardware"
If you are looking for an according protocol --> do the same as above
and so on ..
That´s how we do "search" for decades now.

Data communication is nothing new... nor is it that over 50 participants communicate via a bus. So everything is already well documented. Just use the information available. Many examples and possible solutions.
If you found nothing --> you simply didn´t do a search.
If you did do a search --> you simply did not tell us what you found, what is suitable for you and what is not suitable.

For sure you may find many possible solutions... and it´s only YOU who can decide if that´s suitable for you or not. Since only you know:
* the distance between then
* daisy chained or parallel connected devices
* single master or multiple master
* distances between the devices
* wiring type between the devices
* unidirectional or bidirectional communication
* half duplex or full duplex communication
* communication speed (bit rate)
* communcation speed (update rate per device)
* what and why data being trasferred
* and many more

A forum is meant to ask for "detailed" problems/solutions/questions. But from your post I see only a general problem/question that has been solved decades ago and used many million times (I would not be surprised if billion times) since then.
Even wikipedia has a huge article about "bus".

Klaus
 
Dont know if this would help, but this is 12 UARTS on one chip, Rx only. Other configurations
could be Tx only, or full duplex.....but less / chip.
I also do not know w/o testing what max data rate if all operating simultaneously, that would have
to be looked into.

It did route. Note whats on chip, bottom pic, multiple copies in many cases, although with the 12 UARTS how much
digital fabric left that could be used would be trial and error.

1735817039995.png


Here is overall whats onchip :

1735817812009.png



Regards. Dana
 
Easiest if it is feasible is to use two USB UARTs and an RS485 interface, each should be able to handle 32 end points in parallel. You can transmit to all at once but only receive from one at a time. If you need full duplex there is no alternative but 50 independent UARTs.

Brian.
 
Easiest if it is feasible is to use two USB UARTs and an RS485 interface, each should be able to handle 32 end points in parallel. You can transmit to all at once but only receive from one at a time. If you need full duplex there is no alternative but 50 independent UARTs.

Brian.
I was also thinking of this kind of solution. Thanks for your comment. I am not sure I fully understand this but can you please explain bit more. Thanks in advance.
 
Appropriate solution depends on uC board hardware. What's the available serial interfae, e.g. TTL-UART, RS-232, RS-485. Can the devices be sequentially polled or do they send unsolicited messages?
 
Yes, all the electronic boards having Microcontroller on them can be polled sequentially and communicate to the application software one at a time. The cable between them is not more them 1 meter.
 
So you have a RS232 buss all 50 are tied to, and they only respond to a protocol
that sends out an address packet ? Eg. RS485 like ?

What is data rate of the communications ?

Regards, Dana.
 
Already described earlier that each electronic board has a Microcontroller on it and has a UART module in it. The question is how we can multiplex digitally if there are 50 UART interfaces. The baud rate can be 9600 on each interface. The electronic boards need to monitored by the Python based application software one at a time sequentially.
 
The issue here is that only one device can talk to the host at a time, a single UART connection can SEND to many recipients but you need a mechanism to ensure only one can reply at a time. Furthermore, the devices NOT replying must disconnect themselves from the bus or a collision of data from several UARTs will result. Even when a normal serial stream is not carrying data, it still drives the bus, you have to ensure it completely disconnect so it neither sources or sinks current from other devices. If you look at data sheets for devices like the MAX481 series you will see they have enable/disable pins that isolate the drivers from the bus so it can be shared by as many as 128 devices. This range of drivers is manufactured by many companies and they are not expensive. You can use a single pair of wires to carry data both ways (RS485 style) or use one pair for sending and another for receiving (RS422 style), the data they carry is differential and balanced meaning you can carry it over longer distances if necessary, Km distances are possible!

What you have to do is invent or use an existing protocol to package the data so it only goes to the intended recipient. All possible recipients monitor the bus all the time but keep their transmitters disabled, when a recipient sees it has been addressed, it turns its drivers on, sends its reply then disables its drivers again. It is up to you how to build the data from the host so it carries a distinguishable address and data field, for example you might send a break or a special character to 'frame' the address then a single address byte followed by the data you want to send and finally something to end the packet if it doesn't have fixed length. If all is working, you can then receive data to your UART knowing it came from the device you addressed.

Brian.
 
Already described earlier that each electronic board has a Microcontroller on it and has a UART module in it
Several details not yet mentioned.

Are you still planning the boards with the option to implement a specific interface or are these ready made boards and you have to take the existin ginterface as is?
In latter case, what is the interface physic? Does it involve an enable line for half-duplex drivers, e.g. RS-485?

Logic level UART or RS-232 can be turned into a multi-drop interface by adding a series diode and a pull-up respectively pull-down resistor, works at least for short distance and lower speed, e.g. 1200 to 9600 Baud.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top