Connect with us

LCD for pic 16F876

Discussion in 'Electronic Basics' started by Ahmed Samir, Jul 11, 2003.

Scroll to continue with content
  1. Ahmed Samir

    Ahmed Samir Guest

    Hi there

    i built this temprature sensor using pic876,and i would like to add an LCD
    to it
    is there any header file available i can include that gives functions to
    control the lcd-initialize, type ...etc.

    i have port b still free for the lcd

  2. A E

    A E Guest

    What type of LCD? I'm sure you mean a module that you send high level data to,
    but there are also 'raw' panels that you drive each segment yourself. There are
    many types of interfaces. You can even get a module with serial access.
    I have a project using an old parallel Epson 16 char display. It's very simple
    to write your own routines.
    I'll email you my code and schematic if you want it. (to give you an idea)
  3. Ahmed Samir

    Ahmed Samir Guest

    i was talking about the HITACHI HD44780
  4. i built this temprature sensor using pic876,and i would like to add an LCD
    Did you browse ? don't do anything with PICs without

    My Jal compiler (GPL!) comes with a HD44780 library...

    Wouter van Ooijen

    -- ------------------------------------
    PICmicro chips, programmers, consulting
  5. A PIC connected to an HD44780 (or Samsung equivalent)-based module?

    Google is your friend. You can find lots of examples, though I can't
    speak for how good they are. If it's a commercial project I strongly
    suggest (re)writing it from scratch using the chip data sheet. If you
    do that, follow the initialization instructions to the letter, many
    people get in trouble there.

    You can use 4-bit mode. Don't forget to put a pot on the contrast

    Best regards,
    Spehro Pefhany
  6. Michael

    Michael Guest

    I second Wouter van Ooijen's suggestion: check the PICLIST.
    Also, Myke Predko did a nifty 1-wire interface for LCDs; I've used it in
    several projects where my 16F628 was low on I/O pins.
  7. Many of them, such as the common 2 x 16 panels have an "interesting"
    "hole" in memory; you have to jump to 0x40 (IIRC) to get to the first
    character of the second line.

    Best regards,
    Spehro Pefhany
  8. The HD44780 has built in support for 40 character wide displays, is that 0x40
    you're thinking of not 0x28 (40 decimal)? I haven't played with them for a
    while, can't remember if the address continues directly to the next line or not.

    In any case, if you were to write characters in memory, you'll eventually get
    to the next line.
  9. Yes, that's right.
    The basic chip has support for two lines and the second line usually
    starts at 40 regardless of how many characters actually are in each
    line. IIRC, there are some single line ones where the second half of
    the SINGLE line is connected so it starts at 40 too.
    For some reason it seems to confuse people, as I've seen the question
    too many times. As does the initialization sequence, which is a bit
    complex. If you follow the data sheet religiously including timing and
    initialization, all will be well.

    There are MANY web pages on this, here's one:
    I've not tested the code from this (or any other) web page.

    Best regards,
    Spehro Pefhany
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day