Have you tried using the DEC modifier before sign?
Have you tried using the DEC modifier before sign?
I load the variable with:
If I use DEC then my output is messed up. I did try it though and it does output.Code:if temp.8 = 1 then ' If bit8 of temperature is set then its negative sign = 45 ' Indicate temperature is NEGATIVE temp.lowbyte = temp.lowbyte ^ 255 ' Reverse the bits of the lowbyte of TEMP sign = 160 ' Indicate temperature is POSITIVE endif
Try this;
Code:if temp.8 = 1 then ' If bit8 of temperature is set then its negative sign = "-" ' Indicate temperature is NEGATIVE temp.lowbyte = temp.lowbyte ^ 255 ' Reverse the bits of the lowbyte of TEMP sign = "+" ' Indicate temperature is POSITIVE endif
I don't understand what it actually is that I'm sending since there is nothing displayed in the serial window. It just keeps increasing by 6 bytes at a time.
How do you know it's increasing if there's nothing showing in the serial window?
I'm using the Serial Communicator in MCSP which display TX and RX in the bottom status bar.
Bookmarks