LCD for pic 16F876

A

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

thanks
ahmdsamir
 
Ahmed Samir wrote:

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

thanks
ahmdsamir
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)
 
i was talking about the HITACHI HD44780

"Ahmed Samir" <ahmdsamir@link.net> wrote in message
news:bel9ds$672i3$1@ID-36824.news.uni-berlin.de...
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

thanks
ahmdsamir
 
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.
Did you browse www.piclist.com ? don't do anything with PICs without
it...

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


Wouter van Ooijen

-- ------------------------------------
http://www.voti.nl
PICmicro chips, programmers, consulting
 
On Fri, 11 Jul 2003 14:12:09 +0300, the renowned "Ahmed Samir"
<ahmdsamir@link.net> wrote:

i was talking about the HITACHI HD44780
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
input.

Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
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.


Ahmed Samir wrote:
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

thanks
ahmdsamir
 
On Sat, 12 Jul 2003 10:37:39 +1000, the renowned John Tserkezis
<jt@techniciansyndrome.org.invalid> wrote:

Spehro Pefhany wrote:

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
input.

Another gotcha to look out for is if using LCDs with two lines. I had a
bunch of code already written up for single line versions that I knew worked.
All I did was configure the display for two lines and it goes blank.

After much stuffing around, I found the _contrast_ changes when switching
from the default one line mode, to two line mode.

Then I had to go back to find out what part of the code I _broke_ in the
futile attempt to fix it.
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
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
Spehro Pefhany wrote:

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.
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.
--
Linux Registered User # 302622 <http://counter.li.org>
 
On Sat, 12 Jul 2003 16:06:59 +1000, the renowned John Tserkezis
<jt@techniciansyndrome.org.invalid> wrote:

Spehro Pefhany wrote:

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.

The HD44780 has built in support for 40 character wide displays, is that 0x40
you're thinking of not 0x28 (40 decimal)?
Yes, that's right.

I haven't played with them for a
while, can't remember if the address continues directly to the next line or not.
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.

In any case, if you were to write characters in memory, you'll eventually get
to the next line.
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:
http://home.iae.nl/users/pouweha/lcd/lcd.shtml
I've not tested the code from this (or any other) web page.

Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 

Welcome to EDABoard.com

Sponsor

Back
Top