Just a little more help
I'm sure the BS2 can do this, but I just want to check before I get too deep into reading the manual on how to program. I have a 4-bit binary code that I want to input into an I/O of the BS2, and depending on the code that is·input , I want it to toggle 6 different outputs. Does anyone have any examples on how this code would look?
Thanks again,
Ufaded
Thanks again,
Ufaded

Comments
After you've got the code the rest is easy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks again
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks,
Ufaded
' {$STAMP BS2} ' {$PBASIC 2.5} Switch VAR INA Leds VAR OUTH idx VAR Nib Reset: DIRH = %00011111 ' make P8 - P12 outputs Main: idx = (NCD Switch) - 1 LOOKUP idx, [noparse][[/noparse]%00011, %00001, %11101, %00010, %11110], Leds GOTO MainWith this little program the outputs (LEDs) will only change when a matched input is made.· Note that you are using four pins to get four selections; you could use two.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Thanks for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA