ANALOG DEVICES AN-375 APPLICATION NOTE ONE TECHNOLOGY WAY e P.O. BOX 9106 e NORWOOD, MASSACHUSETTS 02062-9106 617/329-4700 ADM2xxL Family for RS-232 Communications by Matt Smith The ADM230L-ADM241L is an improved replacement for the AD230-AD241 product line. Improvements include operation with smaller capacitors, lower power con- sumption, higher baud rates, increased ruggedness and overvoltage protection. All parts in the product line meet or exceed the EIA-232E standard requirements and offer superior performance in many areas. The present RS- 232 requirements include conformance to the EIA-232E standard, low power consumption, low cost, high reli- ability and operation from a single +5 V power supply. The ADM2xxL family of interface products meets this need by integrating RS-232 drivers, RS-232 receivers and a charge pump voltage converter onto the same chip. CMOS technology is used to keep the power con- sumption to an absolute minimum. In addition, some members of the family feature a shutdown or sleep mode which can be used to disable the devices thereby reducing the power consumption even further. The ADM2xxL family is designed to meet the EIA-232E specifications while operating from a single +5 V power supply. This is achieved by the use of an on-chip voltage doubler. Older generation RS-232 drivers required three separate power supplies: +5 V, +12 V and 12 V. This resulted in large bulky power supply units. Linear voltage regula- tors tend to be inefficient and are wasteful of power. This is especially a problem in todays portable equip- ment which operates with battery powered supplies. Ideally a single power supply should be used which can easily be derived from a battery pack. Switch mode reg- ulators can achieve this and are efficient in terms of useful power but again can be quite bulky, a serious drawback in portable equipment. In addition to this, switch mode supplies generate severe electrical noise which requires careful screening in order to conform to strict EMI regulations. The ADM2xxL solves all these problems by operating from a single +5 V power supply. An on-chip charge pump voltage converter generates +10 V levels inter- nally, thereby allowing the RS-232 output levels to be developed. The charge-pump technique is an extremely efficient method of stepping up the input voltage and is suitable for applications where the power requirements are modest. It is therefore ideally suited to RS-232-type applications. CHARGE PUMP OPERATION The charge pump uses a switched, floating-capacitor technique to double and then invert the input +5 V sup- ply. This generates voltages of +10 V and 10V. The voltage doubler schematic is shown in Figure 1, while the inverter is shown in Figure 2. | I INTERNAL OSCILLATOR Figure 1. Voltage Doubler The internal oscillator controls two phases of circuit operation. During the first clock phase, switches $1 & S2 are closed causing capacitor C1 to charge up to Vcc (+5 V). During the second phase, S1 & S2 are opened and $3 & S4 are closed. The negative terminal of C1 is connected to Vee via S4. The voltage at V+ is therefore Vee + Vee = 2Vec. Capacitor C3 acts as a reservoir capacitor to maintain the voltage at 2 V._ during clock phases when $3 & S4 are open. It should be noted that this reservoir Capacitor is connected between V+ and Vee for opti- mum performance. V+ FROM VOLTAGE DOUBLER L | INTERNAL OSCILLATOR Figure 2. Voltage InverterThe voltage at V+ is 2Vcc or +10V, and this is then used to generate 10 V using a similar technique to that already described. Again, during the first clock phase $1 & S2 are closed thereby charging C2 up to 10 V. During the second clock phase, S1 & S2 are opened and S3 & S4 are closed. The positive terminal of C2 is connected to GND via S3. This forces the potential at V to 10V. Again the output: reservoir capacitor (C4 in this case) maintains the output voltage relatively constant for clock cycles when S3 & S4 are open. In order to conserve board space, the values of capaci- tors C1 to C4 can be reduced. Reducing C1 & C2 results in higher output impedance on the V+ and V supplies, while reducing C3 & C4 causes increased ripple on the outputs. The increased output impedance & ripple is most noticeable at high temperatures, and if operation at extended temperatures is not required, then it is per- fectly acceptable to reduce the component values. The capacitors on the ADM233L and the ADM235L are integrated into the package, and so no external capaci- tors are required thereby reducing board space and sav- ing on components. Transmitter Outputs The charge pump voltages (+10 V) are used internally to provide power for the RS-232 drivers. Under worst case conditions of high temperatures and maximum loading, the drivers are guaranteed to provide +5 V levels on the RS-232 drivers. Typically the outputs provide +9 V lev- els. This exceeds the minimum levels and permits oper- ation well beyond the minimum RS-232 requirements. Slew rate of each output is tightly controlled and is limited to less than 30V/us. This is achieved by internal slew limiting, and there is no need for external slew limiting capacitors as is the case with some bipolar designs. Latch-Up Immunity Because of the nature of the environment in which an RS-232 link may function, it is extremely important that the interface devices are capable of withstanding several forms of abuse. This can take the form of a user attempt- ing to plug in the connector the wrong way around. This can cause transmitter outputs from the peripheral device to become momentarily shorted to other trans- mitter outputs on the terminal. The transmitter outputs on the ADM2xxL product line are capable of withstand- ing shorting to +15 V with the driver output at either polarity. This is the highest continuous voltage which can be present in an RS-232 link. The parts must also be capable of withstanding signals applied even when power is removed. A peripheral de- vice is often plugged into the terminal serial port before it is powered up. Again the ADM2xxL family contain internal protection to protect the device. In this case, the protection is on the receiver inputs and takes the form of passive resistive protection. Passive protection has the advantage that it continues to operate even when there are no power supplies to the device. -2- These protection schemes are also designed to protect the device if the interface cable is incorrectly wired. Due to the confusion which surrounds the RS-232 interface, this is an all-too-likely possibility. Some peripheral de- vices require signal crossing in the cable or connector, while others require a straight-through connection. This confusion is partly due to the fact that the initial specifi- cation applied to a terminal-to-modem interface. In prac- tice the RS-232 port is used to communicate with a wide variety of peripheral devices and is not limited to mo- dem interfaces. Overvoltage Protection The driver outputs are protected against damage by overvoltages greater than +15 V on the outputs. This is achieved by internal series 3001 resistors on each transmitter output. This resistor also ensures full compli- ance with the EIA specification which requires a mini- mum power-down resistance of 300 9 on each output. This resistor provides current limiting under fault condi- tions if a powered-up driver is inadvertently shorted to the powered-down driver. If for any reason there is a requirement for even greater protection than is inherent in the device, then this may be applied externally. For protection against voltages in excess of +15 V on the transmitter outputs, external series resistors may be used. A series 100 2 resistor will provide protection up to +20V. This is the simplest scheme, but it causes a slight degradation of the output voltage swing due to the higher output impedance. This is not normally a problem as the output levels are well above the minimum RS-232 voltage level requirements. ADM2xxL 3002 Ce Figure 3. Resistor Protection to +20 V for Transmitter Outputs RS232 OUTPUT Another form of overvoltage protection uses Tran- Zorbs.* These devices function as transient voltage sup- pressors and should be connected between the output and GND. ADM2xxL 3002 aan Figure 4. TranZorb Protection for Transmitter Outputs RS232 OUTPUT ICTE-10C *TranZorb is a registered trademark of General Semiconductor Industries, Inc.As the outputs signal may swing either positive or neg- ative, a bidirectional TranZorb should be used. This es- sentially contains two TranZorbs connected back to back. This scheme will provide voltage clamping at the TranZorb breakdown voltage for both positive and neg- ative excursions. Effective spike suppression is also achieved due to the extremely fast TranZorb response time. A suitable TranZorb clamp rating for this applica- tion is +10 V. This protection scheme does not degrade the output voltage swing as the previous scheme did. The receiver inputs must also be capable of withstand- ing excessive input signal voltages. The ADM2xxL fam- ily are protected against overvoltages of up to +30V. This exceeds the RS-232 specification of +25 V. If even higher levels of protection are required, then this can be provided externally by TranZorbs. A suitable clamp rat- ing for this application is +22 V. ADM2xxL AS232 INPUT (CTE-22C Figure 5. TranZorb Protection for Receiver Inputs Noise Immunity An RS-232 interface link is susceptible to noise pick up from the surrounding environment. The longer the link the more susceptible it becomes to outside interference. This is especially a problem in electrically hostile envi- ronments such as in a heavy industrial plant where large glitches can be injected or coupled onto the transmis- sion line. These glitches can cause erroneous data re- ception by the RS-232 receiver. The ADM2xxL product line is designed to cope with noisy environments by the use of special on-chip filtering circuitry on the receiver inputs. These filters reject fast transient noise glitches up to 1 ws in duration. In addition, further noise immunity is achieved by the use of Schmitt trigger inputs having 0.5 V of hysteresis. The result is a much improved data link offering superior reliability and error-free communi- cation even with severe external noise. Using an External +12 V Supply If an external +12 V power supply is available in a sys- tem as well as +5 V, then the internal voltage doubler may be made redundant thereby saving two capacitors on the charge pump voltage doubler. The power require- ments on the +5 V supply will also be reduced. Driving a Mouse One of the most popular uses of a serial port on a personal computer is as a mouse interface. With the -3- +12V +5V Ve Vv cc C2+ + | ADM2xxL v- C2- a Figure 6. External +12 V Supply widespread acceptance of Windows,* a mouse has become an essential user interface tool. The older generation of mice interfaced to the PC using the serial communications port and generally required an external power supply to power the mouse hardware. The latest generation of mice use CMOS technology, and it is pos- sible to power these devices directly from the communi- cations port. In other words, the RS-232 transmitters should be capable of providing sufficient power to the mouse. With a mouse connected, communication is in one direc- tion only, i.e., from the mouse to the PC. Therefore the transmitter outputs on the serial port are not required for communication purposes. Instead, these are used as a power supply for the mouse. The mouse driver soft- ware sets up these transmitter outputs at permanently positive or negative levels as required by the mouse hardware. The transmitter outputs must therefore sup- ply sufficient current drive to power the mouse. The power requirements are higher than those required by a standard RS-232 load. With the minimum RS-232 load, 3 kQ, the driver must maintain +5 V levels giving a cur- rent drive of +2 mA. In order to drive a mouse, however, greater current must be available. A typical mouse will require approximately 5 mA on a driver output. The ADM2xxL product line is designed to maintain +5 V output levels with a current drain of 5 mA on each driver output. There is a considerable variation in power requirements between mice from different manufacturers, and some mice may require even greater current drive. This may be achieved by connecting two transmitters in parallel thereby doubling the effective current available. How- ever, with the vast majority of mice this will not be necessary. *Windows is a registered trademark of Microsoft Corp.TYPICAL APPLICATIONS The ADM230L-ADM241L family contain a variety of transmitter/receiver combinations which will satisfy all communications needs. Some of the products are gen- eral purpose devices which are suitable for a wide range of differing applications. Others contain the exact com- bination of drivers/receivers for a particular function. One of the simplest RS-232 communication links uses 5 signal lines and may be implemented using a single ADM232L device. This is illustrated in Figure 7. More complex interfacing schemes use a greater num- ber of transmitters and receivers. A complete RS-232 implementation designates 22 signal lines. This includes secondary data channels as well as provision for syn- chronous transmission. This has led to a certain amount of confusion and incompatibility problems between RS- 232 terminals. In practice, most of these lines are redundant. As a result, the industry has formed a de facto standard using eight signal lines. This has been shown to be perfectly adequate for most communication needs. Most modern personal computers have adopted this standard and contain a pair of 9-pin serial ports rather than the 25-pin DB25 connector which can be found on older machines. These 9-pin serial ports contain 8 signal lines and a ground terminal. The signal lines are made up from three transmitters and five receivers. This forms a small subset of the original 22 signal lines. Only the most important RS-232 signals are used. The signal des- ignations and their functions are described as follows: Pin No. | Function Source | Abbreviation 1 Data Carrier Detect | DCE DCD 2 Received Data DCE RXD 3 Transmitted Data DTE TXD 4 Data Terminal Ready | DTE DTR 5 Signal Ground 6 Data Set Ready DCE DSR 7 Request to Send DTE RTS 8 Clear to Send DCE CTS 9 Ring Indicator DCE Ri The function of each of these signal lines is as follows: Function Description Transmitted Data Received Data Request to Send Clear to Send Data Set Ready Data Terminal Ready Data Carrier Detect Ring Indicator GND From the DTE to the DCE From the DCE to the DTE A signal from the DTE to the DCE indicating that it wishes to transmit data A signal from the DCE, in re- sponse to a RTS, that it now can send the data The DCE telling the DTE that it is connected to the telephone line The DTE telling the DCE that it is ready to transmit or receive data The DCE telling the DTE that it is receiving valid signals The DCE telling the DTE that it has detected an incoming call Ground Reference +5V INPUT 9 CF 1pF 6.3V Tt 1 = 5 16 +L awe 6.3V wr +) C1 +5V to +10 V+ 2 7 6.3 T_3] 61 votTAGE DOUBLER 4 | tuF + C2, A0V to -10V y-[& tev C_5|., VOLTAGE INVERTER Lo tur (4) | DATA TERMINAL READY (OTR) Tt 16v "1 47 To uN Te our (3) | TRANSMIT DATA (TxD) RT 12, |7 $__10 Tso QuT. 7) REQUEST TO SEND (RTS) vART RD 12 Rly | 13 oi ui (2) | RECEIVE DATA (RXD) R2 cTs 9 8 oe -(8) | CLEAR TO SEND (CTS) ADM232L GND 15 8) | GND + G) Figure 7. Minimum RS-232 Link Using the ADM232L E1912-12-5/94 PRINTED IN U.S.A.The ADM241L is suitable for this 9-pin implementation as it contains sufficient drivers/receivers to meet the requirements in a single package. A typical application showing the ADM241L is illustrated in Figure 8. A typical communications sequence is as follows. The UART in the terminal (DTE) turns on the Request to Send (RTS) line. This signals the peripheral (DCE) that the terminal wishes to send data. The peripheral responds with a Clear to Send (CTS) signal. The terminal now starts transmitting data on its data (TXD) line. When transmission is complete, the terminal turns off the RTS line. In response to this, the peripheral turns off CTS and the link is terminated. Figure 9 shows a different type of interface where a high resolution Analog to Digital Converter is interfaced to a personal computer using the RS-232 port. This circuit forms part of a remote data acquisition system. The +5V INPUT remote ADC transmits serial data back to a personal computer for analysis. In this case: therefore, the ADC acts as the peripheral device. This interface differs from the previous examples in that it shows the RS-232 inter- face device located at the peripheral end of the link. There will of course be a similar RS-232 arrangement located at the PC end. The ADC chosen is a high resolution converter featuring an asynchronous UART compatible interface. Operation of the interface is as follows. The DRDY output from the AD7701 ADC signals the terminal that the conversion is complete and data is ready. In response to this, the remote terminal activates the DTR line. This indicates that the terminal is ready and this line is used as a chip select for the AD7701. This initiates the data transfer. The data is then transmitted as two serial bytes in UART compatible format. tL un pF 12 Vv 7 6.3V Ct1+ cc + wet 48V to +10V ve TS] cr voLTaGe DOUBLER 15 C2+ 1pF +] +10V to -10V y- 2 16V 16], VOLTAGE INVERTER aL ur = Tt tev 1" 7 27 mn Fe > Mour a] . T2 T2 RIS in 6 rao 3 OUT @) RTS 13 1 73 SOUT 20 Fo our -(3) TxD 14, 14, pTR in 2t ee 26 T*our (4) oTR UART Rt RI pep our 8 < Rt $l OL) R2, 5 4 R2 DSR our oS R2 N (6) psr q R3, R SIN our 26 oss 27_ R3y @) pxo q Ra, Aa cTs jour__22 ose 3 4 (8) crs q R q RS Al Sout 19 a5 18 IN ) RI _ q EN 24 ADM241L 25 SD L GND = rol 5) GND 't (s) POWER = DOWN CIRCUITRY DB9S CONNECTOR Figure 8. Complete RS-232 Link Using the ADM241L+5V INPUT J Figure 9. Remote Data Acquisition System A simple Basic program to illustrate the data collection follows. This program reads the input data from the serial port and displays the received binary data in HEX format on the screen. It assumes that the data is being received on COM1. The serial baud rate is set at 1200 in line 20. The next line defines a text string which sets up the data format and control line status of the COM1 serial port. The text string is then used to open a data buffer for the port into which two bytes are read. The data is read in two 8-bit bytes and these are then concatenated to form a single 16-bit result which is converted into HEX format. This is then printed on the screen. The serial port is then terminated by closing the data buffer. Note that the buffer must be opened and closed in order that the serial port control lines follow the correct sequence. The pro- gram loops back to the start and the reading sequence is repeated continuously. For more information on the interface and on the AD7701 Analog to Digital Converter, the reader is re- ferred to an application note Evaluation Board for the AD7701/AD7703 Sigma Delta A/D Converter published by Analog Devices, publication number E1483-15-1 2/90. 100 110 120 130 140 150 fs due 12 wl ae +0] Ot* Voc ve 13 + 16V 14 +5V to +10V + C)ci- VOLTAGE DOUBLER BS wrtl 4 +10V to -10 y- 2 16V T_18| VOLTAGE INVERTER L tye + 16V Yop + __ Tia 7 1 DRDY [do owt 8) cts SDATA Tn _6 eo 3__ Sout -(@) AxD 13, Tan __20 >> 1 jour @) pep AD7701 ADC Te 21 T4, an 4 23 Pour 6) DSR pcp Ri 9 RI cs f+ s oe x (4) pTR . ADM241L GND GND 5) GND Using the ADM241L and AD7701 CLS BR$ = 1200 COMFIL$ = COM1: +BR$+", N, 8, 2, RS, CS, DS, CD OPEN COMFIL$AS#1 FIELD 1, 2 AS D$ GET #1, 2 A$ = HEX$ (ASC ( MID$ (D$, 1, 1})) B$ = HEX$ (ASC ( MID$ (D$, 2, 1))) IF LEN (A$) = 1 THEN A$ = 0 + AS IF LEN (B$) = 1 THEN B$ = O + BS Y$ = A$ + BS LOCATE 12, 20 : PRINT Y$ CLOSE #1 GOTO 40 END E1912-12-5/94 PRINTED !N U.S.A.