Re: Wierd result when inverting an input
It seems that two tildes are simply ignored.
not at all !
PORTB = ~ PORTB ' Invert every bit in PORTB
result = ~ (PORTB & %00001111)
'Invert the result of the & operation
manual $ 3.2.4 ...
if you invert twice ... you get the original value !!!
did you try ...
Code:
Report = (~ Bell ) + 48 ...
probably not !
Alain
Last edited by Acetronics2; - 19th June 2015 at 19:51.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks