PIC16F887 interfacing with an HD44780 lcd 16x2

Discussion in 'Embedded Systems and Microcontrollers' started by Blakey, Mar 10, 2011.

  1. Blakey

    Thread Starter New Member

    Mar 8, 2011
    4
    0
    Hi,

    I've been working on my first PIC project, I can switch led's on and off etc.

    So, I got an HD77480 LCD to play with, I can get it initialised and get the cursor to be displayed and move around the screen.

    The only problem I seem to have at the minute is that no matter what text I try to write to it, nothing is displayed...

    I've attached the source code and a picture of what you can see on the LCD.

    The illuminated block is the blinking cursor...

    Any idea's what I'm doing wrong?

    Cheers,
    Blakey
     
  2. Blakey

    Thread Starter New Member

    Mar 8, 2011
    4
    0
    FYI the picture of the LCD is upside down
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Have you done some debugging in MPLAB SIM?
     
  4. Blakey

    Thread Starter New Member

    Mar 8, 2011
    4
    0
    Nope, My code seems to work - the lines are going high when I set them high.

    The only difference between the commands and text writing routine is the RS line - which is behaving correctly.

    I'll have a look for some info on debugging later

    Cheers,
    Craig
     
  5. Blakey

    Thread Starter New Member

    Mar 8, 2011
    4
    0
    Hi,

    Looks like the code was correct and the wiring was correct between the chip and the LCD module.

    I connected a common anode RGB led via a transistor to the enable line and the display now works, this leads me to suspect I need a pull down resistor...

    Does anyone know how I go about figuring out what resistance I'll need here?

    Cheers,
    Craig
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It is a LCD example in the C:\Program Files\HI-TECH Software\PICC\9.81\samples folder. Take a look at that. It may give you some ideas
     
    Last edited: Mar 14, 2011
  7. nahtanoj

    New Member

    Mar 17, 2011
    1
    0
    if the wire and programming are correct.. just one question, is a 14 pin LCD or a 16 pin LCD??.. because if is a 16pin.. you have to connect a variable resistor to regulate the backlight..

    sometimes i have that problem in somes LCD ..

    GL
     
Loading...