Four-bit binary input
walkbones
Posts: 30
Hi,
I'm looking for the simplest way to take a four-bit input and decode the result. I'm checking the 4 input pins,· after I recieve the Data·Vaild input, and·when I get 1100 or 0110 I want to jump to the section of code for input·3 or input 6 and so forth. What is the best approach for this application? I'd appreciate any help.
Dan
I'm looking for the simplest way to take a four-bit input and decode the result. I'm checking the 4 input pins,· after I recieve the Data·Vaild input, and·when I get 1100 or 0110 I want to jump to the section of code for input·3 or input 6 and so forth. What is the best approach for this application? I'd appreciate any help.
Dan
Comments
·
·· Since it will still be a valid number you could use the BRANCH command and list 16 labels to go to based on the actual value of the input.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support