How do you add multiple binary displays
kingspud
Posts: 128
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
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
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
http://forums.parallax.com/showthread.php?p=655350
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support