LCD displaying problem..


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by GrandPa View Post
    First of all, I wonder about this line: LCDOUT $FE,$8D, DEC speed, "km/h "
    --- > $8D ??? I think you meant $80 (beginning of first line)

    Then, if it's the case you can use:

    If speed < 100 then X= 1
    If speed < 10 then X = 2
    LCDOUT $FE,$8D + X, DEC speed, "km/h"


    Cleaver!
    Whilst that would keep the "km/h" in the same position on the screen it WONT clear text that is previously written which is why you need to print spaces.

    With the above code you would get the following

    9 would give "9km/h"

    49 would give "49km/h"

    103 would give "103km/h"

    but when the speed drops you would get the following problem due to not clearing the leading digits

    87 would give "187km/h" (the "1" not being cleared)
    5 would give "185km/h" (both the "1" and the "8" not being cleared)
    Last edited by keithdoxey; - 29th July 2007 at 12:29. Reason: keyboard is getting knackered and some letters were missing!!!!
    Keith

    www.diyha.co.uk
    www.kat5.tv

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 09:28
  2. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 20:48
  3. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 16:47
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 12:43
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07

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