Displaying a decimal larger than 255 on LCD?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by djmachine View Post
    Hello. Exactly as the title states.. how do I display a decimal larger than 255? I am storing a count in two bytes in an array and would like to display the 2 bytes as a decimal on the LCD which can be 0 - 65535?

    Thanks!

    how about:

    Code:
    MyWord = LowByte + HighByte << 8  ' Multiply HighByte by 256 (left shift 8) and add LowByte
    
    LCDOUT $fe,$1, MyWord
    Aratti had it right in post #4 I think, except I did it with leftshift instead of multiply by 256. Same thing...


    Steve
    Last edited by Byte_Butcher; - 10th March 2009 at 02:45.

Similar Threads

  1. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  2. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. 32 bit data displaying on LCD
    By selahattin in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th September 2006, 13:33
  5. 32 Bit Decimal Displaying On LCD
    By selahattin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th January 2004, 19:24

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