Expanding inputs, using shiftin
TonyA
Posts: 226
Hi,
I'm just learning about using shiftin. Would it be possible to shiftin 12 bits and assign each bit a separate variable?
shiftin datapin, clockpin, mode, [noparse][[/noparse]var1\1, var2\1, var3\1, ... var12\1]
I am using a shift register that will send out the state of 12 switches to the stamp. I need to read the state of each individual switch. var1 is the variable for the state of the 1st switch, etc. I am putting one bit in each variable.
Do I have this right?
Thanks for any help.
TonyA
I'm just learning about using shiftin. Would it be possible to shiftin 12 bits and assign each bit a separate variable?
shiftin datapin, clockpin, mode, [noparse][[/noparse]var1\1, var2\1, var3\1, ... var12\1]
I am using a shift register that will send out the state of 12 switches to the stamp. I need to read the state of each individual switch. var1 is the variable for the state of the 1st switch, etc. I am putting one bit in each variable.
Do I have this right?
Thanks for any help.
TonyA
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com