PDA

View Full Version : Four-bit binary input



walkbones
11-28-2006, 03:20 AM
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

Chris Savage
11-28-2006, 05:58 AM
Dan,
·
·· 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