5v Devices - level Shifter Module
Areal Person
Posts: 197
Hi,
Can I use this module to provide Bi-Directional level shifting to my propeller
project so that I can interface 5vdc components ?
http://www.futurlec.com/Mini_Logic.shtml
It looks like a good price.
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
Can I use this module to provide Bi-Directional level shifting to my propeller
project so that I can interface 5vdc components ?
http://www.futurlec.com/Mini_Logic.shtml
It looks like a good price.
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
Comments
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Normal way:
dira[noparse][[/noparse]0..7]~~
outa[noparse][[/noparse]0..7] := byte
To drive your outputs as "open collector" with pullups:
dira[noparse][[/noparse]0..7]~
outa[noparse][[/noparse]0..7]~
dira[noparse][[/noparse]0..7] := !byte <- notice the inversion
when dira is 1, the output is pulled low. Whenever dira is 0, the output is high impedance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
dira[noparse][[/noparse]7..0] := byte. Otherwise the bits will be reversed, right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
The diode will prevent the 5V device driving this line high. It has less draw-backs than a series resistor...
Post Edited (deSilva) : 9/6/2007 9:44:39 PM GMT
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I'm afraid I might be phobophobic.
Reading the complete article www.sparkfun.com/commerce/present.php?p=Sensor-Interfacing is also instructive
However: I just see an error in it: The pull-ups must be connected to +5V.
I'll change the original image and download a modification!
Post Edited (deSilva) : 9/7/2007 6:06:19 AM GMT
deSilva, what wasn't immediately clear from your diagram was the logic direction which you and I may be aware of but the circuit may well be used by somebody going from the 3.3V device as master. Arrows help in this regard. Also if SCK is coupled with a 10K current limit to the 3.3V device then why is CS and MOSI not using the exact same circuit which is all that would be required anyway?
BTW, configuring open-collector/open-drain style outputs by setting the direction register does not give a true OC output as the "collector" will still breakdown (conduct) when the pull-up voltage goes beyond the 3.3V supply. True OC outputs are just that, they don't have any deactivated components connected to the collector. The deactivated pch fet has an intrinsic diode structure from the output pin to VDD that conducts once the output pin is higher than the VDD regardless of whether or not the transistor is active.
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Note that three different solutions are given in the schematic , you can use depending on uni- or birectional use. I consider the third solution (pull-up + diode) highly recommendable...