Depending on what you need...
T VAR BIT
B VAR BYTE
T = ~PORTB.0 ; Single pin
B = ~PORTB ; Invert Full Port
B = PORTB ^ %00000001 ; Read full port and invert bit 0
OR, if you meant Analog values, simply subtract the value from the highest possible A/D reading.
; --- For 8bit results ---
ADCIN 0, B
B = 255 - B
; --- For 10bit results ---
ADCIN 0, W
W = 1023 - W
<br><br>
Bookmarks