Hi, Luciano
Ooops !!! Not Asciii characters but LCD Characters ( so, no link to OS or machine ... or version of English ... LOL )
If the Highest bit of the Character code is set ... Wrong Output !!!
Just try this line, whatever the processor :
LCDOUT $FE, 1, "°öµC"
and look at what displayed.
Alain
Last edited by Acetronics2; - 15th October 2007 at 10:29.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
OK, Alain. I got it. To be sure of what you typed and what I did see on screen I converted to image and attached it. So is this what you really typed? My system is English-Greek.
Ioannis
Hi Alain,
I understand that you have a problem when you compile
where the degree symbol is not correctly translated inCode:LCDOUT $FE,$C0," ", SDEC2 Tair,"°C "
the corresponding LCD character.
Are you sure that during the source code parsing the compiler
gets the correct character? This is why I suggested to try on
a 100% English United States system.
Best regards,
Luciano
Luciano,
There was no problem with 2.47 release
so, Understand that is not my problem ... but melabs' !!!
I've had a quick look to see if I could debug it by myself ... just found the problem occurs with > 127 ASCII input ( keyboard ) values.
I'm just a system user ... and my computer knowledge stops at the letters stamped on my keyboard !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
ASCII characters with the high bit set are extended ASCII codes. As far as I know, all
compilers that accept ASCII codes between the double quotes only work with standard
ASCII codes. Not extended codes.
I have tried your example with extended ASCII codes "°öµC" with versions 2.47 and 2.5
of PBP, another BASIC compiler, and two C compilers. They all output the same garbage
where each extended ASCII character is between the quotes. All non extended codes
print as expected.
PBP 2.50 seems to be the only compiler that shows the warning, but they all print junk
on my LCD where extended ASCII codes are located in the string, between the "".
Did you get PBP v2.47 to actually print these extended ASCII characters "as shown", in
between the " " on your LCD, or did it just not throw the warning?
I'm just curious because I get the same results with 5 different compilers.
Hi, Bruce
... I've used a lot of DS1820 temp monitors without noticing anything for years.
BUT ... having a further look to those programs, I notice I've ever used the HEX value ( $DF ) ... instead of the " ° " Keyboard input ...
a try ( 2.47 and 2.50 ) gives not garbage ... but characters from the 128-256 code section of the characters map.
And now, we've a Warning !!!
One more notice to add to my poor old manual ... there might be a blank page between two command ones ... to add one's comments. LOL.
So, Let's keep in mind that Complementary table can only be accessed sending HEX Values ... like here:
Lcdout $fe, 1, DEC (temperature / 100), ".", DEC2 temperature, " ",$DF,"C"
Alain
PS : Pfouuuuu, I was not so far from the RTFM !!! ...
Last edited by Acetronics2; - 15th October 2007 at 14:08.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks