Just thinking here....
What you might be seeing is that in a single statement "Report = (~Bell) + 48", is that PBP is treating the combination of the alias and the assignment to "Report" as a byte output computation.
If that is the case, then the output is as expected.
Byte variables are unsigned, so a bitwise not of 0 = 255 and 1 = 254.
Which would give you the 47 and 46 values you are seeing. 255+48=47, 254+48=46
This is most likely also happening for the Logical Not as well.
To test:
Bell var PORTB.6
Report var byte
MyPin var bit
MyPin = Bell
MyPin = ~MyPin 'this will force the bitwise Not at the bit variable level
Report = MyPin + 48
MyPin = Bell
MyPin = !Mypin 'This will force the logical Not at the bit variable level
Report = MyPin + 48
Output the two operations and see what you get then.
Bookmarks