> I missed the original question describing the problem. Since a PIC can > drive I2C buss lines directly (by writing a 0 to the port pin and > controlling the appropriate TRIS bit to simulate an open collector (drain) > output), I'm assuming that you want to use something like a printer port to > drive I2C. > > This is easy: first use a couple of 4K7 resistors as pullups from the port > pins to VCC to ensure that Vout HI goes all the way to 5V (early printer > ports use TTL output drivers). To eliminate the forward drop of ordinary > silicon diodes, use a hi gain sgnal transistor (2n2222, 2n4401, 2n3904, etc) > and a 10K - 22K resistor connected as follows: one side of resistor to VCC, > other side to base; emitter to Port o/p pin; collector to I2C buss line. > Repeat for the other buss line. Hmm... one technique I've sometimes used which would seem apropos here is to hook two inputs on the printer port up to the I2C bus, and connect them also, through 4.7K resistors, to two printer port outputs. Adding two pullups between those outputs and +5 might not be a bad idea, but I've never had to do that. An alternative, which will work on 99% of PC's, is to simply use two of the control output pins directly (pullups are probably a good idea here). On a standard parallel card, the control outputs are all open-collector and so may be used bidirectionally. Unfortunately, this does not work on Toshiba laptops and it may fail on other machines as well.