LCD 2x40 NOT Writing !!!!!!


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    ager's Avatar
    ager Guest

    Default LCD 2x40 NOT Writing !!!!!!

    Please Heelp!!
    My dead time almost reached! please.
    I am using 16f877 and 2x40 lcd. I send lcdout $fe,$1, "......"
    and later using again lcdout $fe,$c0, "......". It is not writing my place. writes after first lcdout . mean first line. I want to use second line. I could not identified problem. Please help Me


    please please sample code or help heeelp!!

    Ager
    [email protected]

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Ager,

    try this:

    LCDOUT $FE,1
    LCDOUT "---------- This is Line 1 ----------"
    LCDOUT $FE,40
    LCDOUT "---------- This is Line 2 ----------"

    on many 40xs Displays the start address of line 2 is $40
    (see your LCDs DataSheet)

    regards

  3. #3
    ager's Avatar
    ager Guest


    Did you find this post helpful? Yes | No

    Default LCD 2x40 NOT Writing !!!!!!

    Hello my dear friend.
    Last night I tried everything. did not help.
    I tried lcdout $fe,$80,".......line 1....." and second line is
    lcdout $fe,$C0,".......line 2....." or lcdout $fe,$40,".......line 2....." or lcdout $fe,40,".......line 2....." did not help.

    Thanks
    Ager

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


    Did you find this post helpful? Yes | No

    Default

    Hello Ager,

    Ager>>lcdout $fe,$c0,"fdfsd"

    Looks, good, Make SURE you are correct on your example...

    LCDout $fe,$0c,"3434" Turns the cursor off!!!!! and if you write the exact same data on line to as line one, you will totally miss your error!


    Use
    LCDout $fe,$Co,"3434"

    Notice the $co and the $oc !!!!!!


    can you send us some "short" code that simulates the problem?

    Can you use another program and get the same results?

    Are you sure that your program is hitting this line of code?
    (blink a LCD just before you impliment it.)
    Are you sure you have defined your LCD as 2 lines?


    Your LCD setup should look something like the following...(wiht different ports).

    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 7
    DEFINE LCD_EREG PORTA
    DEFINE LCD_EBIT 0
    DEFINE LCD_BITS 8
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

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

  5. #5
    ager's Avatar
    ager Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Dwayne

    No it was not my mistake. It was $co. But i am really try to short examples. I am sure will not help. I wish !

    Regards

    Ager

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


    Did you find this post helpful? Yes | No

    Default

    Hello Ager,

    Then try the unobvious...Do you have another LCD to try?
    and/or is the LCD compatible to PBP commands?

    Dwayne

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

  7. #7
    ager's Avatar
    ager Guest


    Did you find this post helpful? Yes | No

    Default

    Hello Dwayne
    As i said I tried. not help. I send some part of my program for an example. Didnot work as i want.



    Best regards
    Ager
    Attached Files Attached Files

  8. #8
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    1. It might help if you tell us the MAKE and MODEL number of the LCD you are using... or even better, give us a url link to it's Datasheet.

    2. What PIC are you using?

    3. What version of PICBasic are you using?

    As a tip, if you have a LCD problem, it's best to strip out all other code and concentrate solely on the problem with the LCD. It saves confusion with lots of additional irrelevant code distracting you.

  9. #9
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Ager,

    as Melanie said:

    reduce your code to the absolute minimum you need for the test.

    ' Make sure the following DEFINEs match your hardware setup

    ' -- START OF CODE

    DEFINE LOADER_USED 1
    DEFINE OSC 10

    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 0

    ' The following code example is tested and works just fine on my Display

    PAUSE 500
    LCDOUT $FE,1
    PAUSE 500
    LCDOUT "------ This is Line 1 -----"

    '** $C0 is ROW 2 COLUMN 1 on the LCD model I'm using
    LCDOUT $FE,$C0
    PAUSE 500
    LCDOUT "------ This is Line 2 -----"

    END

    ' -- END OF CODE


    Just cut and paste this example into your Code Editor and give it a try.
    If this doesn't help we would need the specs of your LCD

    regards

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


    Did you find this post helpful? Yes | No

    Default

    Hello Ager,

    Ager>>No it was not my mistake. It was $co. But i am really try to short examples. I am sure will not help. I wish !<<

    Then do what Melanie says...Write *ONLY* a program that displays "Hello Line1" and "World Line 2".

    It should be TOTALLy stripped down... NO other code. No AD's, no extra variables, no nothing... absolutely nothing but output to the LCD. (This is assuming your LCD *is* compatible to PBP).

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

  11. #11
    ager's Avatar
    ager Guest


    Did you find this post helpful? Yes | No

    Default

    Hello All

    Sorry for late answering. Problem was me. I do not put any wait command to the program. I added more pause and worked.
    Also LCD is INTECH 2x40.

    Many thanks to all who interested with my problem.

    Ager.

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