Shop OBEX P1 Docs P2 Docs Learn Events
Four-bit binary input — Parallax Forums

Four-bit binary input

walkboneswalkbones Posts: 30
edited 2006-11-27 21:58 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-27 21:58
    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
Sign In or Register to comment.