how to display division on lcd


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Since PBP cannot deal with decimal you have to overcome the limitation in this way:

    dc = 100/5 (dc=20)

    LCDOUT $FE,1 ,"0.0",#dc

    display 0.020

    Al.
    ok ,thanks a lot
    Please give me one example : 1/8 =0,125

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by alexandro34 View Post
    ok ,thanks a lot
    Please give me one example : 1/8 =0,125
    Just as before, 1/8 *1000 = 125, do this because PBP only does integer math, this gives you the answer 125. Display as before LCDOUT $FE, 2, "0."#dc , Or as a European display LCDOUT $FE,2,"0,"#dc .
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. LCD display not working properly
    By dilpkan in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd February 2008, 07:43
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

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