RS485

From CunningWiki
Revision as of 10:00, 24 April 2012 by Dye (Talk | contribs) (Voltages)

Jump to: navigation, search

Description

Voltages

RS232 specification says that the voltages may be -7V - +12V.

A 1 is represented as Positive Voltages (B-A > +200 mV)

A 0 is represented as Negative voltages (B-A < -200 mV)

Interface Connector

There is no standard connector for this interface

Baud Rate

Baud: the symbols per second or pulses per second.


Baud Rate = 1/(Bit Width)

Bit Width = 1/(Baud Rate)

-in seconds


List of Common Baud Rates (these are approximations)

Baud Rates Bit Width (ms) Bit Width (us)
50 20.00 20000.00
75 13.33 13333.33
110 9.09 9090.91
134 7.46 7462.69
150 6.67 6666.67
300 3.33 3333.33
600 1.67 1666.67
1200 0.83 833.33
1800 0.56 555.56
2000 0.50 500.00
2400 0.42 416.67
3600 0.28 277.78
4800 0.21 208.33
7200 0.14 138.89
9600 0.10 104.17
14400 0.07 69.44
15200 0.07 65.79
19200 0.05 52.08
28800 0.03 34.72
31250 0.03 32.00
38400 0.03 26.04
56000 0.02 17.86
76800 0.01 13.02
115200 0.01 8.68
128000 0.01 7.81
230400 0.00 4.34
460800 0.00 2.17
921600 0.00 1.09
1382400 0.00 0.72
1843200 0.00 0.54
2764800 0.00 0.36

Testing: Rise/Fall Time

Rise time: characterized as the time required for the voltage to step from the voltage low signal to a voltage high signal. Typically this is 10% and 90% of the voltage high signal.


Fall time: characterized as the time required for the voltage to step from the voltage high signal to the voltage low signal. Typically this is 90% and 10% of the voltage high signal.


In RS232 communication the RS232 receivers will have an acquisition at the middle of each bit. A fast rise time will mean that there is more margin in each bit for a correct acquisition. A slow rise or fall time will could mean that the bit is sampled during the rise transition which may be below the voltage input high voltage. Resulting in a false reading.

Testing: VIH/VIL

Voltage Input Low (VIL): The voltage threshold where the voltage input is considered low


Voltage Input High (VIH): The voltage threshold where the voltage input is considered high

Testing: Max Baud Rate

Testing every baud rate on every interface will take a lot of time. In some cases all you want to test is the Max Baud rate since it is the one that will be most affected due to shorter bits.


Testing: Baud Rate Accuracy

I use this reference to help understand baud rate accuracy. Generally speaking you want better than +/-2.5% accuracy for your transceivers or receivers.

Due to the crystal or oscillator used certain baud rates cannot even be achieved.

Generally the best way to measure this is to take a scope trace of a UART frame. A UART Frame is characterized as a Start Bit, Data and a Stop Bit. In a 8 bit frame this could look like this.

START BIT D0 D1 D2 D3 D4 D5 D6 D7 END BIT

In this frame there are 10 data bits (including the start and end bit). If we measured the time from the start bit leading edge to the stop bit trailing edge we could see 1041.7us. Since that is a measurement of 10 bits we divide by ten and each bit is 104.17us. 1/(0.00010417s) = 9599.69 Baud which is 99.9968% accurate to 9600 baud.


References

Maxim-IC Baud Rate Accuracy Signal Levels