Hi,
What kind of result do you expect?
There's only one thing that can be stored in a variable and that is numeric values. Those values can represent different things but that's totally up to us humans.
If the variable contains the value 0 the LCDOUT routine will send the character code for the letter zero - as long as you use the BIN, DEC, HEX modifiers.
If you don't use any modifier it will send the value exactly as it's stored in the variable, ie it will send 0. Look at the character map of the LCD to see what character that represents.
If you're grabbing ASCII data and putting that in the variable then you're not storing the number 0 in the variable, you're storing the number 48 which is the ASCII code for the letter 0. So if you want to compare your variable with that you need to do IF Unit = 48 or IF Unit = "0" - which is the exact same thing to the PIC.
/Henrik.
Bookmarks