Hot answers tagged

83

No, UART and RS-232 are not the same. UART is responsible for sending and receiving a sequence of bits. At the output of a UART these bits are usually represented by logic level voltages. These bits can become RS-232, RS-422, RS-485, or perhaps some proprietary spec. RS-232 specifies voltage levels. Notice that some of these voltage levels are negative, ...


38

It signifies nothing; it's part of a sequential list of EIA standards: -


35

UART (or USART) - Universal (Synchronous) Asynchronous Receiver/Transmitter This is, essentially, a serial communications interface. The "universal" part means that it can be configured to support many different specific serial protocols. The term is generic, and does not represent a specific standard. At minimum it means that it has a TX and an RX line, ...


27

It's the document serial number of the standard. Same reason why the HTTP protocol is also known as RFC2616 and the Javascript programming language is also known as ECMA262. The numbers themselves have no meaning. For example while EIA232 specifies the electrical characteristics of a digital serial communications system, EIA222 specifies standards for ...


27

The thing to remember is that RS232 is an asynchronous protocol. There is no clock signal associated with it. Figure 1. Receiver sampling points. Source: Sangoma. The start bit is used to trigger the read cycle in the receiver. The receiver synchronises itself on the start bit and then waits 1.5 cycles to start sampling bits. Thereafter the bits are ...


23

In both of the cases you mention, an analog quantity is involved somewhere. In the RS-232 case, the number of “stop bits” refers to a duration, so 1.5 stop bits simply means 1.5 times the duration of a bit at the given rate. In the ADC case, 0.5bit precision refers to the analog quantity being converted, so 0.5bits essentially means that the digital ...


23

It might be easier to understand, if we quickly review how the RS-232 standard was originally used. Note: All pin numbers below refer to the original 25-pin D connector; the numbering changed on the 9-pin connector used on later PCs. Background DTE = Data Terminal Equipment - in the old days, this would usually be a terminal or a printer, or equipment ...


22

CAN sounds the most applicable in this case. The distances inside a house can be handled by CAN at 500 kbits/s, which sounds like plenty of bandwidth for your needs. The last node can be a off the shelf USB to CAN interface. That allows software in the computer to send CAN messages and see all the messages on the bus. The rest is software if you want to ...


21

It looks like you have about 2.4 bit times per division, which are 250 µs. That puts each bit time at 104 µs. Inverting that yields 9.6 kBaud. That's one of the standard baud rates, so this sounds quite plausible.


21

You have missed a major detail of RS232. Logic levels are as follows: Figure 1. RS232 signal levels. Source: Wikimedia Commons. Logic 1 = -3 to -12 V. Logic 0 = +3 to +12 V. Between -3 and +3 the logic level is undefined. The RS232 start bit is a logic 0. To convert from TTL (5 V) logic to RS232 a driver is required. Chips such as the MAX232 do the logic ...


20

They're definitely required! For their function look at the block diagram You'll see that they're connected to the voltage doubler and voltage inverter. These create +10V from the 5V power supply and -10V resp. This is done by charge pumps. An oscillator will control the switches so that either S1 and S3 are closed or S2 and S4. When S1 and S3 are ...


20

What are the differences between USB and RS232? You will find much more than I can tell you here about the abilities and disadvantages of RS232 by starting with a search for RS232 and then 'wandering around the web' and following the thread where it leads. No one page will tell you everything but 10 or 20 quick skims will show you how useful it was and how ...


19

Summary In a balanced signal both wires carry the signal, with one wire the negative of the other. In the receiver both are subtracted, giving the double of the positive wire's signal. If both wires pick up a disturbance this will be cancelled by the subtraction. Twisted wires reduce the inductance because the field inverts with each half twist. An ...


18

An USB port is much more sophisticated than an RS-232 serial port. Basically, an RS-232 has a TX pin and an RX pin in which a given side transmits and receives data (respectively), and the other side has the same two crossed over, so one TX connects to the other RX and vice-versa (obviously). There are other pins for control, but they are not necessarily ...


18

I wonder how it's possible to have half a bit? In UART based asynchronous serial communications (of which RS232 is an example), a serial byte of data is "enclosed" within a start bit and a stop bit(s). Following the stop bit there is a gap before the next data byte and this gap can be regarded as extending the stop bit(s): - A lot of serial data ...


18

All three circuits display examples of pull up, pull down, voltage dividers, and current dividers: R1 and R2 are pull up resistors. You have to have both because you have two switches which can be in a different state (one high, one low). The 40Ω resistor is the top half of the voltage divider. The zener is the bottom half of the voltage divider. The ...


16

It uses one charge pump to double the supply voltage, and the second charge pump to invert it. The idea behind the charge pump doubler is that capacitors are first charged in parallel, then they are switched such that they are connected in series. (Source of picture: datasheet for ICL232, which is similar to MAX232.) As an aside, I've seen hacks where +...


16

Speed of transmission matters because USB is half-duplex: in order to transmit a response, the bus must be turned around and data transmitted in the other direction. So the host sends out data and waits for an acknowledgement or a response. All transfers are controlled by the host. The device then has a certain (fairly short) time in which to respond. This ...


16

The original plan when the D-sub connector family was introduced was that equipment would always have female connectors and cables would always have male connectors. The idea was that pins are easily damaged, and it's usually easier to replace a cable than to replace a connector on a piece of equipment. Designations such as "DCE" (data communications ...


14

The UART functions to convert parallel data from PC bus lines to serial data for transmission via line drivers to RS-232, RS-422, and RS-485 devices. The clock pin of the UART chip is feed by a programmable clock source. The clock speed is determined by the baud rate configuration that the device will be using. The clock speed is 16 X the baud rate. Placing ...


13

In the case of the Zener regulator, the supply is 10 volts, and the Zener will do its best to limit the voltage across itself to 6 volts. If the 40 ohm resistor wasn't there, a very large current would flow as the Zener tried to do its thing, and the magic smoke would be released from many parts. If I've done the math right, the 40 ohm resistor will carry ...


13

Capacitance in the cable begins to affect serial communications, typically many manufacturers/devices set a limit of approximatly 15m or 50ft on cable lengths for anything up to 9600 baud, and about 4m for 38.4k. That being said, with decent cable it is easily possible to go longer in tested or non-commercial use, but I would stick to the guidelines for a ...


13

Can someone please suggest on what should be the correct approach to enable communication using RS-232 for such long distance. No, because RS-232 was never designed to work over such distances. A long cable like that picks up a lot of noise and interference, like an antenna. Because RS-232 is single-ended, this noise and interference is impossible to ...


13

1) Why the frequency should be 16 times the baud rate? As Chris has already pointed out in the comments, there is no clock signal, RS-232 UARTs are asynchronous systems. This means we have no idea when incoming data will start and it's a fairly safe bet that the transmitter clock will be running at a slightly different rate to the receivers. In order to ...


12

This depends on what endpoint types your device is using. A quick summary taken from USB in a nutshell: Interrupt Transfers Guaranteed Latency Stream Pipe - Unidirectional Error detection and next period retry. Isochronous Transfers Isochronous Transfers provide Guaranteed access to USB bandwidth. Bounded latency. ...


12

note: answer is about current loops, not RS422A Current loops have a number of advantages over voltage lines. A 4/20mA loop, which uses 4mA and 20mA to represent two logical levels, allows for instance to detect cable breaks, since in case of an interrupted cable the current will be zero. Another advantage is its noise immunity, which is important in ...


12

Your scope shows the timing at \$100\:\mu\textrm{s}\$. This may either be you setting the cursors, or else the automated use of a measure function on the scope. You don't say. Either way, I agree with Olin's comment that this is close to 9600 bps, which is a common bit rate for RS-232 communications. However, your own comment about the external clock rate ...


12

It is a fully digital system. It must operate in discrete steps. This is the formula from the datasheet: UBRR register is 16 bits wide (UBRRL + UBRRH), so it can only lead to 65536 possible baud settings. Look also at section "24.11. Examples of Baud Rate Setting" and table 24-4 of the datasheet.


11

The parallel port is great when you're using Windows 98 or DOS. All modern Windows operating systems have drastically changed how the parallel port interface works making it almost impossible to interface with anything other than a printer. And the parallel port is basically obsolete at this point anyway. Also, it's basically impossible to do any ...


10

See this page, https://superuser.com/questions/64744/maximum-length-of-a-usb-cable. Q1: How long of a cable can I use to connect my device? A1: In practice, the USB specification limits the length of a cable between full speed devices to 5 meters (a little under 16 feet 5 inches). For a low speed device the limit is 3 meters (9 feet 10 inches). Q2: ...


Only top voted, non community-wiki answers of a minimum length are eligible