• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Usart to Usart?

Status
Not open for further replies.

Eclipsed

New Member
I have to make 2 Pics communicate in a automobile.The length is about 2 meters, could I get away with USART to USART(5V serial)?Would I have noise issues?
 

crust

Member
I have done this at lower speeds (dont remember, maybe 9600 baud) half-duplex over about 4 meters in a lab without any problem at all. I didn't even use a good cable for the prototype. You can tradeoff speed vs. distance so that your receiver wont have any problem syncing to the start/stop bits. I would guess that the auto might have more electrical noise than the lab where I assembled this system.
 

Noggin

Member
I would guess that if you used line drivers to get a solid -12 and +12 signal, used shielded cables, and limited the baud rate, then you'd be fine. What if you used a chip to change it to differential signaling? Actually, I think line drivers would be easier, just be sure to change it back to 0 and 5 if thats what your PIC can take
 

crust

Member
You could use those, but then you usually need extra caps to run the switched capacitor part of the circuit. I believe Noggin was probably speaking of 74XX244 or 74XX540 bus drivers which use 0-5V but can source larger currents to drive higher Z loads with low propagation delay. The 540 is inverting, but that doesnt matter if you are going to use one on each end. If you can use half-duplex communication, you can just use a single wire between the systems (since the auto chassis is a common ground).
 

Noggin

Member
Actually, I wasn't talking about anything in specific. I have very little knowledge compared to most people here, but I was just thinking that if you use -12 to +12 signaling, 1v worth of noise wouldn't be as harmful as if you were using 0 to 5v. It night not work like that.... what about differential signaling?
 

crust

Member
Differential signaling is a method to provide noise immunity. For instance when using twisted pair in an ethernet, the idea is that outside noise will affect the signals traveling on the + and - wires more or less equally. So assuming you intend to send a signal A0 across the cable, you convert A0 to +A0 and -A0 and push them down independent cables which are twisted together. The cable is in a noisy environment and picks up some noise which I'll call e. In reality, both cables would not pickup exactly the same amount of noise, but we can ignore that for this discussion. As a result, we have two signals that are now the sum of each original signal and the noise component epsilon: +A0+e, -A0+e. At the receiver we now take the difference of the two signals, delta. D = +A0+e - (-A0+e) = 2A0 = A0.

RS232 is not differential signalling however, though the voltages swing from -12,+12, the transmit is only a single wire, as such, you cannot use the noise elimination technique I just mentioned. RS422 and RS485 (for which drivers are readily available) are similar to RS232 using differential signalling.

Two meters is not very far. It is very far for a high speed signalling system, but assuming they are using the PICs UART, and you can live with the lower data rates, you could use a single ended line driver or maybe get away without a line driver at all. As the speed gets higher, you get lots of attenuation from the cable impedance. For comparison purposes, a regular 100BT ethernet runs around 125MHz or so.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top