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.

Two PICs sharing same UART

Status
Not open for further replies.

varunme

Advanced Member level 3
Joined
Aug 10, 2011
Messages
741
Helped
17
Reputation
36
Reaction score
17
Trophy points
1,318
Activity points
5,764
can we use one UART (RS232) of PC to input from two uCs ?
 

not with RS232, but by using RS485, RS485 standard can be easily implemented via the computer's serial port, for this a RS485 transciever like the SN75176 is needed.

Another option is to use multiple serial ports of the PC, connect one mcu to one port and the other mcu to the second serial port of the PC
 

Actually , i am using Bluetooth com port, the uC is connected to the serial bluetooth
i wonder, if i can connect two uCs through it
 

can we use one UART (RS232) of PC to input from two uCs ?

Are you referring to the PC receiving data simultaneously from two microcontrollers through a single RS-232 port?

If so, a better solution would be to implement a serial communications channel between the two microcontrollers with one microcontroller transmitting the data from both devices to the PC via a RS-232 Serial Port.

Depending on the microcontrollers there are several options for implementing the communications channel between the two devices, leaving the UART for the RS-232 to the PC.

BigDog

---------- Post added at 06:20 ---------- Previous post was at 06:15 ----------

Actually , i am using Bluetooth com port, the uC is connected to the serial bluetooth
i wonder, if i can connect two uCs through it


What you are referring to is an ad-hoc Bluetooth network, like a picoNET for example.

Implementing such an ad-hoc network depends largely on the Bluetooth devices embedded stack and the features it offers, like ad-hoc network support.

Do you have any particular Bluetooth modules in mind?

BigDog
 

Do you have any particular Bluetooth modules in mind?
BigDog
yes, bluelink

**broken link removed**

---------- Post added at 22:34 ---------- Previous post was at 22:31 ----------

we cant just combine the two uC's UART to the bluetooth module or the PC , isnt it ?
 

we cant just combine the two uC's UART to the bluetooth module or the PC , isnt it ?
No, you can't just combine the TxD lines. It's however simple to disable the TxD line of one uC or use an external multiplexer. But you need a method to control which processor actually accesses the Bluetooth channel at a time. The same problem arises with RS485, by the way.

The answer depends on the communication scheme in your network. If the PC acts as a master, it can address both uCs individually. The uCs have to take care, that only the right one enables the TX pin and sends an answer. In a multi-master network, you'll need to implement a kind of arbitration protocol. You can also place handshake lines between both uCs and make them negotiate the network access.
 

we cant just combine the two uC's UART to the bluetooth module or the PC , isnt it ?

No, As FvM has already elaborated on the subject, you can't just twist the two TXs lines together.

The Bluetooth module to which you are referring appears to be rather "stripped down" as far as the Bluetooth features it offers:

BlueLINK is a compact Bluetooth Module ( 5V Serial TTL) from rhydoLABZ. The module is built with Voltage regulator and 3V3 to 5V level converter required to interface with 5V Micros. It is only having 5pins (Standard 2.54mm bergstrip) VCC,GND,TX,RX and RESET. The module is factory configured in Transparent Mode. So there is no command required for normal operation.

The BlueLINK is a Drop-in replacement for wired serial connections, transparent usage. You can use it simply for serial port replacement to establish connection between MCU and GPS, PC to your embedded project / Robot etc. Any serial stream from 9600 to 115200 bps can be passed seamlessly from your PC/PDA/MOBILE to your target board!

As stated, it is essentially "a Drop-in replacement for wired serial connections," therefore it is highly doubtful the device can be used to form an ad-hoc network without writing an external stack or network arbitration protocols.

Why Bluetooth?

Have you considered utilizing ZigBee XBee Series 2 modules which support a mesh multipoint network of far more than two devices, connect readily to a microcontrollers UART and can be easily attached to a PC using a MAXIM RS-232 Transceiver or FTDI USB to Serial Bridge device like the FT232R?

**broken link removed**

BigDog
 

if I don't have to use the serial from the two micros, need only at different time
means,
like for one micro data transfer, which needs only in a week or so,
Through other micro, i have to send commands and receive some inputs from the sensor( that too does not need frequently need once or twice a day) ,
is that achievable with some modification ?
 

"can we use one UART (RS232) of PC to input from two uCs ?"

Potentially; if both devices do not transmit at the same time to the PC*!


*This will require, of course, that a logical-OR circuit be used to sort of 'combine' the two TxD lines from the uC's to the PC RxD line.

There is a standard created by company named Icom who invented the "CI-V" interface which uses open collector (with pull-up resistor) 'bus' at TTL level level (and the signal "polarity" seen before the inverting RS-232 line drivers) to "combine" several slave devices (radios) to a single master although the slave devices can also originate data without being queued by the master ...

Webpage explaining more on the CI-V standard:

ICOM CI-V Hardware Page


Jim
 
  • Like
Reactions: varunme

    varunme

    Points: 2
    Helpful Answer Positive Rating
PIC processors can tri-state the UART TX pin, even with the serial receiver staying active. Thus the most simple solution is to just parallel connect both TX pins.
 
  • Like
Reactions: varunme

    varunme

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top