character lcd 4 lines


Closed Thread
Results 1 to 5 of 5
  1. #1
    jojokatada's Avatar
    jojokatada Guest

    Default character lcd 4 lines

    lcd 4 line
    hi anybody could help me how to display a 4 line character lcd.

    sample code

    main:
    pause 1

    lcdout $fe,1," Hello world", $fe,c0," hello again" ,fe,94,"welcome" fe,d4,"thank you"

    goto main

    end

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Jojo,

    Chances are, you have two enable lines... one for the top 2 lines and one for the bottom two lines..

    Do a search on LCD in this forum... here is a example of a search

    http://www.picbasic.co.uk/forum/show...ghlight=LCD%2A

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    OR you forget to include

    DEFINE LCD_LINES 4

    Also try to increase you start up delay to 1 second.


    is your LCD display something??? at least on the 2 first line.

    I agree with DWAYNE, your LCD probably have 2 enable line if it's a 4X40 one.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    jojokatada's Avatar
    jojokatada Guest


    Did you find this post helpful? Yes | No

    Default 4 lines lcd

    hi thank for help

    i am using 4x20 lcd

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    It will be hard for us if you don't provide any info of your hardware connection, crystal speed and the PIC you're using.

    Let's assume you use the same connection in the PBP manual.

    Usually 4X20 LCD don't have 2 enable line. BUT some will need to place the 4 unused data bit to ground

    Try with this snippet and let us know.

    Code:
    DEFINE OSC 4 ' Using 4 MHZ crystal
    DEFINE LCD_LINES 4 ' Using a 4 lines LCD
    
    pause 1000 ' wait LCD start-up delay 
               ' 
               ' P.S.: it can be higher or lower depending of
               '       the model you're using
               
    Start:
          lcdout $fe,  1,"Line 1",_
                 $fe,$c0,"Line 2",_
                 $fe,$94,"Line 3",_
                 $fe,$d4,"Line 4"
    Here:
         goto here
    this one should work.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. 4X20 TRULY LCD PPB lines 3 & 4
    By earltyso in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th January 2007, 09:11
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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