PIC 16f877A LCD problem!


Closed Thread
Results 1 to 10 of 10

Hybrid View

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

    Smile

    Hello uaf5000,

    Well at first glance you are missing the line "DEFINE LCD DBIT 0". You also have a line that says you are only using 1 line when the statement "LCDOUT $FE,$C0" is the command to display the following on the second line of the LCD. Make these changes and see how it goes.
    Your code can also read--"LCDOUT $FE,1,"Hello"
    "LCDOUT $FE,$C0,"World"

    I think this also may have been messing things up for you.

    HTH,

    BobK
    Last edited by BobK; - 19th May 2010 at 23:39. Reason: After thought.

  2. #2
    Join Date
    May 2010
    Posts
    19

    Default

    Still same garbage values =(. I made the changes you told. But in those garbage values letter 'D' is appearing which wasn't before. What shall i do now? =(

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    PORTE is analog on this chip, so you will need to turn that off.
    http://www.picbasic.co.uk/forum/showthread.php?t=561
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    May 2010
    Posts
    19

    Default

    I've used the command ADCON1=%00000111. Didnt this command make port E digital?

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Quote Originally Posted by uaf5000 View Post
    I've used the command ADCON1=%00000111. Didnt this command make port E digital?
    Yes, I missed that

    DEFINE LCD_BITS 8
    Can you post how the LCD is connected?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2010
    Posts
    19

    Default

    LCD----------->PIC

    RS-------------->RE0
    R/W-------------->RE2
    E--------------->RE1
    Datapin0 --------->RD0
    Datapin1 -------->RD1
    Datapin2 ---------->RD2
    datapin3 ------------->RD3
    datapin4 ----------->RD4
    datapin5----------->RD5
    datapin6------------RD6
    datapin7----------->RD7

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