PIC16F877A LCD Display

Discussion in 'Embedded Systems and Microcontrollers' started by winson, Dec 21, 2008.

  1. winson

    Thread Starter Member

    Dec 3, 2008
    23
    0
    Hi friends,

    I was developed my remote control project(UART) by using PIC16F877A, now i was plan to add a LCD display to the remote control but i dont know much about the LCD.

    So what type of LCD do i need to choose?
    Then rougly what is programming method for each type of LCD?

    I have search through the internet for information, but on the whole still not clear about the LCD stuff....

    Any suggestions or comments are appreciate.

    Thanks a lot.
     
  2. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    The choice of LCD depends on what you want to display/show.

    If it is just some ASCII characters, then you can select character LCD with single line, double line or 4 lines of different length(# of characters per line).

    Nearly all character LCDs are driven in the same way because they all emulate HD44780 control commands. They can be driven in 8-bit mode or 4-bit mode if spare I/O pins are not sufficient on your 877A. So there is no problem for using them. Just any brand will do. Beware some 5V LCDs will NOT work at 3.3V and some works only at 3.3V max.

    If you want to display symbols, do a little bit of graphic or animation, then you will need to use a graphic LCD. They are more difficult to drive and you have to control every single dot/pixel in order to have something meaningful displayed. A common one is 128x64 pixels.
     
  3. bigfoot

    New Member

    Dec 21, 2008
    1
    0
    In one of my projects I used a graphic 128x64 F-51852 LCD made by Optrex. I bought it with a serial controller from www.tvielectronics.com. This also came with a touch screen which is very convenient, no push buttons, no holes. However, in order to communicate with this controller you need to have UART available.
     
  4. winson

    Thread Starter Member

    Dec 3, 2008
    23
    0
    Hi everybody,

    Actually, i only want to display some ASCII character on the LCD. For example, when the user press the "Play" button on remote control then the LCD will display some character to tell the user a "Play" was pressed and adding some extra information. The program for the remote control was write by using UART.

    So is it very complex to write the program code for display the character?
    Can i know how it work?

    Any help is appreciate.

    Thanks
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You first initialise the LCD upon power ON to tell it which mode you want to communicate with it. You then place the ASCII data onto the port pins and change/toggle the logic level on E(enable) pin of the LCD. The LCD then knows that the data is valid and accepts it and displays it.

    There are tons of examples on the web, which shows actual wire connections and mode setting. The following is a nice one by Nigel Goodwin. It uses 16F628 but it is just all the same for any PICs.

    PIC Tutorial - LCD Board
     
  6. winson

    Thread Starter Member

    Dec 3, 2008
    23
    0
    Thanks for providing all the valuable information!

    After spend some time read the tutorial, i have learn a lot about the LCD display, next step i think have to get a LCD and try to program it.

    Thanks everybody.
     
  7. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    For anyone using a character LCD display, it is a good idea to obtain the HD44780 datasheet from the NET. HD44780 is the heart of the controller used for the LCD display.

    Inside the datasheet there is a flowchart on what to do and what command to send on LCD power up and how to place it into 4-bit mode.

    If you don't do this correctly, then only black blocks will appears on the LCD display.
     
Loading...