Expanding Inputs from "StampWorks"
TonyA
Posts: 226
Hi,
I am reading the "Experiment #24b: Expanding Inputs" from "StampWorks', using the shift registers.
I'm having a problem understanding how the program will determine the state of each individual switch. Does it just determine whether any switch is on or off, or does the program determine the state of each individual switch?
I need something like this:
If switch #1 is on then serout [noparse][[/noparse]this]
If switch #2 is on then serout [noparse][[/noparse]that]
etc. (for 24 sensors, so I will need 3 shift reg. IC's)
Thanks for any suggestions.
Tony A
Post Edited (TonyA) : 10/23/2005 1:34:47 PM GMT
I am reading the "Experiment #24b: Expanding Inputs" from "StampWorks', using the shift registers.
I'm having a problem understanding how the program will determine the state of each individual switch. Does it just determine whether any switch is on or off, or does the program determine the state of each individual switch?
I need something like this:
If switch #1 is on then serout [noparse][[/noparse]this]
If switch #2 is on then serout [noparse][[/noparse]that]
etc. (for 24 sensors, so I will need 3 shift reg. IC's)
Thanks for any suggestions.
Tony A
Post Edited (TonyA) : 10/23/2005 1:34:47 PM GMT
Comments
· IF (status1.BIT0 = 1) THEN
··· SEROUT TX, Baud, [noparse][[/noparse]"Button 1 pressed", CR]
· ENDIF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Tony A