20 x 4 LCD routine problems

Discussion in 'Programmer's Corner' started by PIC_man, Mar 24, 2009.

  1. PIC_man

    Thread Starter New Member

    Mar 17, 2009

    I am building a post-oncology treatment question datalogger that requires a 20 x 4 LCD as it has to be large enough to ask the questions.

    I ordered a BATRON BTHQ 42005VSS-FSTF-06-LEDWhite LCD (datasheet at http://www.farnell.com/datasheets/31779.pdf) LCD module but I can't get it to work with any LCD code we currently have in our department. I have tried it with a number of different LCD routines off the net but I can't even get the display to initialise or write anything to the LCD.

    When I ordered it a sales guy at Farnell assured me it would be compatible with LM016L/LM018L LCD module code, which I have used before in projects.

    I have the feeling I am missing something very fundamental here, have I bought the wrong type of LCD? or does anyone know where it is possible to download LCD header files/routines for this type of LCD?

    Any help at all or a basic tutorial on how LCD modules interact with PICs (cause I am still not totally clear) would be much appreciated!

  2. SgtWookie


    Jul 17, 2007
    The link to the PDF you posted did not work.
    Found the part on Farnell UK's site:
    Once that page is loaded, the datasheet (same URL) can be accessed by clicking the link at the bottom of the page.

    The LCD controller is a Samsung KS0066 or equivalent.
    I don't know offhand if it is HD44780 compatible, but this thread:
    claims that the KS0066 is a clone of the HD44780 controller. Numerous other source found via a Google search support that statement.

    You might have a look at this PDF:
    It shows how to test a HD44780-type LCD display without a uC.

    A couple of things that will bite you:
    1) Not sending the proper "wake up" series, paying attention to timing.
    2) 8 bit vs 4 bit mode.

    Do a Google search for 44780 tutorial.
  3. PIC_man

    Thread Starter New Member

    Mar 17, 2009