LCD displaying problem..


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Wow

    Man I learn alot reading this forum!

    Where is the above mentioned "$8D" command documented? I had no idea you could do that? I knew you could shift right or left but did not know you could "jump" to a position...

    Thanks to everyone for the education!

    Bill12780

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bill12780 View Post
    Man I learn alot reading this forum!

    Where is the above mentioned "$8D" command documented? I had no idea you could do that? I knew you could shift right or left but did not know you could "jump" to a position...

    Thanks to everyone for the education!

    Bill12780
    Hi Bill,

    It isnt specifically mentioned in the PBP manual as it depends on the LCD driver chip in your display but for any HD44780 or compatable controller it will work.

    Download the datasheet for an HD44780 and look for the section on setting the registers.

    DDRAM is the command to look at.

    With bit 7 set you are setting where the data sent to the display is written.

    %1xxxxxxx

    $80 which is %10000000 is the first display position on Line1
    $C0 which is %11000000 is the first position on line 2

    increasign either of those values will move you along the line so that you can write at any position. This means you dont have to rewrite the entire display if all that is changing is a single character.
    Keith

    www.diyha.co.uk
    www.kat5.tv

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


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by bill12780 View Post
    Man I learn alot reading this forum!

    Where is the above mentioned "$8D" command documented? I had no idea you could do that? I knew you could shift right or left but did not know you could "jump" to a position...

    Thanks to everyone for the education!

    Bill12780
    Although Keith answered your question quite well, this information is documented on page 94 of the PicBasic Pro manual under the LCDOUT command section (pg 94 of the online version here http://www.melabs.com/downloads/pbpm304.pdf )
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by paul borgmeier View Post
    Although Keith answered your question quite well, this information is documented on page 94 of the PicBasic Pro manual
    Oops

    Cant find my printed manual at the moment to check if it is in there but on my Intranet I have the HTML version of the manual which I use as my reference.

    It must be a much older version as it doesnt have the sentance about

    LCDOUT $FE, $80+4.

    It just says "See the data sheet for the particular LCD device for the character memory locations and additional commands"
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    Join Date
    Jul 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Wink Fixed

    This will cover everything

    LCDOUT $FE,1, $80 + X, "your text here"

    OR

    LCDOUT $FE,1, $80 + X, #VAR here


    Where X is the number of needed space.
    Can also be broken in 2 instructions: LCDOUT $FE,1 : LCDOUT $FE, $80 + X, ...

    Note: I strongly recommend against using spaces, mainly because it eats up more program memory, hard to see on source code too:

    Code:
    ex 1 : lcdout $FE,$80,"               99"  ---> 294 bytes used
    ex 2 : lcdout $FE,$80+15,"99"            ---> 200 bytes used
    Can make a big difference if used extensively!

    Hope It helps you sirvo and bill12780
    Last edited by GrandPa; - 30th July 2007 at 01:45.

  6. #6
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default another revelation!

    Feels like I am at the Church of the Blessed PIC!

    Ok so here is a prime example of why you should read the entire section of the commmand.

    I glazed over it to get to the defines section so I could change the default port from A to D. I totally skipped the section on memory mapping.

    If I had read it, it would not have been such a revelation that the "commands" has they are refered to (in the manual) are actually "pointers" (for lack of a better term) to memory location within the LCD. I thought it was all PBP thing. Not LCD specific. Now I now...hahaha

    I am going to go over the Datasheet for the HD44780 when I get a sec. Cause I bet I can finally figure out how they do scrolling (horizontal and vertical). But for now still working on my Keypad project...

    Thanks you two! Time here is never wasted in my opinion. I learn something new each and everytime I come in here.

    Oh and by the way...I have just (like a month ago) ordered the upgrade from MElabs to 2.47. My orginal (your not gonna belive this) came on a FLOPPY! So I ordered the printed manual as well. My manual is the same as the online version. I am a bit old school (Still have my old TI Logic Databooks!) I like having the printed book. You can order just the manual from MELabs for like 10-15 bucks...

    Thanks again everyone!
    Bill12780

  7. #7
    Join Date
    Jul 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Thumbs up Goto next level when ready

    Bill

    Ask (search) about BIG number whenever you feel ready. Someone made a really nice routine to display 4*4 number on LCD.

    J-P

  8. #8
    Join Date
    Apr 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Thank you kind sir for the info...

    Grandpa,

    Here is the the link of which you speak of.

    Its mostly all over my head at this point. But I am learning fast. I book marked it and post it here for others refrence.


    http://www.picbasic.co.uk/forum/showthread.php?p=26736

    Thanks all!

    Bill12780

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 09:28
  2. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 20:48
  3. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 16:47
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 12:43
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 27th June 2007, 00:07

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