How do you drive a Serial LCD?


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224

    Default How do you drive a Serial LCD?

    How do you drive a Serial LCD in PBP? Do you use the DEBUG command? Also, do Serial LCDs recognize the 0xFE character to set the LCD "RS" bit to 0 for the next character?

    TIA Gentlemen. Happy Holidays everyone.

    Cheerful regards, Mike

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Hi Mike,
    You can use DEBUG, SEROUT, SEROUT2 or HSEROUT. DEBUG generates the smallest code but is the least flexible one. As for recognizing 0xFE you'd have to check the datahseet/manual for the particular serial LCD you're using regarding how you switch between command and data. I imagine they can have slightly different features/command sets depending on manufacturer etc.

    /Henrik.

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


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    This data sheet has a Basic Stamp example
    http://www.seetron.com/docs/bpp440mnl.pdf
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Hi Henrik,

    But which of those functions would provide the most compatibility with the LCDOUT command? I assumed you would use DEBUG because it has data formatting options which are similar to LCDOUT.

    What I'm trying to do is make a Serial LCD Backpack that would easily support PBP and I thought that if my LCD Backpack recognized the 0xFE character it might make it easier to take an existing PBP program and convert it for use with the Serial LCD Backpack by swapping out the LCDOUT keyword with the DEBUG keyword (leaving instruction operands intact).

    Cheerful regards, Mike

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


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Aah, you're MAKING one, OK.
    That would be DEBUG, SEROUT2 and HSEROUT as they all support the same modifiers such as DEC, SDEC etc. DEBUG produces smaller code since its parameters are set at compiletime (with DEFINEs) while SEROUT2 uses runtime setable parameters.

    For your backpack, select a PIC with USART and use HSERIN to capture the incomming data. Check mackrackits link as well!

  7. #7
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Henrik,

    Thank you! That's the info' I was looking for.

    For your backpack, select a PIC with USART and use HSERIN to capture the incoming data.
    This version of my Serial LCD Backpack uses a 12F683 and an assembly language program. While building a prototype board a couple weeks ago for the new 8 pin, 14 pin, and 20 pin "enhanced" mid-range devices, I decided to add my old Serial LCD Backpack circuit onto the extra space at the bottom of the board (see silkscreen below). In the picture below, a 16F1823 is driving the backpack circuit at 57600 baud (one pin "overhead" on the 16F1823).

    Check mackrackits link as well!
    I checked the link (thanks Dave) but it's not really what I was looking for.

    Thanks guys... Happy Holidays!

    Cheerful regards, Mike
    Attached Images Attached Images   

  8. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    OOPs my bad posted what Dave did. It does use the LCDOUT syntax though . . .
    Last edited by Archangel; - 4th December 2011 at 09:30.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  9. #9
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Hey Mike K8LH,

    Nice looking board... I have several of the 12F683 PIC's laying around and a couple of LCD's that they would go nicely with... I am amazed that you had enough pins to drive the LCD and receive serial data.

    would you be willing to share your schematic and code??

    Thanks in advance
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  10. #10
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: How do you drive a Serial LCD?

    Hi Dwight,

    I attached the schematic below but I'm afraid the interface in its present form is not very PBP friendly. It was the only way I knew of at the time to control six (6) pins on an LCD with only five (5) PIC output pins. That means you have to drive the display by sending two serial bytes for each LCD byte, each serial byte containing four data bits and an RS bit.

    The new design that I'm working should be done soon. It uses full eight bit bytes and recognizes the $FE character (for toggling an RS flag).

    Regards...
    Attached Images Attached Images  

Members who have read this thread : 1

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