monkeyhead
Member
Unregistered said:What I don't understand is why all your examples are written using bits only?
Why are all the examples only in bits
hey clint,
for the purpose of examples, bits are easy to work with and convey the intent of using real i/o addresses just as well.
and some programmer's prefer to map all their I/O to bits.
for example:
I:0/1 B3:0/1
---| |---------------------( )----
map an input to a bit
B3:1/1 O:1/1
---| |---------------------( )----
map a bit to an output
then use the bit addresses instead of the actual i/o addresses throughout the rest of the program
this offers a huge advantage if an input or output goes bad. then only one rung needs to be changed to re-assign the bad i/o to another location, instead of having to replace every instance of the bad i/o throughout the program.