Melanie,
OK, look at this (more complicated)
Flag_Switch_activ_on_ Var Bit (1=activ on high, 0=activ on low)
Switch Var PortC.0
Is_Switch_aktiv Var Bit
Is_Switch_aktiv= ( Flag_Switch_activ_on_ = Switch )
(In Pascal ^ you would use ":=" in order to see the difference between a "fill that variable" and "compare/eqal")
In words: If the content of "Flag_Switch_activ_on" is the same as the content of "Switch", the variable "Is_Switch_activ" should be set.
If the second "=" would be changed to a "<>", it is easy to use a "^" XOR instead...
I have managed it in another way, maybe I write this missing macro on my own... ;-)
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks