I'll lead you by the hand on this...
If you type a number 4 on the PC (eg Hyperterminal), it sends a character, but it doesn't send a numeric value of 4 as you expect, it sends something quite different...
Do you have a BASIC Interpreter on your PC (like GWBasic or QBasic or VisualBasic)?
Find out what happens when you do this...
Print asc("4")
and then this...
Print chr$(52)
what appears on your screen?
Look up what the ASC instruction does in BASIC (I'm not taking about PIC BASIC here but a BASIC that you can run on your PC). The ASC instruction will lead you to understaning the relationship between a string "4" and a numeric decimal 52. It will lead you to a TABLE of CODES... this table cross-references numeric values with displayable values... I'm trying hard not to give you the name of this table, that is for you to find out and tell me.
Now I know you say that "Read the Manual" is my answer to everything, but I'm insisting that you go to the MeLabs website, and download the latest manual. The TABLE of CODES are in an Appendix in the BACK OF THE MANUAL. Look for it.
I've also looked at your pictures... I'll guarantee this code table will be found in every one of your PICBasic Books.
Bookmarks