In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Hi, for one system, I used photocouplers to interface the SX to an RS-232 port. Although this may be not cheaper than using a MAX232, it has the advantage that the PC and the SX side are electrically isolated. This is important in industrial applications. The approach is a bit "tricky" because on the PC side, it is important that the RXD input is switched between say +9 and - 9 Volts. As I did not need handshake, I "mis-used" the RTS and DTR lines of the COM port as "supplies" for the positive and negative voltages. OK1 pulls RXD up to +9V when SX_TXD is low, and OK2 pulls RXD down to -9V when SX_TXD is high, where Q1 is used to invert SX_TXD for OK2. To make sure that the RCD part works correctly, it is important that the software controlling the COM port sets RTS and DTR to the required levels. The COM port's TXD signal is directly connected to pin 1 of OK3, and pin 2 goes to signal ground of the COM port. SX_RCD is pulled low then the TXD line is at +9V, and it will be pulled up to high via R4 when the TCD line is at -9V. Lockburn, when you only need serial in, OK3 and D1 are the only components you need. Maybe, it's a good idea to put another resistor (say 220 Ohm) in series with the TXD line for current limiting. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=81997#m82009 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)