??? 06/25/09 12:54 Read: times |
#166455 - Hasn't Maarten already explained this? Responding to: ???'s previous message |
See: http://www.8052.com/forum/read/166431
Giang Ho said:
I have tried to send the data (unsigned char)... What is the size of an unsigned char, in bytes? I found out that if I send the data value in between:
a. 256 to 32767, I will get correct result on the PC's terminal. b. 255 and less than, I will get garbage on the terminal (e.g. if 255, get 65535, or if 254 get 512) c. 32768 and more than, I get 0 on the terminal. What is the maximum range of values that a variable of type unsigned char can hold? Note that I am using Keil uVsion3. Note that the Keil Documentation contains specific notes & guidance about using printf with single-byte values... |