Lcd Hd44780


Closed Thread
Results 1 to 2 of 2

Thread: Lcd Hd44780

  1. #1
    Join Date
    Oct 2006
    Posts
    6

    Smile Lcd Hd44780

    Hi All

    i am use pic16f84a and hd44780 and i am connect the circuit and prgramed
    this code
    ' PicBasic program to demonstrate operation of an LCD in 4-bit mode
    '
    ' LCD should be connected as follows:
    ' LCD PIC
    ' DB4 PortA.0
    ' DB5 PortA.1
    ' DB6 PortA.2
    ' DB7 PortA.3
    ' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
    ' E PortB.3
    ' RW Ground
    ' Vdd 5 volts
    ' Vss Ground
    ' Vo 20K potentiometer (or ground)
    ' DB0-3 No connect

    Pause 500 ' Wait for LCD to startup

    loop: Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "Hello" ' Display Hello
    Pause 500 ' Wait .5 second

    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "World"
    Pause 500 ' Wait .5 second

    Goto loop ' Do it forever
    and the output only draw blockes in first line
    please heeeeeeeeeeeeeeelp meeeeeeeee
    Attached Images Attached Images  

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi alaaodeh,

    First off, are you using PICBASIC compiler or PICBASIC PRO compiler? LCDOUT is not a valid statement in PICBASIC. Secondly, if you have the manual for the PICBASIC PRO compiler, there are samples for using this type of display with the 16F84A. Just looking at what you posted, where are the DEFINES that tell the PIC what you are doing with the LCD? Whatever you put after the ' are ignored by the compiler.

    As for the blocks on the screen, this could be several things. The LCD controller might not be getting initialized properly or you may need to adjust the potentiometer for contrast.

    There are numerous threads on this forum that deal with this exact subject matter. Take some time, use the SEARCH function, and look around a bit.

    You aren't the first person to go through this learning process. But I can assure you that what you need to learn is on this forum already.

    If you don't have the manuals, you can download them from the ME Labs website: www.melabs.com


    BobK

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 : 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