Serial communication - distance without transceiver and level shifters?

Status
Not open for further replies.

MrGlasspoole

Well-known member
Searching on this topic in the web does not bring up answers.

The answer is always you can have a cable length of this and that with RS-232, RS-422 or RS-485...
But what about communication on the same PCB?
I2C and SPI first where meant for chip to chip communication on the same PCB - what about serial/UART?
Where is the difference having 10cm (4") PCB traces between the transceiver and the processor or 10cm (4") directly between both processors/chips?

Then there is the question of level shifting.
Most of the transceivers in DIL package have 5v VCC.
If i have two 3.3v processors talking to each other through a transceiver that is powered by 5v - do i need a level shifter?
 
I2C and SPI first where meant for chip to chip communication on the same PCB - what about serial/UART?

It all comes down to your speed requirement. The slower you run the Serial data -- The farther you can run the wire before the signal becomes to distorted to accurately receive.

Interconnecting two processors via I2C (Master/Slave), SPI (Master/Slave), or Serial (Tx to Rx) really exchange the same types of waveforms. I2C uses two signal wires, SPI generally uses four signal wires, and Serial uses two signal wires (Looking from the Master - One wire to Transmit, One wire to Receive).

All of these interconnect schemes - when connected directly from device to device - share the same signal levels and speed limitations.

You generally only need a level shifter if the logic level of the connected devices differ. If you are trying drive a 5v display from a 3.3v micro at max speed then it would be best to include a 3.3v to 5v level shifter in your design.

A transceiver is generally only needed if the two ends are separated by 1) a 'long' distance, and 2) the possibility of differing ground connections. The design of the TIA-232 interface spec (TIA-232 is the current version of the older RS-232 spec) allows for something like up to a 3v difference in the ground loop. RS-422 and RS-485 use a two wire differential technique and can be even more tolerant of ground loops and ground noise in addition to being able to interconnect multiple devices on the same network. A transceiver also allows tolerance for the case when the two ends have differing power supplies that do not sequence (power up/down) in step.

If I was only going 10 inches on the same PCB, using all 3.3v devices, at a reasonable baud rate, and had a common power supply and ground plane, then I'd just connect the devices directly.

A Serial interconnect at 9600 baud is a 9,600 bits per second or a 9.6 KHz signal.

A Serial interconnect at 115,200 baud is a 115,200 bits per second or a 115.2 KHz signal with fairly nice clean edges.

To achieve those nice clean edges, the device driving the line needs to be able overcome the capacitance of the line to produce a risetime of something like 10x the bit rate. Sometimes one uses a buffer (line driver) to boost the output of the micro when driving a lot of loads or a long trace.

(Edited to correct the frequencies - oops !!)
 
Last edited:
So it is save to power a MAX 488 with 5v even if the chip is connected to a 3.3v processor without a level shifter?

It depends on what you are attempting to do. A little more detail on what is connected to what and why would make replies more specific to your needs.

The general answer to your question is:

1) You can connect the Tx output of a 3.3v micro to the input of a 5v powered MAX488 without too much concern. The logic level match is not ideal but generally will work ok.

2) However you can NOT connect the output of a 5v powered MAX488 to a 3.3v micro that does not have a 5v tolerant IO pin. The Teensy 3.2 and 3.5 have 5v tolerant Digital IO pins so connecting to a 5v MAX488 is ok. The Teensy 3.6 is 3.3v input only so it would not be a good match for the 5v output pin of the MAX488.

Note there are several 3.3v parts in the MAX488 family that are both logic level and power supply compatible with a 3.3v micro.

Why use two supplies when one will do the whole job ?

If everything is on one PCB, Why use a pair of MAX488s to send a signal a short distance ?
 
9600 baud is 9600 Hz bit rate, same with 115,200 baud, it is 115.2 kHz bitrate and around 11.5 kilo byte per second
 
It depends on what you are attempting to do. A little more detail on what is connected to what and why would make replies more specific to your needs.
1. Connecting a 3.3v microprocessor to a 3.3v microprocessor with transceivers that need a 5v power supply - 2 level shifters needed?
2. Connecting a 3.3v microprocessor to a 5v microprocessor with transceivers that need a 5v power supply.

However you can NOT connect the output of a 5v powered MAX488 to a 3.3v micro that does not have a 5v tolerant IO pin. The Teensy 3.2 and 3.5 have 5v tolerant Digital IO pins so connecting to a 5v MAX488 is ok. The Teensy 3.6 is 3.3v input only so it would not be a good match for the 5v output pin of the MAX488.
The question was not about 5v tolerant microprocessor because as it says, they are 5v tolerant :p

Note there are several 3.3v parts in the MAX488 family that are both logic level and power supply compatible with a 3.3v micro.
DIL package?

Why use two supplies when one will do the whole job?
Most of the time there is already 5V there. Most power supplies are 5/6/9/12v.
I did not see single 230V>3.3V supplies.

If everything is on one PCB, Why use a pair of MAX488s to send a signal a short distance?
Thats not always the case and was part of my question. How long can you go without RS-232, RS-422 or RS-485 transceivers on max speed?
 
DIL package?

3.3v MAX3488 is available in DIP

https://datasheets.maximintegrated.com/en/ds/MAX3483-MAX3491.pdf

Max Distance depends IO Driver characteristics, wire/trace capacitance (including ic pin capacitance), and desired "max speed".

An overall general answer is elusive as there are many variables. However the table in the reply located at

https://www.quora.com/At-what-clock...-considering-high-speed-digital-design-issues

may be indicative of what to expect.

If you want to warp your mind - Google "high speed pcb design"
 
The question was not about 5v tolerant microprocessor because as it says, they are 5v tolerant :p

Really? I'm looking at your question and I don't see where it says you're using a 5V tolerant part. In fact, it doesn't say at all which parts you're using. That is the problem, because these sorts of details matter quite a lot.

Two Teensy models (LC and 3.6) are not 5V tolerant. Teensy 2.0 and Teensy++ 2.0 default to all 5V, but can be converted to all 3.3V by adding a regulator, and if you do that to get 3.3V, those boards are 5V tolerant either. If you try to connect a 5V transceiver chip, the 5V signal output could damage those boards. It's really only safe to connect such a signal to Teensy 3.2 or 3.5 (the models which are 5V tolerant), or to the 5V only boards which haven't been modified to 3.3V.
 
About wire lengths, the rule of thumb is a wire is considered "long" when it's more than 1/10th the wavelength of the highest frequency signal it carries. For PCB traces and most types of wire, you can assume signals propagate at about half the speed of light, for the sake of converting frequency to wavelength.

For digital signals, estimating the highest frequency is tricky. A theoretically perfect square wave at 10 kHz has harmonics at 30, 50, 70, 90, 110 kHz and so on, in theory up to infinity, but each decreasing as you go higher. Of course, in practice not actual circuitry produces infinite bandwidth, and also in practice when the amplitude of those much higher harmonics is so small their effect matters very little.

Another thing that happens in practice, but only on some chips, is a feature called slew rate limiting. On Teensy LC & 3.x, all the digital pins have this feature. By default it's turned on for normal digital I/O and for serial, but not for faster protocols like SPI. The slew rate limiting causes the transistors in the chip to intentionally slow the rate of change in voltage. It's a minor effect, but it really helps prevent extremely high frequencies. The idea is to allow you to more easily use longer wires (and for those wires to not have extremely high frequency which makes passing radio frequency emissions tests a lot harder).

When wires are "long", often a resistor is placed in series near the transmitter. The value depends on the type of wire, but usually the range is 33 to 220 ohms. To learn more about this, the technical term to search is "characteristic impedance". It's a deep rabbit hole....

Regardless of the length, all signals involve current flowing in a loop. For ordinary digital signals, the return current usually flows through the ground plane or traces on your PCB. For special differential signals like RS485, the pair of wires are meant to be the loop and current isn't supposed to be flowing through ground. Either way, when you're not emitting radio signals, electricity always flows in a loop. The area of that loop also matters. Minimizing the area matters for higher frequencies, for a variety of reasons I'm not going to go into right now, because this message is already pretty long.
 
Really? I'm looking at your question and I don't see where it says you're using a 5V tolerant part.
Yes, my question did not say that because my question was on 3.3v microprocessors connected to a transceiver that needs 5v supply voltage (like a MAX488).
I did not say I'm using a 5V tolerant part.
 
just to note the diablo16 processor (on the lcd)supports 600,000 baud uart, however i was not able to achive it using very short jumper wires, it partially works at 300,000 baud but then locks up on teensy 3.5. lcd is a 3.3v uart as well. currently stable at 200,000 baud. i know i read on the forums the teensy is capable of 7.5Mbaud but even at 300-600k i couldnt do it
 
Status
Not open for further replies.
Back
Top