what is the bit instruction to get to LCD line2


Closed Thread
Results 1 to 9 of 9
  1. #1
    EDWARD's Avatar
    EDWARD Guest

    Default what is the bit instruction to get to LCD line2

    How do i get the cursor down to the 2nd line?

    i have a 2 line lcd that im using in 4 bit mode. i cant seem to diplay any data on the lower half of the screen (line 2).

    i have looked all over but can only find the home command to be the closest thing.( which takes the cursor to line 1 cell 1)

    i cant use any of the lcdout feature cause my pcb is wired weird. I need the actually byte command sent to the instruction registers on the LCD.


    have i over looked something? because if i just keep displaying on the top line it doesnt "Wrap" the text down to line 2.

    BTW, i got almost all of my project done, just wanted to say thanks for all the help so far.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Angry

    The Manual !!!!

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    with LCDOUT $FE,$C0 so i guess your routine must send only $C0 to the LCD... OR the same way when you do the LCD initialisation at start-up time.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Hello Edward,

    If I am correct, were you not working on your own LCD routine??

    If so, Treat it exactly like the LCDout....

    Send a $FE, then a $C0 (if you have a routine) like the one I posted...
    If not, turn on your Command/Data pin to Command, and write a $CO.

    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
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default thanks

    i havent tried it yet but i think you are correct. yes dwayne i im doing "custom" lcd routines, great memory my man.

    thats why i cant use the lcdout function.

    what manual? i have the hd44780 commands sheet, i was having trouble interprting what the command actualy did, i also went to like 5 different webpages i found listed through out this forum to try and find a laymans description of what setting the dd reisters and stuff actually does.

    http://www.geocities.com/SiliconVall...d/commands.htm
    http://home.iae.nl/users/pouweha/lcd/lcd.shtml
    http://www.perfectlcd.com/FAQ_LCD_te...ter_module.htm

    so dont get so mad at people Ace.

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


    Did you find this post helpful? Yes | No

    Default

    >> what manual?

    All the valid LCD I/O commands (certainly the cursor line-locating commands) are in the PICBasic manual that came with your PBP software (also available from the MeLabs website).

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


    Did you find this post helpful? Yes | No

    Default

    Hello Edward,

    Edward>>i havent tried it yet but i think you are correct. yes dwayne i im doing "custom" lcd routines, great memory my man.

    thats why i cant use the lcdout function.

    what manual? i have the hd44780 commands sheet, i was having trouble interprting what the command actualy did, i also went to like 5 different webpages i found listed through out this forum to try and find a laymans description of what setting the dd reisters and stuff actually does<<

    I understand why it can be very confusing... Since you are not using the LCDout, you have no "Manual" to go by... Thus, it CAN be very confusing. But!!! the LCD commands (which you probably didn't know) are almost exactly like the LCDout commands in the PBP manual that Melabs puts out. The only thing that will be different, is if you write to the interal memory, or something out of the ordinary. But simple LCDout commands will work without the LCDout... just make sure you have the Data/Command switch in the right place.... Most of the time it is in Data mode... So that you will write DATA out to your LCD for display. The only time it is in Command mode would be switching LCD lines, or Clearing the LCD display with a Dec 1. (Dec 13 will turn on and clear your display). I also understand on the interpreting the commands!...If you want, I have a site someplace that does a great job of telling all the commands of the LCD...in Command mode. I will look it up, if you would like me to, and give you the URL.

    Dwayne (congradulations on your project.)
    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...

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Hi, Edward

    I'm sorry for my mistake : your question was nos so clear, as it was not a PBP Background ... I always think we are on a PBP Forum ...

    Yes, I become a bit angry these times : reading here pages and pages of code with the same questions : where is my error or ( can you ) do it for me ??? or ground level Questions showing the manual ( humour ...) has never been opened, is RATHER BORING.

    Regards
    Alain

  9. #9
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    I think you have a display with 2 lines of 16 characters.
    On the backside of the display you can find only one drop of black plastic.

    The Controller (under the plastic) can NOT manage these display in the desired way. The display ist broken into 4 parts of 8 characters.

    look at this:
    -----
    ;Display clear
    Disp_Clr:
    LCDOUT $FE,1isp_Zeile2=0:Return
    ;goto the second (right) part of a line
    Disp_Tab:
    LCDOUT $FE
    IF Disp_Zeile2 THEN
    LCDOUT $C8
    ELSE
    LCDOUT $88
    ENDIF
    return
    ;goto the second line
    Disp_LF:
    LCDOUT $FE,$C0isp_Zeile2=1
    Return
    -----

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. first project, and yes, doesn`t work
    By bogdan in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th April 2009, 06:13
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Migrating from PIC16F690 to PIC18F4525 and having LCD issues
    By jblackann in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th June 2008, 20:05
  5. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56

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