Spehro wrote: snip > > That's a nice circuit. Just 2 pullup resistors and 2 2N700x transistors. > total for both directions. > > Come to think of it, you could use BJTs too, with base resistors as thus: > > > 3.3V 5V > o o > | | > .-. .-. > 10K | | | | 10K > | | | | > '-' '-' > | | > | | > --- | > 0/3.3 in o---v \---+--o 0/5V out > Yes, would agree, very nice. > > 3.3v 5V > o o > | | > .-. .-. > 10K | | | | 10K > | | | | > '-' '-' > | | > | | > | --- > o-+----/ v-------o 0/5v in > > 0/3.3v out > > > Only disadvantage I see is that it requires access to (and draws > current from) the 3.3V supply (or you could create a local 3.3V supply > from the 5V supply, but that would add at least one part. This I disagree with. I think the base of the transistor should also be at 3.3V for correct operation. Otherwise the NPN transistor is working as if the collector and the emitter were the wrong way around when +5v is applied to the emitter. The +5V in will go through the emitter and out of the collector thus making the voltage on the collector 4+ volts. Maybe not very well explained, but try it on breadboard and you will see what I mean. Brian. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads