Question about I/O and configuring
James Long
Posts: 1,181
Ok....I have a major project I'm working on.....and need to know something.
I'm working on a system that will use n channel mosfets.· I want to control the mosfets with the propeller.
I do not want the propeller to prematurely initiate the mosfet to the "on" condition.
What is the best method of doing this?
Is it possible the Prop could possibly do this on power up?· During the change of direction(input to output)? any other situation (other than incorrect programming)?
Chip.....Chris....anyone else?
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
I'm working on a system that will use n channel mosfets.· I want to control the mosfets with the propeller.
I do not want the propeller to prematurely initiate the mosfet to the "on" condition.
What is the best method of doing this?
Is it possible the Prop could possibly do this on power up?· During the change of direction(input to output)? any other situation (other than incorrect programming)?
Chip.....Chris....anyone else?
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Ok....so a pull up/down resistor should be on the gate of the NMOS. Which I already have in the design.
I was thinking a pull up with a NMOS in a sink situation, but my logic may be backwards......it does happen with my age gettin up there.
What about the time when I go (DIRA, and OUTA right after another)? How fast does this transition take......
What condition does an output start in? (High or Low). I know I have read this somewhere....but I can't seem to find it in the manual.
EDIT.....I didn't change the post....because someone else may have the same question. But I think I have found my answer. Because I/O is configured during boot.......there would be no transition from input to output. The pin would just become output high (or low depending on the setting) when the propeller is put into motion.
If I am wrong.....just let me know.......this is an issue I haven't thought of before. /EDIT
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
Post Edited (James Long) : 3/8/2008 1:36:32 AM GMT
I can't do 50 ns.....that could be a bad thing.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
Since you are the one I've been talking with......can this be done as well in Spin?
Thanks,
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
Adjusting for appropriate pins of course. In fact you could do
If you want to do it the other way around in spin than the delay will be longer than 50ns.
That helps a lot........I will stick with spin on the part of the project....and will make sure I set the pin high before I set it to an output.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
The mosfet is an N channel in·sink mode. My logic states (can be wrong), that I need the pin high to prevent the mosfet from conducting.
So I will put a pull up resistor on the base (already done actually) and set the pin high before making it an output.
So when I want the NMOS to conduct,·it will actually be reverse logic. Take the output low to turn the NMOS on.
It is confusing.....that is why I always want a second, third, fourth pair of eyes to make sure I'm not confused.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
I think that you are getting NMOS and PMOS confused. Don't PMOS conduct with a low and stop conducting with a high? In the attached picture the top mosfet is a PMOS and the bottom is NMOS. As shown, the bottom mosfet (NMOS) is conducting with a high on the gate.
But this does depend of if we are soucing or sinking current.....correct?
I don't remember....it's been many moons since I did transistor theory....and the propeller makes it too easy to mostly not have to think about.
EDIT:Steven after going back and looking....you are right.....I was thinking a N channel was like a PNP. It is not....it is like·a NPN.
This website cleared it up: http://hades.mech.northwestern.edu/wiki/index.php?title=Driving_using_a_single_MOSFET&printable=yes
But thanks for the information anyway......that information will come in handy at some point. (changing logic level, before changing to output)
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother LLC (SMT Assembly Services)
Post Edited (James Long) : 3/8/2008 3:27:01 AM GMT