Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Re: My programm didn't works Kategorie: Programmierung Basic (von Achim - 29.10.2006 15:42)
 Als Antwort auf Re: My programm didn't works von Hans - 29.10.2006 13:02
Achim nutzt:  CC1-Station V1.1
> Thanks for your answer
> I know that the NOR isn't correct
> but the AND isn't correct too
> because
>
>  Temp=&B00000001
>  IF AdIn>140 THEN Var1=Var1 OR Temp ELSE Var1=Var1 AND Temp
>
> IF VAR1=1101
>    AND  0001(Temp)
>       = 0001
>
> there must be a simpel sollution
> but I don't see it.

The simple solution is to read my previous answer more thoroughly. ;-)

You have to AND VAR1 not with Temp, but with the 1's-complement of Temp. I even posted some examples to prove it to you. :-/

VAR1=1101
TEMP=0001
VAR1=VAR1 AND NOT TEMP

= 1100
Bingo!

Bye
 Achim

 Antwort schreiben

Bisherige Antworten:

Re: My programm didn't works (von Hans - 29.10.2006 17:27)