Diode on Vdd for level shifting
Edit: title should read diode in Vss line for level shifting.
Hopefully I can explain this clearly. I have a prop board that drives RGB pixels. Even though most pixel controllers are 5V chips, I have never had an issue with the prop's 3.3v outputs driving them reliably.
Now, however, I've encountered a type of pixels where the 3.3V high level of the prop is marginal. My proposed solution is to insert a diode between the power supply ground terminal and Vss of the prop, with the cathode side to power supply ground and the anode to the prop circuitry Vss.
Basically, Vss of the prop would then be at +0.7V with respect to pixel ground, and Vdd would be at +4.0 volts with respect to pixel ground. My output signals would have the same range. This would give me the margin I need at logic high, and still have plenty of margin at logic low.
It appears to work just fine, but I'm wondering if anyone sees a drawback to this approach.
The only other I/O on the system besides the pixels is a WIZNET ethernet module, and the ethernet is transformer-coupled, so it isn't affected.
Hopefully I can explain this clearly. I have a prop board that drives RGB pixels. Even though most pixel controllers are 5V chips, I have never had an issue with the prop's 3.3v outputs driving them reliably.
Now, however, I've encountered a type of pixels where the 3.3V high level of the prop is marginal. My proposed solution is to insert a diode between the power supply ground terminal and Vss of the prop, with the cathode side to power supply ground and the anode to the prop circuitry Vss.
Basically, Vss of the prop would then be at +0.7V with respect to pixel ground, and Vdd would be at +4.0 volts with respect to pixel ground. My output signals would have the same range. This would give me the margin I need at logic high, and still have plenty of margin at logic low.
It appears to work just fine, but I'm wondering if anyone sees a drawback to this approach.
The only other I/O on the system besides the pixels is a WIZNET ethernet module, and the ethernet is transformer-coupled, so it isn't affected.
Comments
-Phil
I fully agree that HCT is a better solution, but this is a retrofit to an existing board.
What is your pixel clock rate? If it's not too high, you could boost the Prop's output voltage to around 3.9V - 4.0V with a weak pull-up (>2.2K) to 5V by modulating dira instead of outa. For example, with a 5.1K pull-up, I'm seeing about a 140ns rise time from dira[0]~~ to dira[0]~, with outa[0] == 0 and no load.
-Phil
OK Mike, thanks for your comments. I do see a potential issue (so to speak!) if an output pin is shorted to ground.
That is a very clever idea, and one I wouldn't have thought of. Probably not enough drive capability for this application but I will keep it in mind for future use.
Alternatively using a schottky diode would a half-way compromise since 3.3 + 0.4 is 3.7V which is not as on-the-edge as 4.0V.
Here is the schematic of a bidirectional I2C interface to 5V devices. Its well proven. This can be used for any general level shifting applications. Note! this is basically an "open drain" circuit with pullup resisters on both sides of the MOSFET. If speed is important us 1K or even 470 ohm.
http://forums.parallax.com/showthread.php?134122
The actual interface is on the right hand of the schematic.
Operation:
Since this is an open drain circuit output and input is done a bit differently.
Preset the I/O pins with lows. Use the DIRA register as the output.
When DIRA set to an input the pin is high through the pullup resisters.
When DIRA set to an output the pin goes low.
Duane
Why not try a 'buffer' chip?
I use the 4049 for level shifting ... gives me six (inverted) and takes prop signals at 3.3 and up's them to 5v for whatever? I assume we're talking outputs only? Need another buffer to go the other way.
... Tim