How can one convert one level to another in the simplest manner?
I have one device that works on 2.5V and another that works on ~5V. The bus is bi-directional so I need to convert both ways.
Actually the 5V device has open collector outputs but the problem is that its not truely open collector since it has a pullup itself. So if I put a
2.5V pullup it's actually larger than 2.5V. Of course I could reduce the resistor pulling up to 2.5V but then it causes the current to go out of spec.The basic idea is
Vdd Vcc --- --- | | .-. .-. Vdd | | | | --- | |Rd | |Rc ---------o '-' '-' | | -o | ___ | _/ __--o---|---|___|---|---o/ o- GND GND------o Rw Sw1 Sw2
Where everythign after Rw(Vcc, Rc, Sw1) are internal(the parallel port) to the 5v device and everything before Sw2 is internel to the 2.5V(a micro pic).
Sw1 controls the parallel port output state and Sw2 controls the output of the pic. (it's also used as an input in which case Sw2 is set to Hi-Z(middle) and there is a line connected just before it)
Rw is the wire resistance which is significant in this case I believe since I'm actually getting only about 4V instead of 5V(although I haven't checked the parallel port's voltage itself so it might be low already).
In any case, Vdd is the pull I add which is suppose to be about 2.5 volts. In reality what the pic see's is over 3 volts dependon on how I choose Rd. (It has to be alteast 625ohms because Sw1 can only sink 4mA and 2.5V/4mA =
625Ohms.) Rc is suppose to be 4.7kohms or so but no telling what it actually is.Actually there needs to be a current limiting resistor right after Sw2 in teh case Sw2 is at Vdd and Sw1 is at GND. It too needs to be atleast
625ohms.In any case I don't see an easy to to convert the levels in any decent way because of the internal pullup ;/ What I was thinking is to use a bjt that is driven by the parallel port... something like
Vdd --- | | |