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.

[PIC] Pic to pic uart long distance communication

Status
Not open for further replies.

burrow

Full Member level 2
Joined
Dec 15, 2014
Messages
147
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Activity points
1,148
I have already asked this question in reply section of one of my other questions.

Actually iam trying to have a communication between 2 pic Mcu's.. they are going to be around 12m apart.

i had planned to use max232( as mentioned in my previous posts) but i ended up with an unusual problem where in max232 starts latching up.
so i just tried connecting them with 12m wire without max232 and it seems to work.
Is it advised to continue like this ?

will i start facing problems in future ?

the cable iam using is a ribbon cable.

the baudrate iam using is 2400.
 

Data rates and the maximum distances recommended in RS-232 is

2400bps--60mtr
4800bps--30mtr
9600bps--15mtr
19200bps--7.6mtr
38400bps--3.7mtr
56000bps--2.6mtr
 

Data rates and the maximum distances recommended in RS-232 is

2400bps--60mtr
4800bps--30mtr
9600bps--15mtr
19200bps--7.6mtr
38400bps--3.7mtr
56000bps--2.6mtr


Hai dude..
iam not using max232 here.. iam talking about directly connecting PIC to PIC
 

do you have pull up on Tx pin ?
you can reduce the value as low as 470 ohms
and pull down on Rx pin ?
value about 2,2K
to transmit signal with low impedance..and reduce problem due to noisy environement..

You can also add CMOS trigger defore RX input.. like 74LS14 (TTL) or CMOS CD4093-B or MC74VHC1GT14 or ...
 

If you can't get RS232 to work, look into RS485. You can still use the RS232 protocol from the uC but you send the TX and get the RX from a RS485 converter rather than a RS232 part. The part count will end up being about the same as the RS485 chip do not need all the caps for internal power supply generation but they do end up need a few resistors for line termination. You would use twisted pair wire for the link between modules.
 

Answering the original question - Personally I wouldn't use unbalanced TTL levels over more than maybe 1m. You can use various level detectors and impedance matching components to optimise the distance but there would never be a guarantee of reliable operation, "your mileage may vary" comes to mind.

I certainly wouldn't use RS485 to increase the distance as that would require significant software and hardware redesign and I'm guessing you just want a simple link. RS232 will work fine. If you want long distances at high speed without using RS232 and it's associated voltage generators, I suggest RS422 which runs at 5V but uses differential signalling. Over cheap CAT-5 network cable you can run up to four serial links simultaneously over distances of 1Km or more. I regularly run four data streams over 100m+ distances over CAT-5 at 38,400 Bauds and 57,600 Bauds even in hostile noisy environments.

Brian.
 

No offense intended betwixt but you didn't read my entire post. You can still use the RS232 protocol from the uC but you send the TX and get the RX from a RS485 converter rather than a RS232 part. A "RS485" driver is very similar to a RS422 driver. Both send data over longer distances using differential signalling over twisted pair. They are both physical layers, not communication protocols so you can send (for the most part) anything you want across either one. It could be as simple as detecting a open or closed switch to a more complex RS485 multi-drop communications protocol.
 

Hello,

What about RS232 current loop..?
I used it ,in the past, to link PLC Master an slave , in industrial environment..
and lenght as long as 80 meter..2400bauds
current loop was 20mA , source voltage 24V
maybe for 11 meters 5V or 12V is enough.
 

My apologies Spudboy488, when dealing with 'RS485 converters' it usually refers to units providing protocol and physical layer. I agree the physical layer is virtually identical although the majority of RS485 interfaces have direction control pins which prevents them being used without additional flow control software. RS422 devices are generally uni-directional or have one transmitter and one receiver in one IC with only a transmit enable pins to worry about. In a simple point to point connection the transmitters can be left permanently enabled. Both will work as single to differential drivers/receivers.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top