Question about switches
I was wondering if I would be able to use this:
www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=119010
: with the propeller chip since i have no idea of what I can and can't use with the Propeller.
If yes where can I find code that would allow me to use it. Thanks.
www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=119010
: with the propeller chip since i have no idea of what I can and can't use with the Propeller.
If yes where can I find code that would allow me to use it. Thanks.

Comments
Post Edited (Mike Green) : 10/5/2006 4:00:34 AM GMT
That switch will work just fine. Here is a code example, that will cause LED 16 on the Demo board to "track" the state of the Button.
[b]CON[/b] Button = 0 'Input Pin { ┌─ +3.3V ┤ ┣─ P0 10k  └─ Vss } LEDpin = 16 'Output Pin [b]PUB[/b] MainLoop [b]Dira[/b][noparse][[/noparse]Button] := 0 'Make Button pin an INPUT [b]Dira[/b][noparse][[/noparse]LEDpin] := 1 'Make LED pin an OUTPUT [b]repeat[/b] [b]Outa[/b][noparse][[/noparse]LEDpin] := [b]Ina[/b][noparse][[/noparse]Button]Edit: Mike you beat me to it
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/5/2006 3:59:01 AM GMT
The schematic for the button is in the code.· If you are using a Propstick, then a resistor·and LED connected to P16 should work just fine for the code I provided.
LED P16 >---/\/\--->|---Vss 330Button _|_ o---o o--> +3.3V | P0 >---o | o--/\/\--> Vss 10K▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
www.radioshack.com/product/index.jsp?productId=2049718&cp=&origkw=Lever+Switch&kw=lever+switch&parentPage=search