I am just starting to learn binary for programming ( The number system). I understand how to use binary for interrupts ( a ‘compare with value’ (input)
and an ‘input mask’ (mask)) ,for letpins = to set the pin high or low and letdirs = to set pins to inputs or outputs.
Is it possible to also use binary for comparing input states on pins
i.e.
original code
let dirs = %110 'make pins 1 and 2 , outputs
if input3 = 0 and input4 =0 then goto main
if input3 = 1 and input4 =0 then goto latch
if input4 = 1 and input3 =0 then goto unlatch
is something like this possible
if %00011000 = %00000000 then goto main
if %00011000 = %00001000 then goto latch
if %00011000 = %00010000 then goto unlatch
I have looked through the manuals ( RTFM ) and did not find anything helpful, which probably means it cannot be done.
All comments gratefully received.
Regards.
Lez.
and an ‘input mask’ (mask)) ,for letpins = to set the pin high or low and letdirs = to set pins to inputs or outputs.
Is it possible to also use binary for comparing input states on pins
i.e.
original code
let dirs = %110 'make pins 1 and 2 , outputs
if input3 = 0 and input4 =0 then goto main
if input3 = 1 and input4 =0 then goto latch
if input4 = 1 and input3 =0 then goto unlatch
is something like this possible
if %00011000 = %00000000 then goto main
if %00011000 = %00001000 then goto latch
if %00011000 = %00010000 then goto unlatch
I have looked through the manuals ( RTFM ) and did not find anything helpful, which probably means it cannot be done.
All comments gratefully received.
Regards.
Lez.