Value on LCD


Closed Thread
Results 1 to 6 of 6

Thread: Value on LCD

  1. #1
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302

    Default Value on LCD

    I have this code:

    COUNTa var word
    COUNTH var word
    COUNTL var word
    FRE var word
    FR var byte

    COUNTa = 1954
    COUNTH = COUNT/5
    COUNTL = COUNT//5
    FR = COUNTL*2
    FRE = COUNTH

    LCDOUT $FE,1,DEC FRE,".",DEC FR

    on Lcd show 390.625 instead of 390.16
    Why;
    Last edited by savnik; - 28th June 2007 at 14:33.

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


    Did you find this post helpful? Yes | No

    Default

    Hi, Savnik


    Supposing it's : LCDOUT $FE,1,DEC FRE,".",DEC FR

    Let's see :

    1954 / 5 = 390 ... = COUNTH

    1954 // 5 = 1954 - ( 390*5 ) = 4 = COUNTL

    4*2 = 8 = FR

    should show 390.8 ...

    BUUUUUUUt COUNT is a RESERVED WORD !!!

    change it for COUNTx ...

    SUCCESS !!!

    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
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Savnik

    BUUUUUUUt COUNT is a RESERVED WORD !!!

    change it for COUNTx ...

    Alain
    I know and i change to COUNTa

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Question

    Is it Ok ???

    My LCD showed 390.8 ... not 390.16, on the Bread board.

    and : LCDOUT $FE,1,DEC FRE,".",DEC FRE ( as you wrote - I've supposed it was a typo - ??? )

    should show 390.390 ...



    Alain
    Last edited by Acetronics2; - 28th June 2007 at 14: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 " !!!
    *****************************************

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    and : LCDOUT $FE,1,DEC FRE,".",DEC FRE ( as you wrote - I've supposed it was a typo - ??? )
    the right is :
    LCDOUT $FE,1,DEC FRE,".",DEC FR

  6. #6
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Is it Ok ???
    yes , now it's ok

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

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