A Little surprise with PbP 2.50 ...


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    PbP 2.50 LCDOUT doesn't work properly with characters
    which ASCII "number" is > 127 ( see ASCII Table ...)
    Hi Alain,

    OS version?
    What is the used language on you PC? English United States?

    Can you post a short program so that someone can try to
    compile it on a 100% English United States system?

    Best regards,

    Luciano

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Post

    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 " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default

    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
    Attached Images Attached Images  

  4. #4
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    I understand that you have a problem when you compile
    Code:
    LCDOUT $FE,$C0," ", SDEC2 Tair,"°C "
    where the degree symbol is not correctly translated in
    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

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    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 " !!!
    *****************************************

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    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.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Smile Thanks to Bruce ... the solution.

    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 " !!!
    *****************************************

Similar Threads

  1. PBP 2.50 and Longs
    By mikendee in forum GPS
    Replies: 1
    Last Post: - 21st May 2008, 21:16
  2. PBP 2.50 UPGRADE problems!!!!
    By earltyso in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 7th March 2008, 15:42
  3. Strange problem with PBP 2.50
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th October 2007, 20:45
  4. MCS+ with PBP 2.50
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st September 2007, 05:52
  5. New PBP 2.50?
    By Dave in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 9th September 2007, 19:14

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts