More Powerful LCD Commands


Closed Thread
Results 1 to 32 of 32

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Usually i use an external EEPROM to save the strings. As i use always the same routine to display strings, i format my strings to fit directly on the LCD, then, if i have to display results right, left or somewhere esle on the string i use specific structure to store LCD address in the EEPROM or in the program to point directly on the wanted LCD location.

    Using a HEX editor make things easy to figure out how your data will be display on your LCD.

    It's flexible even if it use a bit much EEPROM storage.

    OR, Using another EEPROM structure, you can specify the origine point, the string lenght and do what you need with.
    Steve

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

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    I see mister_e but it takes extra work, doesn’t it?

    Who are the people that will really read "PBP Wish List" and then consider some of the posts for the next version?

    In other words, is there really a consideration of the posts here?

    If so, if they like an idea here at "PBP Wish List", will they really consider putting them into the next version and, may be, will name it with the member’s who posted it?

    Code:
    sayzer $fe,$cx,”Hello Word”	'right align “Hello Word” on lcd
    
    mister_e 0, eeprom		'format the entire eeprom 
                                    'and assign 0 to each location.



    Trademarks: name of “mister_e” belongs to mister_e




    --------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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


    Did you find this post helpful? Yes | No

    Default

    I don't want to start yet another "heated debate", but

    I feel LCDOUT "as it is" gives you all you need to get started quickly on a standard character display.

    With a bit of creativity you can achieve almost anything on a standard LCD.
    (even simple graphics)

    If you want more, go be creative and write your own routines that do exactly what you want (or need) and nothing else.
    You will learn a lot and in addition you will (most likely) save some codespace.

    Of Course LCDOUT could have more bells and whistles, but then it would require even more code space than it already does to simply display "Hello World"
    (would it be a real benefit if it would require at least an 18F PIC to simply display two lines of text on any LCD?)

    I started with HD44780 (or compatible) LCDs and was happy to have the (in my oppinion) powerful LCDOUT.
    Today I use all kinds of displays with different controllers and I prefer Displays with SPI or I2C to save some port pins.
    With those "non HD44780" Controllers LCDOUT is of no use at all,
    one has just to be creative.

    It is even more complex with GLCDs, which Controller should be supported?
    There is actually no standard.

    What I really like with PBP is: it is bullet proof.

    Several other compilers have all kinds of "special features" but actually lack of basic functionality and reliability.
    (One never knows where to start searching for the cause of an unexpected result)

    I have never found a real bug in PBP
    ok, sometimes code didn't work as expected,
    but looking closer to it I had to realise:
    it simply worked as designed!

    PBP follows one simple rule:
    GARBAGE IN - GARBAGE OUT
    (I have seen other Products where you get GARBAGE OUT whatever you put in)

    If one takes the time to study the excellent PBP Manual
    and the datasheets of all hardware involved in the specific design
    and follows some design rules
    it will work reliably not only on the bench but also in the field.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Smile 2 wire LCD interface

    It would be awesome if PBP had a 2 wire LCD suppurt.
    Maybe something like LCDOUT2 or something . . .
    To clarify what i mean, i have attached a schematic and the ASM source code from Myke's page.
    << http://www.myke.com/lcd.htm >>> This is given at the end of the page.
    Is it possible to incorporate this in PBP ???
    He uses a shift register to send data and a resistor-diode AND logic to strobe the enable bit of the LCD . . .
    How can i do this in PBP ? ? ?
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by shahidali55; - 22nd April 2007 at 09:50.

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


    Did you find this post helpful? Yes | No

    Default

    I2CWRITE or SHIFTOUT should do the trick...

    But to me, any 1 wire serial adapter would be good enough.

    Code:
    Start:
        HSERIN [TheData] ' OR DEBUGIN/SERIN/SERIN2
        LCDOUT TheData
        GOTO Start
    Fantastic situation to use any of your forgiven or useless PIC. Like PIC16F84, 16C54 etc etc
    Last edited by mister_e; - 22nd April 2007 at 18:40.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    Fantastic situation to use any of your forgiven or useless PIC. Like PIC16F84, 16C54 etc etc
    Hey Steve, looks like you still have plenty of F84's & C54's on the shelf.
    (Probably even C84's)

    How about RoHS compliance of your stock ;-)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



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


    Did you find this post helpful? Yes | No

    Default

    HEY RALPH! Well i followed your suggestion a while back (more than 2 years ago) (http://www.picbasic.co.uk/forum/show...88&postcount=7) ... i use them on my pinboard... or as staple

    Reuse
    Old and
    Hassling
    Stock

    C84?

    PS: i know you love'em, so i can send you a few LMAO!
    Last edited by mister_e; - 24th April 2007 at 22:27.
    Steve

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

  8. #8
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    I know this an old post, but could you elaborate a little more on how one would store strings in an external EEPROM and retrieve them. I can see where this might come in handy when building menus. "HSEROUT" is a little hungry for code space. I did a search on the forum, but nothing jumped out.
    Thanks, David

    Quote Originally Posted by mister_e View Post
    Usually i use an external EEPROM to save the strings. As i use always the same routine to display strings, i format my strings to fit directly on the LCD, then, if i have to display results right, left or somewhere esle on the string i use specific structure to store LCD address in the EEPROM or in the program to point directly on the wanted LCD location.

    Using a HEX editor make things easy to figure out how your data will be display on your LCD.

    It's flexible even if it use a bit much EEPROM storage.

    OR, Using another EEPROM structure, you can specify the origine point, the string lenght and do what you need with.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DavidK View Post
    I know this an old post, but could you elaborate a little more on how one would store strings in an external EEPROM and retrieve them. I can see where this might come in handy when building menus. "HSEROUT" is a little hungry for code space. I did a search on the forum, but nothing jumped out.
    Thanks, David
    Use a HEX editor, create your Menus (i used HEXWorkshop from bpsoft), then dump it in your EEPROM with a EEPROM programmer or else fancy method, like a custom PC application which will send the EEPROM dump to your PIC via Rs232 or USB.

    An then, depending your EEPROM you really just need I2CREAD/SHIFTIN then a LCDOUT.

    That's one method, you can also use the following method using the code space.
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    And there's a load of different version of it in this forum to.

    HTH
    Steve

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

  10. #10
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Steve
    Yes I use the embedded strings as part of my Logo Display. Works great BTW.

    I also tried the custom approach and built a HyperTerm interface to an 24LC128 EEPROM, but the problem is viewing all the lines at once or editing a single entry. I will look at your Hex Workshop.
    Thanks for the info
    David

    Quote Originally Posted by mister_e View Post
    Use a HEX editor, create your Menus (i used HEXWorkshop from bpsoft), then dump it in your EEPROM with a EEPROM programmer or else fancy method, like a custom PC application which will send the EEPROM dump to your PIC via Rs232 or USB.

    An then, depending your EEPROM you really just need I2CREAD/SHIFTIN then a LCDOUT.

    That's one method, you can also use the following method using the code space.
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    And there's a load of different version of it in this forum to.

    HTH

  11. #11
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    A routine very similar to mister_e's could easily be used to centre text to the LCD screen.
    It's almost funny to see such a request of the language itself.

    For a 16 character display, count the length of the message to display, divide that by 2,
    and print the message that many spaces to the left of centre (or 8 minus that figure).

    If you want to print it all to the right, start from 16 (or length of the LCD screen) minus the length of the message.

    To use EEPROM, set a two byte qualifier recognised by your program, then you can count the bytes until
    you reach the next qualifier to gain the length of the message.
    You only need to use the LCDOUT command once in your whole program to send one single variable byte at a time.
    Same with serout, sound, etc. as they can be called from other routines. any more is overkill.

    PBP only includes these routines once in your program, no matter how many times you use them.
    There's no reason why the programmer should do any different.
    Last edited by Art; - 22nd April 2008 at 09:41.

  12. #12
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Art
    Interesting!!

    I may need a little coaching. My goal is to print up a set of instructions, save them as a text file (formatted for screen width), convert to hex then burn to an EEPROM. Calls would be made to EEPROM strings by line number. Not sure this is all possible but nice idea. This could be used for either LCD, RS-232 or USB connections.
    David

    Quote Originally Posted by Art View Post
    A routine very similar to mister_e's could easily be used to centre text to the LCD screen.
    It's almost funny to see such a request of the language itself.

    For a 16 character display, count the length of the message to display, divide that by 2,
    and print the message that many spaces to the left of centre (or 8 minus that figure).

    If you want to print it all to the right, start from 16 (or length of the LCD screen) minus the length of the message.

    To use EEPROM, set a two byte qualifier recognised by your program, then you can count the bytes until
    you reach the next qualifier to gain the length of the message.
    You only need to use the LCDOUT command once in your whole program to send one single variable byte at a time.
    Same with serout, sound, etc. as they can be called from other routines. any more is overkill.

    PBP only includes these routines once in your program, no matter how many times you use them.
    There's no reason why the programmer should do any different.

  13. #13
    Join Date
    Apr 2008
    Posts
    2


    Did you find this post helpful? Yes | No

    Thumbs up 16F84 serial slave code

    OK, two things, 16F84 is rapidly becoming part of history and there is a lot of stock around to use yet. I have a lot of various types of LCD's of the standard 44780 type and it would be great to dedicate several 84's to becoming an 8 bit LCD driver with serial in essentially making it a serial display. Sure, serial displays are common now, but they are still $30 or more and basic 44780 displays are available in surplus outlets for $1. I'd rather save a couple of bytes of mem by using the display in 8 bit mode.

    Second, is the LCDOUT modifiable so that a standardized PIC to LCD pin out can be used? There are about as many ways to wire an LCD as there pins. I like to use B0-B7 and A0-A2 for all 8 bit LCD configurations with 84, 627,628. And, what is the code standard for a serial in LCD module, it gets very confusing out there, everyone has an opinion.

    Move along, these aren't the droids we are looking for
    Last edited by alphahr; - 23rd April 2008 at 21:22. Reason: syntax error

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. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  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