From: <tim...@co...> - 2007-01-18 00:03:26
|
Hi Dave, Yes, I agree, KISS. Funny thing is I was just revieving our customer schematics and they used a switch connected to a resistor to ground without pull up. I tried to tell them it would not work, but they blew me off suggesting software people should not be looking at schematics. ;-) Tim BTW: Since this question has been asked more than once on this forum, maybe we sould do a wiki page? -------------- Original message ---------------------- From: "Dave Hylands" <dhy...@gm...> > Hi Tim, > > > Would it be possible to have a switch connected to ground > > via a resistor, than program the gpio as output, program it > > high then enable the edge detect interrupt to detect a falling > > edge? > > Programming the edge detect interrupt requires that it be configured > as an input. You really don't ever want to run the risk of having the > pin configured as an output when the input might be connected to a > different voltage (say the switch is closed). > > Since you'd need a resistor anyways, why not just connect it up in the > conventional manner? > > Here are the two conventional ways of connecting a switch. > > 3.3v ---\/\/\/\/-----+-----o/ o----- Gnd > > GND ---\/\/\/\/-----+-----o/ o----- 3.3v > > Where the + goes to the input. > > -- > Dave Hylands > Vancouver, BC, Canada > http://www.DaveHylands.com/ > > ------------------------------------------------------------------------- > 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 > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users |