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 & RS485 - Do I need a line driver?

Status
Not open for further replies.

joeman112

Junior Member level 2
Joined
Jun 11, 2011
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,459
RS232 & RS485 - Do I need a line driver?

Hi,

I need a hi speed data bus (up to 1Mbs), sending data from a master PC to 16 slave devices (PICs) simultaneously.
I have seen schematics that have the Rx wired directly into the PIC. I have also seen MAX232 chips (& 485 equivalent) in between the connector and the PIC.
(Assuming that the PIC has UART)
Which way is correct?

Thanks,

Joe

- - - Updated - - -

Also, the same with USB, Do I need a USB chip or will it just wire straight in, like in this link:
http://pwc.theclarkwebsite.com/PIC18F4550usb.php
 

You can't hook a PIC directly to RS-485-you definitely need a driver/receiver chip.
 

The PIC can provide the data but it's pins have very limited drive capability. If the master and slaves are all in close proximity, maybe up to 50cm, it will work but for longer distances or if a connecting cable is being used, a proper driver will be needed. RS232 will struggle at 1Mb/s but RS422 or RS485 should be able to manage. Note that for RS485 you will also have to provide a direction control signal as transmission and reception use the same wires.

Brian.
 

The PIC can provide the data but it's pins have very limited drive capability. If the master and slaves are all in close proximity, maybe up to 50cm, it will work but for longer distances or if a connecting cable is being used, a proper driver will be needed. RS232 will struggle at 1Mb/s but RS422 or RS485 should be able to manage. Note that for RS485 you will also have to provide a direction control signal as transmission and reception use the same wires.

Brian.

Thanks Brian, This is very useful information. The Slaves will be 5m apart from each other. I think I will go with RS485.

Would a Differential line driver like this work : https://uk.rs-online.com/web/p/products/5171624/
Its an SN75 176AD. Spec says it will work upto 10Mbs.
Would this just wire straight from the input port to the PIC chip?
 

That should work fine. Things to watch out for are:
1. you need to terminate both ends with a resistor across the two lines. It's value should be equal to the impedance of the connecting cable. I use CAT-5 and 120R resistors.
2. Because one line is high when the other is low, current always flows through the terminators so current consumption will be fairly high.
3. Always use a good quality cable. CAT-5 networking cable is good but ensure you use one of the twisted pairs. It's important the wires are the same length and follow the same route to ensure minimal radiation or pick-up from outside and that signals arrive simultaneusly. Using a twisted pair should satisfy this requirement.

For your application, if you can run a different twisted pair for transmit and receive, it might be worthwile using RS422 instead. electrically it is almost the same as RS485 but it removes the requirement to switch directions on one pair of wires by using two instead. Yes, just conect data in at one end and take it out at the other, it's a simple as that.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top