This thread was active early last week (March 9th & 10th). I felt that a definitive answer needed posting. My earlier comments reflected my memory of RS-232-C which I learned years ago. I wanted to verify the information in the current revision before saying anything further. > use a max232 [...] generates all the voltages needed to > convert RS232 to TTL levels at the pic side. Agreed. Works great. > On the voltage level debate. There is an extensive appnote > [on a web site] that fully describes the principles of RS232 RS232 was (note past tense) an EIA Recommended Standard. It was superseded by EIA-232 years ago. But old habits die hard. I don't wish to offend anyone, but the voltage levels of EIA-232 are _not_ open to debate on the PIC list. And your reference material shouldn't be some random page on a web site (no matter how good that page is). [soap box alert] Remember first principles! It's not all that hard to get a copy of the relevant standard and _read_it_. Then you know what was actually agreed to by the regulatory bodies. [end soap box] The EIA-232 voltage levels are covered by an American National Standard which conforms to other international standards (see CCITT V.24, CCITT V.28, ISO 2110, EIA/TIA TSB-24 and EIA/TIA TSB-26). [Note, I think the CCITT changed its name to ITU.] If you want to debate the voltage levels, you should contact either the Electronics Industry Association (EIA) or the Telecommunications Industry Association (TIA) in the United States or your local representative group on the appropriate international standards bodies. As to the question under discussion, see 2.1.3 below... ANSI/EIA/TIA-232-E-1991 was approved on July 10, 1991. It's titled "Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange". A search of ANSI's on-line catalog (http://www.ansi.org) shows that this as the latest revision available. It's published by the Electronic Industries Association, Engineering Department, 2001 Pennsylvania Avenue N.W., Washington, D.C. 20006. EIA/TIA-232 is a voltage based interface where each device "has a single common return (Signal Common), which can be interconnected at the interface point." (section 1.4) 2. Signal Characteristics 2.1 Electrical Characteristics The actual standard goes into some detail and specifies an Interchange Equivalent Circuit (section 2.1.1, figure 2.1). 2.1.2 [outputs] "shall be designed to withstand an open circuit, a short circuit [...], or any passive non-inductive load [between any two pins] without sustaining damage". [inputs] "shall be designed to withstand (not be damaged by) any input signal within the 25 volt limit specified in section 2.1.6." 2.1.3 "For data interchange circuits, the signal shall be considered in the marking condition when the voltage (V1) on the interface circuit, measured at the interface point, is more negative than -3 volts with respect to Circuit AB (Signal Common) [ground]. The signal shall be considered in the spacing condition when the voltage (V1) is more positive than +3 volts with respect to Circuit AB [ground]. The region between +/- 3 volts is defined as the transition region. The signal state is undefined when the voltage (V1) is in this transition region." (page 3) Interchange Voltage Notation Negative Positive ---------------- -------- -------- Binary State 1 0 Signal Condition Marking Spacing Function Off On Note that the binary state to interchange voltage reflects one inversion (a characteristic of all the EIA-232 interface chips that I've ever used). 2.1.4 "receiver side of an interface circuit is defined for an applied voltage range of 3 volts to 15 volts in magnitude. It shall have a dc resistance of not less than 3000 ohms, nor more than 7000 ohms, measured with an applied voltage of 3 to 15 volts in magnitude. The effective shunt capacitance of the receiver [...], including the capacitance of cable, [...] shall not exceed 2500 picofarads. The reactive component of the load impedance shall not be inductive. The open circuit receiver voltage shall not exceed 2 volts in magnitude." 2.1.6 "open-circuit generator [output] voltage with respect to Circuit AB (Signal Common) [ground] on any interface circuit shall not exceed 25 volts in magnitude. The source impedance of the generator side [...] including any cable [...] is not specified; however, the impedance shall be such that a short circuit between any two conductors (including ground) [...] shall not result in a current in excess of 100 mA. Additionally, the generator design shall be such that, with a test load of 3000 to 7000 ohms, the potential (V1) at the interface point shall be not less than 5 volts nor more than 15 volts in magnitude." If you are designing a device that is EIA-232 compliant, your interface has to follow the voltage levels stated above. National and international standards are the independent references to acceptable practice. EIA-232 defines _only_ the low level mechanical and electrical interface. It does not address word lengths, data transfer timing issues, or character encodings. Those higher level protocols are covered by other standards. :-) One other thing to keep in mind. EIA/TIA-232 is "applicable for use at data signaling rates up to a nominal limit of 20,000 bits per second" (section 1.3 Data Signaling Rates). So technically, EIA-232 doesn't apply at common baud rates above 19,200. In those cases, the forward recommends: * EIA/TIA-530 "High Speed 25-Position Interface for Data Terminal Equipment and Data Circuit-Terminating Equipment", * EIA/TIA-561 "Simple 8-Position Non-Synchronous Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange", and * EIA/TIA-574 "9-Position Non-Synchronous Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange". There's lots more useful information in the EIA-232 standard. If you're working with "RS232" signals, I heartily recommend that you get a copy of EIA-232 and study it. Lee Jones ------------------------------------------------------------------- Jones Computer Communications lee@frumble.claremont.edu 509 Black Hills Dr, Claremont, CA 91711 voice: 909-621-9008 -------------------------------------------------------------------