Lcd 16f877a Heeeeelp!!!


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    21

    Default Lcd 16f877a Heeeeelp!!!

    HI ALL, THIS CODE NOT WORK ON 16F877A. WHY?
    I HAVE DEFINE NEW REGISTRY.
    THX

    ----------------------------------------------------
    'set lCD data port
    define LCD_DREG PORTB
    'set starting data bit(0 or 4) if 4-bit bus
    DEFINE LCD_DBIT 4
    'set LCD register select port
    DEFINE LCD_RSREG PORTB
    'set LCD register select bit
    DEFINE LCD_RSBIT 1
    'set LCD enable port
    DEFINE LCD_EREG PORTB
    'set LCD enable bit
    DEFINE LCD_EBIT 2
    'set LCD bus size (4 or 8 bits)
    DEFINE LCD_BITS 4
    'set number of lines on LCD
    DEFINE LCD_LINES 2
    'set command delay time in us
    DEFINE LCD_COMMANDUS 2000
    'set data delay time in us
    DEFINE LCD_DATAUS 50




    loop:
    Pause 500
    LCDOUT $FE,1
    LCDOUT "test LCD"
    LCDOUT $FE,$C0
    LCDOUT "16F877A"
    goto loop
    -------------------------------------------------

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


    Did you find this post helpful? Yes | No

    Smile

    Hi Chip,

    Try this:

    loop:
    Pause 500
    LCDOUT $FE,$80,"test LCD Line 1"
    LCDOUT $FE,$C0,"16F877A Line 2"
    goto loop

    What you want displayed on a line should go directly after the command.

    BobK

  3. #3
    Join Date
    Dec 2005
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Ok

    THX BobK.

    BY

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 will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. Need cheap i2c LCD for 16F877a
    By CodeShredder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th December 2006, 01:25
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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