Thank you for a very clear explanation.
There should be a Gumstix MVP program established, and I feel you should get to be the first one.
> > > That driver responds only to falling edges on the GPIO line, right? I'm
> > > somewhat surprised that it would do this - it would be more generally
> > > useful to respond to a falling or rising edge on the GPIO I would have
> > > thought, but I guess it is just an example.
> > Yes. The assumption was that the input is pulled high, and closing the
> > switch connects the input to ground.
> Could you please elaborate about the part about input being pulled high, for
> someone who does not have as much electronics knowledge? Thanks -
So simple switches are normally of the momentary SPST (single pole
single throw) variety. They're either closed (conducting) or open
If you connect one side of the switch to ground and the other side to
your GPIO, that gives you a good solid ground connection when the
switch is pushed. When the switch is not pushed, then the input is
floating and the input will tend to follow other inputs around it (due
to an effect called capacative coupling).
So you typically add a resistor, commonly called a pull-up resistor,
which pulls the input up to whatever the logic high voltage is. The
resistor is typically 10k ohms or higher.
Now when the switch is open, the resistor will pullup the signal to a
logic high, rather than leaving it floating.
You can also reverse things, and have the one side of the switch
connected to the logic high voltage (say 3.3v) and the other side
connected to the input. Now the resistor would connect between the
input and ground, and it would be referred to as a pull-down resistor.
In the days of TTL logic, almost all resistors were pullup, since TTL
could do a really good job of driving a signal to ground and a not so
goof job of pulling it high.
In todays world, almost everything is CMOS, and CMOS can do just as
good a job of pulling something high as low, so you can now do things
more at your convenience, rather than the hardwares convenience. So
choosing pullup or pulldown is rather arbitrary.
Vancouver, BC, Canada
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
gumstix-users mailing list