Shop OBEX P1 Docs P2 Docs Learn Events
How do you add multiple binary displays — Parallax Forums

How do you add multiple binary displays

kingspudkingspud Posts: 128
edited 2007-06-11 15:14 in BASIC Stamp
ok...· I will try to explain this so someone can help me.

Lets say I am using three definied VAR of word value

Digit0·· var word
Digit1·· var word
Digit2·· var word

and I first display the number 100 on the three displays...

Digit0 = $0100··· '· 16-bit word = %0000000100000000
Digit1 = $0200··· '· 16-bit word = %0000001000000000
Digit3 = $0301··· '· 16-bit word = %0000001100000001

The 1,2, and 3 represent each separate 7-segment display

Now I want to subtract 25 from the 100 total to get 75!

the final display setup should be as follows:

Digit0 = $0105··· '· 16-bit word = %0000000100000101
Digit1 = $0207··· '· 16-bit word = %0000001000000111
Digit3 = $0300··· '· 16-bit word = %0000001100000000

Ok...· how do I go from the first display setup to the second display setup?

How do I do the subtraction and keep each of the individual display settings for the 1,2, and 3 displays?

Thanks for the help

Joe

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-11 14:18
    Joe,

    You define Digit0, Digit1 and Digit2, then in all your examples you use Digit0, Digit1 and Digit3. Also, what 1, 2 and 3 are you referring to?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-11 15:14
    Just realized this is already being covered in another thread. Please post all replies to the following thread.

    http://forums.parallax.com/showthread.php?p=655350

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.