A Little surprise with PbP 2.50 ...


Closed Thread
Results 1 to 31 of 31

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    It is a bit confusing I guess, but maybe this will help explain it.

    When you place the degree symbol inside quotes like this "°" the value gets converted to
    $B0.

    If you send $B0 to a terminal program like this: HSEROUT [$B0] it will display the ° symbol.
    If you try this with LCDOUT, the value of $B0 displays a - symbol. Which is what it should
    be if you look at the LCD data sheet.

    You can use extended ASCII characters like "°öµC" with no problem if sending it to an ASCII
    terminal program, and it displays each character just fine. It's just no going to produce what
    you might expect when formatting data like this for an LCD display. The compiler "assumes"
    data is being formatted for an ASCII terminal.

    HSEROUT ["º°A",13,10] ' prints º°A to an ASCII terminal. These were entered with ALT 167,
    and ALT 248 on the numeric keypad.

    LCDOUT $FE,$C0,"º°A" ' produces ]-A on an LCD, but LCDOUT $FE,$C0,"[]{}!@#$%^&*()_+"
    prints everything as shown.

    Why 2.5 throws the warning up I'm not sure, but it's probably something they should look
    into. Or at least indicate in the manual that ASCII codes >127 aren't supported in quotes.
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Smile The official answer ...

    Hi, Bruce,

    thanks for your enlightments.

    find here the answer from Melabs :

    "
    For special characters such as this, it is better to specify the
    character using its numeric ASCII code. I believe this will work:

    LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

    I believe you could ignore the warning and the display would be
    correct, but it's always a good idea to resolve warnings as they come
    up.

    Charles Leo
    microEngineering Labs, Inc. "

    Solution confirmed ... and thanks to melabs.

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

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


    Did you find this post helpful? Yes | No

    Default

    Assuming Tair = 32d;

    Which version prints 32°C on your LCD?

    LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

    or;

    LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

    or;

    LCDOUT $FE,$C0," ", SDEC2 Tair, 223, "C "
    Regards,

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

  4. #4
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    My guess: b)
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Assuming Tair = 32d;

    Which version prints 32°C on your LCD?

    LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

    or;

    LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

    or;

    LCDOUT $FE,$C0," ", SDEC2 Tair, 223, "C "



    Hi, Bruce

    Seems Charles made a little mix ...

    LCDOUT $FE,$C0," ", SDEC2 Tair, $DF, "C "

    Works fine on my testboard with every release ... and shows " xx°C " ( xx is SDEC2 Tair )

    The special character code ( use HEX !!! ) is to read from your Display Datasheet table.


    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
    Nov 2003
    Location
    Greece
    Posts
    4,174


    Did you find this post helpful? Yes | No

    Default

    Well, if $DF works then 223 will work too, isn't it?

    Ioannis

    P.S. to Alain. Have you seen the image of the LCDOUT command that I posted on #13? Is this what you typed?

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


    Did you find this post helpful? Yes | No

    Wink

    Hi, Ioannis

    Quote Originally Posted by Ioannis View Post
    Well, if $DF works then 223 will work too, isn't it?

    > I don't know ... exactly, I don't remember !!! ... the code is given in HEX in the Displays Datasheets ... may be the reason is here !!!

    > Will give a TRY in the following minutes ...

    Ioannis

    P.S. to Alain. Have you seen the image of the LCDOUT command that I posted on #13? Is this what you typed?
    >> EXACTLY !!!

    Have a nice day

    PS: I saw the "Parthenon" had lost some altitude ... Gods will be furious ...
    Last edited by Acetronics2; - 16th October 2007 at 09:41.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,174


    Did you find this post helpful? Yes | No

    Default

    I am sure some believers of the old religion will be furious. As for the "gods", I really don't care! They were too human!

    Just being curious, what is the meaning of the symbols you were trying to display? I mean OK with the degrees symbol, but the other two?

    Ioannis

  9. #9
    Join Date
    Sep 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Thanks for the solution

    Quote Originally Posted by Acetronics View Post
    Hi, Bruce,

    thanks for your enlightments.

    find here the answer from Melabs :

    "
    For special characters such as this, it is better to specify the
    character using its numeric ASCII code. I believe this will work:

    LCDOUT $FE,$C0," ", SDEC2 Tair, $B0, "C "

    I believe you could ignore the warning and the display would be
    correct, but it's always a good idea to resolve warnings as they come
    up.

    Charles Leo
    microEngineering Labs, Inc. "

    Solution confirmed ... and thanks to melabs.

    Alain


    Taking note.....

Similar Threads

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