One of the most common questions asked to me in emails is how an RS232 connector can be soldered to an USB cable. Unfortunately life is not that simple. Although RS232 and USB (universal serial bus) are both serial communication standards to connect peripherals to computers, they are totally different in design. A simple cable is not enough to connect RS232 devices to a computer with only USB ports. There are however converter modules and cables that can be successfully used to connect RS232 devices to computers via an USB port. These adapters and cables contain electronics, and the success rate depends on the capabilities of this electronics and the device driver software that is shipped with the converter to communicate with these electronics over the USB bus. Before buying your USB to RS232 converter, it is advised that you read this document first.
Differences from the application point of view
RS232 is a definition for serial communication on a 1:1 base. RS232 defines the interface layer, but not the application layer. To use RS232 in a specific situation, application specific software must be written on devices on both ends of the connecting RS232 cable. The developer is free to define the protocol used to communicate. RS232 ports can be either accessed directly by an application, or via a device driver in the operating system.
USB on the other hand is a bus system which allows more than one peripheral to be connected to a host computer via one USB port. Hubs can be used in the USB chain to extend the cable length and allow for even more devices to connect to the same USB port. The standard not only describes the physical properties of the interface, but also the protocols to be used. Because of the complex USB protocol requirements, communication with USB ports on a computer is always performed via a device driver.
It is easy to see where the problems arise. Developers have lots of freedom where it comes to defining RS232 communications and ports are often directly, or almost directly accessed in the application program. Settings like baudrate, databits, hardware software flow control can often be changed within the application. The USB interface does not give this flexibility. When however an RS232 port is used via an USB to RS232 converter, this flexibility should be present in some way. Therefore to use an RS232 port via an USB port, a second device driver is necesarry which emulates a RS232 UART, but communicates via USB.
Many applications expect a certain timing with RS232 communications. With ports directly fitted in a computer this is most of the time no problem. The application communicates directly, or via a thin device driver layer with the UART, and everything happens within a well defined time frame. The USB bus is however shared by several devices. Communication congestion may be the result of this, and the timeframe in which specific RS232 actions are performed might not be so well defined as in the direct port approach. Also, the double device driver layer with an RS232 driver working on top of the complex USB driver might add extra overhead to the communications, resulting in delays.
Hardware specific problems
RS232 ports which are physically mounted in a computer are often powered by three power sources: +5 Volt for the UART logic, and -12 Volt and +12 Volt for the output drivers. USB however only provides a +5 Volt power source. Some USB to RS232 converters use integrated DC/DC converters to create the appropriate voltage levels for the RS232 signals, but in very cheap implementations, the +5 Volt voltage is directly used to drive the output. This may sound strange, but many RS232 ports recognize a voltage above 2 Volt as a space signal, where a voltage of 0 Volt or less is recognized as a mark signal. This is not according to the original standard, because in the original RS232 standard, all voltages between -3 Volt and +3 Volt result in an undefined signal state. The well known maxim MAX232 series of RS232 driver chips have this non-standard behaviour for example. Although the outputs of these drivers swings between -10 Volt and +10 Volt, the inputs recognize all signals swinging below 0 Volt and above 2 Volt as valid signals.
This non-standard behaviour of RS232 inputs makes it even more difficult to select the right RS232 to USB converter. If you connect and test an RS232 to USB converter over a serial line with another device, it might work with some devices, but not with others. This can particularly become a problem with industrial applications. Low-cost computers are often equipped with cheap RS232 drivers and when you test the RS232 to USB converter with such a computer, it might work. But the same converter may fail if you try it in an industrial environment. The chances that RS232 ports from low-cost computers accept signals in the 0..5 Volt range are higher than with industrial equipment which is often specifically designed to be immune for noise.
Another hardware specific problem arises from handshaking to prevent buffer overflows at the receiver's side. RS232 applications can use two types of handshaking, either with control commands in the data stream, called software flow control, or with physical lines, called hardware flow control. Not all USB to RS232 converters provide these hardware flow control lines. It is not always easily identified if an application needs them. Some applications do not use hardware flow control at all, and those cheap USB to RS232 converters will work without problems. Other applications use hardware flow control, but infrequently. Only with large data bursts, or in situations where the CPU is busy performing other tasks, hardware flow control might kick in to prevent data loss. In those situations, communications may seem error free, but with sometimes bytes lost, or unspecified errors in the communications.
USB to RS232 converter selection criteria
Resuming, when choosing the right USB to RS232 converter, look at the following potential problems:
* Does your application have very tight timing requirements? In that case it might be better to use an internal RS232 port, instead of an USB to RS232 converter. The extra layer at the device driver level and bus congestion might make the communications less reliable.
* What are the RS232 output voltages of the converter. Do they meet the requirements for the equipment you want to connect?
* What are the handshaking requirements for your application? If hardware flow control is required, make sure that these inputs and outputs on the converter are present.



































You don’t need to be a rocket scientist to understand them; they are just a different way of encoding numbers and letters by using a combination of bars and spaces of varying widths. Think of them as another way of writing since they replace key-data entry as a method of gathering data. In business, the correct use of bar codes can reduce inefficiencies and improve a company’s productivity thereby growing their bottom line.
Bar codes are read by sweeping a small spot of light across the printed bar code symbol. Your eyes only see a thin red line emitted from the laser scanner. But what’s happening is that the scanner’s light source is being absorbed by the dark bars and reflected by the light spaces. A device in the scanner takes the reflected light and converts it into an electrical signal.
UPC/EAN - This is the symbol used on items destined for the check-out line. UPC symbols are fixed length, are mandatory in the retail and food industry, and not used anywhere else for the most part. They were developed to meet the needs of grocery retailing as it fits 12 digits into a reasonably compact space.
Code 39 - Developed because some industries needed to encode the alphabet as well as numbers into a bar code, Code 39 is by far the most popular bar code symbology of choice. It is typically the non-food standard bar code, and is used for ID, inventory, and tracking purposes in various industries such as manufacturing. However, Code 39 produces relatively long bar codes and may not be suitable if label length is a consideration.
Code 128 - This bar code came about when the need for a wider selection of characters arose than Code 39 could provide. When label length is a consideration, Code 128 is a good alternative because it’s very compact and results in a dense symbol. This symbology is often used in the shipping industry where label size is an issue.
PDF417 - Known as a 2D (two-dimensional) bar code, this is a high-density, non-linear symbology that reminds you of a crossword puzzle. But the difference between this and the other bar codes listed above is that PDF417 is really a portable data file (PDF) as opposed to simply being a reference number. Some states require a 2D bar code be printed your driver’s license. If your state has this requirement, it’s interesting to know that there’s room enough in this bar code to encode your name, photo and summary of your driving record, and other pertinent information. As a matter of fact, a PDF417 bar code can encode the Gettysburg Address in a space the size of a postage stamp!
Keyboard Wedge Readers. A keyboard wedge reader is attached to a computer through a port called the keyboard interface. When a bar code is scanned, the information is transmitted as though it were keyed in from the keyboard. Sometimes they’re referred to as wedge readers because they physically wedge between the keyboard and the computer and attach as a second keyboard. One great advantage of a keyboard wedge is that bar code reading can be added with no software changes necessary; the software thinks that the data received was entered by a speedy typist. With a wedge reader, any program that accepts keyed data will accept bar code data with no change.
Serial Bar Code Scanners. Another way to transmit data from a bar code reader to a computer is to connect it to the computer’s RS-232 serial port. The bar code information read will be transmitted in ASCII format and look just like keyed data to the computer. Using a serial port connection is ideal for a multi-user computer. With serial ASCII terminals for each user, the bar code reader can attach between the terminal and host computer and transmit ASCII data just like the terminal. To the left, see pictured a barcode print and apply application. The barcode is printed, then verified by a reader, then the pallet is rotated and the same barcode is printed and read on the other side.
Portable batch scanners are hand-held battery operated readers which store data in memory for uploading to the host at a different time. A portable batch reader contains a bar code scanner, an LCD-display to prompt the user to perform a task, and a keyboard to enter variable data such as quantities. A cradle must also be purchased to upload information to the computer. Portable batch scanners are ideal when mobility is a must and when collected data isn’t immediately needed. These scanners come in a variety of styles including hand-held, wearable and truck mounted. Your application will determine which style is best.
When you need to collect information at a remote location, and need the information immediately, a wireless solution is the perfect one. A wireless scanner is also built into a terminal, and uploads data to the host as it’s scanned, instantly and accurately. Wireless products let the user scan the information at the point of activity which makes it ideal for many industries.




