Posted Wednesday, October 21, 2009 @ 22:22:01
When designing a system one of the greatest most problematic things yo get rely easy is how to handle conditional comparisons and how to connect them to actions. The traditional ways are one reason to the fact that not all can actually handle a programming language.
In this software I wanted to create something simpler to understand.
Here an idea of sign bytes awakened and in my mind they are super simple to understand.
Start with a BYTE and set that to a value of $00 = 0 or $FF = 255 that means TRUE or FALSE.
Why is 0 = TRUE, the answer is easy, I wanted this system to direct correspond to the functionality of a button.
Normally you have a resistor from VCC connected to resistor number 2 down to GROUND. then you place a switch between ground and the mid point of this connection. When you press the switch you will create a very distinct "0" and since you are pressing the button this is a TRUE situation. The FALSE situation is when you release the button and your controller will report a "1" on the port pin, it is false, you are not pressing the button any longer.
With this as a base I thought that it was a simple and logic system to setup and a sign byte can handle as many or as few instances of control as needed without caring of where in order it will happen..