> PROBLEM BACKGROUND: > =================== > > I'm using a MAX232 RS232 <--> TTL converter to connect a PC, > a PIC, and an 8051. > Communication paths are as follows: > > PC <--> 8051 <--> PIC > > The 8051 I'm using has 1 UART which is used for both communication > paths (ie I could implement the serial communications > in software for one communication path and use the UART for the > other, and this would alleviate my problem). > > > PC / MAX232 8051 PIC > TX RX RX TX TX RX > ____________ _____________ ___________ > | | | | | | > | | | | | | > | ------------------------|-----*-------------------------- > > | | | > ------------------------------*-------------------------- > > > PROBLEM: > ======== > The MAX232 does not have open collector o/p's (Please correct me if > I'm wrong but I checked the MAXIM '95 New Releases Data Book and saw > no reference to same). Therefore, the PIC can't transmit to the 8051 > because the MAX232 is forcing the line high when not transmitting. > > > POSSIBLE SOLUTION 1?: > ===================== > To overcome this problem, I came up with the following: > > +5v > ___ > | > | | > |\ | | > | \ |/| | > ----| O---------| |----------------- TxOut > | / |\| > |/ > Max232 Diode Pullup > inverter Resistor > > > When MAX232 o/p is low, Diode conducts => TxOut is at 0.7V = Logic 0 > o/p is high, Diode doesn't conduct => TxOut is pulled up > to 5V. > I'd like to here comments / criticisms on this work-around or others > like it. I tested it at 9600 Baud and it seems to work fine. > Well, TxOut(LOW) is the diode drop plus the VOL of the MAX232. Worst case, you've probably blown your noise margin. If this is just a onesy-twosy circuit that isn't intended for production, you can usually get away with it. I wouldn't use this kind of kludge in a production board, 'tho. > POSSIBLE SOLUTION 2?: > ===================== > There is a MAX232 version which does the following: > "Driver outputs turn off and enter a high-impedance state.... > when in shutdown mode, in three-state mode, or when device > power is removed." Receivers remain active in shut down mode. > Problem is, I want to have one driver o/p permanently active > so shutting down the chip to facilitate communication is not > feasible. > Well, depending on how the MAX232 three-state mode works, I'd consider that the best possibility. Why do you care if all drivers are off? As long as you have a pull-up or -down (depending on how you want your inactive line to float), you should be fine. Alternatively, you could rig your own OC output using a cheap switching transistor (2N2222 equiv), a base resistor, and a pull-up resistor. Depending on how the numbers work out, you might be able to even ditch the base resistor. ---- Andy Hill ahill@boi.hp.com