LCD 4x20 HD44780


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Same as any other LCD

    Hi,

    You connect the LCD as any other like the 2x16. Read your PBP manual. If still unclear post specific queries. Here is a sample LCD defination :
    Code:
    'LCD DEFINATION*****************************************************************
    
            DEFINE LCD_DREG PORTD       ' Set LCD Data port
            DEFINE LCD_DBIT 4           ' Set starting Data bit (0 or 4) if 4-bit bus i.e, PortD.4-PORTD.7
            DEFINE LCD_RSREG PORTB      ' Set LCD Register Select port
            DEFINE LCD_RSBIT 0          ' Set LCD Register Select bit i.e, PORTC.5
            DEFINE LCD_EREG PORTB       ' Set LCD Enable port
            DEFINE LCD_EBIT 1           ' Set LCD Enable bit i.e, PORTE.4
            DEFINE LCD_BITS 4           ' Set LCD bus size ot 4 bit Upper Nibble (4 or 8 bits)
            DEFINE LCD_LINES 4          ' Set number of lines on LCD to 4 Lines
            DEFINE LCD_COMMANDUS 2000   ' Set command delay time in us
            DEFINE LCD_DATAUS 50        ' Set data delay time in us
    
    '*******************************************************************************
    Regards

    Sougata

  2. #2
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Only one problem with the previous post, picbasic doesn't support LCDOut or any of the defines. You would need to upgrade to PRO to do it this way. That being said you may want do a little searching here or on the web. BasicStamp LCD routines should work fine for what you are doing.

  3. #3
    inteco's Avatar
    inteco Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for your reply.
    I'm using PBPro version. When I watch carefully to the LCD, I got
    the display output, but it is very blur and almost invisible.
    Only viewable from a certain angle. I already adjusted the pot for
    the contrast pin from 0-5 Vdc, 0 Vdc still the best, but still
    unreadable. Wish there are more space to turn the pot beyond the
    pot.
    Wonder if there is any type of LCD that need negative voltage
    at the contrast pin ?

  4. #4
    inteco's Avatar
    inteco Guest


    Did you find this post helpful? Yes | No

    Default

    In fact, I got 2 x 16 LCD, and they all work find with the code,
    only the 4 x 20 LCD that has contrast problem.
    Thanks

  5. #5
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default LCDs are temperature sensitive

    Hi,

    Try using a negative supply. If you are using a Centre tapped transformer then you may derive it from there. An onboard Hardware PWM with a diode-cap charge pump can do the same. MAX232 has an onboard charge pump (-12V) available on its VEE pin. So a little experimentation would solve your problem
    Regards

    Sougata

  6. #6
    inteco's Avatar
    inteco Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks guy.
    Will experiment with negative voltage later this weekend,
    hope I won't burn my LCD : -)

  7. #7
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    If you do not want to damage your 4x20 then read the 4x20 datasheet before trying anything else. I have several brands of 4x20s in use and none require a negative voltage on the contrast pin. Yours could be different but read the datasheet first.

    Good Luck,

    Paul Borgmeier
    Salt Lake City, Utah
    USA

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  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. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Lcd Hd44780
    By alaaodeh in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th February 2007, 14:04

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