Searching \ for '%lcd%' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/lcds.htm?key=lcd
Search entire site for: 'lcd'.

_Sub string match.
PICList Thread
'7 segment LCD control'
1994\12\06@042834 by crocontroller discussion list

flavicon
face
Doea anyone know where I can find a LCD control routine for the 16cXX series
that uses an absolute minimum of other hardware to control the LCD. We are
talking really cheap circuits here. It has to be able to control a 3.5 digit
LCD (the smallest I could find).

Any help much appreciated.

1994\12\06@044319 by crocontroller discussion list

flavicon
face
=>Doea anyone know where I can find a LCD control routine for the 16cXX series
=>that uses an absolute minimum of other hardware to control the LCD. We are
=>talking really cheap circuits here. It has to be able to control a 3.5 digit
=>LCD (the smallest I could find).

LCDs are a pain in the neck to control directly: you need a line for
each segment *of each digit* you want to display, plus another for the
backplane.  So, if you want to drive 3.5 7-segment digits, you'd need
24 output lines.  You're better off getting an LCD controller, such as
the uChip ... uh ... AYmumblemumble.  It's a 40-pin DIP, or a 44-pin
PLCC, can be driven with 2 or 3 output lines, and can control (I
think) up to 32 LCD segments.  I haven't used mine yet, but it was the
best (i.e. cheapest and available) one I ran across in my brief search
for that sort of thing.

Now, if you only want to use one *digit* of your 3.5 display, you'd
only need 8 ouput lines (no extra hardware) and the control routine
would be pretty simple.  Is that what you had in mind?

d.

1994\12\06@044527 by crocontroller discussion list

flavicon
face
> Doea anyone know where I can find a LCD control routine for the 16cXX series
> that uses an absolute minimum of other hardware to control the LCD. We are
> talking really cheap circuits here. It has to be able to control a 3.5 digit
> LCD (the smallest I could find).
>
> Any help much appreciated.
>
You may already be aware of this but there is an application covering
this topic in the Embedded Control Handbook that Microchip publish,
AN563. The code should be available on the bulletin board and there's an
overview of LCDs and their operation in the handbook. Hope this helps.
                                               -Alasdair

[ The opinions expressed are my own and are therefore undeniably correct ]
[ beyond a shadow of a doubt.                                            ]

Alasdair MacLean, University of Edinburgh, Dept. of Artificial
Intelligence, 5 Forrest Hill, Edinburgh, EH1 2QL
tel. (+44) 0131 650 4497        fax. 0131-650-6899
email spam_OUTalasdairTakeThisOuTspamaifh.ed.ac.uk
http://www.dai.ed.ac.uk:80/staff/personal_pages/alasdair

1994\12\06@044943 by crocontroller discussion list

flavicon
face
> Doea anyone know where I can find a LCD control routine for the 16cXX series
> that uses an absolute minimum of other hardware to control the LCD. We are
> talking really cheap circuits here. It has to be able to control a 3.5 digit
> LCD (the smallest I could find).

You do have (usually) a pin constraint and a problem with generation of
AC for the LCD (DC is not that good).

Both problems are well handled with a single AY432 (also Microchip)
or an equivalent one.

I designed a little module that holds the LCD-display, an AY432 and
a connector (5 pin). The AY is placed underneath the display, so the
whole module is really small.

Advantage:

Needs only two pins (Clock, Data)
Holds display even if PIC is shutdown
Uses AC for LCD-control
Very low power (7uA or so)
Up to 4 digits

Mike

--
Dipl.-Ing. Michael Hermann   .....mchKILLspamspam@spam@regent.e-technik.tu-muenchen.de
Lehrstuhl fuer Rechnergestuetztes Entwerfen,     Postfach 202420
Technische Universitaet Muenchen                    089/21053657

1994\12\06@080908 by crocontroller discussion list

flavicon
face
On Tue, 6 Dec 1994, Dave Madden wrote:

> the uChip ... uh ... AYmumblemumble.  It's a 40-pin DIP, or a 44-pin
> PLCC, can be driven with 2 or 3 output lines, and can control (I
> think) up to 32 LCD segments.  I haven't used mine yet, but it was the
> best (i.e. cheapest and available) one I ran across in my brief search
> for that sort of thing.

Microchip AY0438
Will drive up to 32 LCD segments. Requires 3 lines--clock, data, strobe.

Tim McDonough -- timmedspamKILLspamcencom.net

1994\12\06@100100 by crocontroller discussion list

flavicon
face
Philips/Signetics have a series of LCD segment driver chips for I^2C bus.
These are the PCF8566, 76, and 77.

1994\12\06@111918 by crocontroller discussion list

flavicon
face
On Tue, 6 Dec 1994, Timothy McDonough DIAL UP1 wrote:

> On Tue, 6 Dec 1994, Dave Madden wrote:
>
> > the uChip ... uh ... AYmumblemumble.  It's a 40-pin DIP, or a 44-pin
> > PLCC, can be driven with 2 or 3 output lines, and can control (I
> > think) up to 32 LCD segments.  I haven't used mine yet, but it was the
> > best (i.e. cheapest and available) one I ran across in my brief search
> > for that sort of thing.
>
> Microchip AY0438
> Will drive up to 32 LCD segments. Requires 3 lines--clock, data, strobe.

 Also the National 5480 does a good job. We've used in at least 4
designs at work. There is also a Motorola driver chip that we are using
in a current project, but I can never remember all those motorola
numbers. It's a 14something....  <G>

   Brian

------------------------------------------------------------------------------
"Everyone is a prisoner holding their own key."    | finger .....blaneKILLspamspam.....seanet.com
   -- Journey                                     | PGP 2.6 email accepted
------------------------------------------------------------------------------

'1 x 8 LCD display'
1994\12\07@174922 by crocontroller discussion list

flavicon
face
I am working on a PIC project where I need a small LCD display.  I have found
( and seen ) 2 x 16 LCD displays, but have not been able to find a 1 x 8
display.  Can anyone point me in the right direction?  Small size is important.

Ross Lyle
Camosun College
Victoria, B.C. Canada

1994\12\08@071536 by crocontroller discussion list

flavicon
face
Ross Lyle wrote:

>
>I am working on a PIC project where I need a small LCD display.  I have found
>( and seen ) 2 x 16 LCD displays, but have not been able to find a 1 x 8
>display.  Can anyone point me in the right direction?  Small size is important.

Timeline Electronics in Los Angeles (phone 310-784-5488, fax 310-784-7590)
seems to be the most popular source for hobbyists to get LCD displays cheap.  I
haven't dealt with them,  myself,  but I've heard nothing but positive comments
from people who have.  Other surplus dealers sometimes have a few LCD
modules,  but Timeline makes something of a specialty of them,  and advertises
many.  Their latest ad mentions 16x1s and 4x2s for under $10,  but no 8x1s.

Another possibility (but more expensive) is one of those "LCD switches",  which
has a small 24x36-dot LCD display built into a switch pushbutton that's about
an inch square.  Digi-Key has them for about $50,  and there's another catch:
I'm pretty sure there's no character generation,  so you'd have to draw all the
dots yourself.  You should verify this,  though,  because I haven't see a full d
ata
sheet.

Ran

1994\12\08@071536 by crocontroller discussion list

flavicon
face
Ross Lyle wrote:

>
>I am working on a PIC project where I need a small LCD display.  I have found
>( and seen ) 2 x 16 LCD displays, but have not been able to find a 1 x 8
>display.  Can anyone point me in the right direction?  Small size is important.

Timeline Electronics in Los Angeles (phone 310-784-5488, fax 310-784-7590)
seems to be the most popular source for hobbyists to get LCD displays cheap.  I
haven't dealt with them,  myself,  but I've heard nothing but positive comments
from people who have.  Other surplus dealers sometimes have a few LCD
modules,  but Timeline makes something of a specialty of them,  and advertises
many.  Their latest ad mentions 16x1s and 4x2s for under $10,  but no 8x1s.

Another possibility (but more expensive) is one of those "LCD switches",  which
has a small 24x36-dot LCD display built into a switch pushbutton that's about
an inch square.  Digi-Key has them for about $50,  and there's another catch:
I'm pretty sure there's no character generation,  so you'd have to draw all the
dots yourself.  You should verify this,  though,  because I haven't see a full d
ata
sheet.

Ran

1994\12\08@190450 by crocontroller discussion list

flavicon
face
LYLE@CAMOSUN.BC.CA (Ross Lyle) wroteth:

>I am working on a PIC project where I need a small LCD display.  I have
found
>( and seen ) 2 x 16 LCD displays, but have not been able to find a 1 x 8
>display.  Can anyone point me in the right direction?  Small size is
important.

I assume you mean Alpha numeric displays with built in control electronics,
using a 14 pin interface.

1 x 16 is the smallest I've ever seen of these displays.  For small size (at
higher power), you could use LED starburst displays (Litronics 1414, etc).
Two of then would give you eight characters.  The will of course consume
much more power than an LCD.  These displays include their own control
electronics and appear to the computer as 4 byte Write Only Memory.

1994\12\09@045801 by crocontroller discussion list

flavicon
face
>EraseMELYLEspam_OUTspamTakeThisOuTCAMOSUN.BC.CA (Ross Lyle) wroteth:
>
>>I am working on a PIC project where I need a small LCD display.  I have
>found
>>( and seen ) 2 x 16 LCD displays, but have not been able to find a 1 x 8
>>display.  Can anyone point me in the right direction?  Small size is
>important.
>
>I assume you mean Alpha numeric displays with built in control electronics,
>using a 14 pin interface.
>
>1 x 16 is the smallest I've ever seen of these displays. ...

Hitachi make a range of LCD Panels from 8 x 1 up to 40 x 2 (their Chars x
Lines ordering !)

The LM054 is an 8 x 1 Gray display, external dimensions 84 x 44 x 12mm.
Includes built-in HD44780 LSI controller & driver.

This info is straight out of their March 1994 Liquid Crystal Character
display modules catalogue, which Hitachi UK were kind enough to send me.
--
 Ian Harries                        | Email: ihspamspam_OUTdoc.ic.ac.uk
 Department of Computing            |   Tel: +44 171 59 48393 (Direct Dial)
 Imperial College, 180 Queen's Gate |   Fax: +44 171 594 8389
 London SW7 2BZ, UK                 |   URL: http://web.doc.ic.ac.uk/f?/ih

1994\12\09@154550 by crocontroller discussion list

flavicon
face
Ross & all,

I tried to order the Hitachi 8x1, with no success.  Seems everyone has them list
ed, but
Hitachi is waiting for a large order.  I finally found a distributer here in Bou
lder, CO
(not Hatachi) that has 8x1 and 8x2 displays with full drive circuit.  Standard H
itachi 4
bit or 8 bit interface.  Display is small enough to mount in a standard wall swi
tch plate
(approximately 2.5 inches).  I need to look up info if interested, so please let
me know.
If I remember correctly they were $12-14.00 each.

Steve
Dept of Comm.
303-497-3411
----------{Original Message removed}


'LCD/PIC problem'
1995\06\07@004950 by Andrew Warren
face
flavicon
face
Darren Guiden (@spam@darrenKILLspamspamNITEBEAT.DEMON.CO.UK) wrote:

>I have a problem driving a Hitachi LM016L character display with a
>PIC.
>
>The software/hardware works fine with a 16C55, but when I recompiled
>to a 16C71, using the same circuit/clock speed etc the LCD won't
>respond.  I have adjusted the source code to take care of the
>different start address and interupts etc in the '71.

Darren:

If your program uses interrupts, make sure that you're PROPERLY (i.e.,
using SWAPFs) saving/restoring the W and STATUS registers in your
interrupt-service routine.

-Andy

--
Andrew Warren - KILLspamfastfwdKILLspamspamix.netcom.com
Fast Forward Engineering, Vista, California

1995\06\07@020514 by divanov

flavicon
face
Daren sez:

... snip snip ...

{Quote hidden}

... snip snip ...

The problem could lie in the initialization of the LCD. Hitachi only
guarantees 'Initializing by internal reset circuit' if the rise time of the
power supply to the LCD is within 0.1ms to 10ms. Furthermore, they say "if
the lower width of power OFF (less than .2V) is less than 1ms, the internal
reset circuit will not operate normally...". In such case, 'Initializing by
Instruction' is to be done. The procedure is somewhat longish to be
described here, but source code (Parallax asm for '84) is available from me
upon request. Another strange thing about the LCDs using the Hitachi HD44780
controller is that they don't like noisy PSU rise times (they lock and get
red hot). It is therefore recommended to power them up using one of the port
pins.

Hope this helps, Darren.

Regards

Richard Ivanov  RemoveMEdivanovTakeThisOuTspamplessey.co.za

1995\06\07@042533 by o Soares

flavicon
face
Hi there

Darren, I think you are making a mistake with the A4 line. You say that you
have a pull-down resistor there. Since the output of A4 as an open drain (CMOS
talking, not bipolar), you must use a pull-up resistor, not a pull-down. Note
that with a pull-down resistor, you never get an high level there so the LCD
enable line never changes. About the 1K resistor, I've used pull-up's of 10K
without problems (even with TTL logic). If power consuption is important to you,
you may try to increase those pull-up resistors. It also seems to me that you
don't need the pull-up in RA3 (in fact, from all the pins, only RA4 needs an
pull-up resistor, if beeing used as outputs). I'm using a 16C84 with an LCD
and also use port A for outputs. I don't use the pull-up's or pull-down's and
don't have any problem, except that RA4 pin witch in fact *needs* a pull-up.
R. Ivanov also makes some good advises on his mail. You may check that also.
Hope this helps. Try it and say what were the results.

Fernando Soares

'HP PCIM-201 LCD Display'
1995\06\10@152602 by Walter Anderson, C.D.P.

flavicon
face
I've purchased a couple of LCD Displays that I assumed were based upon a standar
d
HD44780 controller; however, I was mistaken.  These are HP parts and are reasona
bly priced;
$9.95 for a 16x2 display.

The data sheet that came with the devices is a third or fourth generation photoc
opy. As a result I
haven't been able to get these devices to initialize.  Has anyone else out there
used these with any
success and if so could you post a snippet of the PIC code you used (I'm not sur
e that I am reading the
control codes correctly)?

Walter Anderson
spamBeGonekhadfwspamBeGonespamonramp.net
Dallas, TX
06/10/95
14:16:05


'LCD driving (an563)'
1995\07\06@014305 by Conny Andersson
picon face
Kalle wrote about driving LCD:s directly from a PIC and maybe connect some
capacitors in series with each segment.

The problem is that all segments act as capacitors itself (more or less) so
I guess that won't fix the problem.
You have to work with the LCD spec. instead and set all the nescessary voltagess
with the IO-ports. I recently built a RPM counter with a multiplexed display
(7x6 segments) and I couldnn't get it to work according to how you usually
drive LCD:s, probably because you cannnot easily set up all the nescessary
voltages.
However, I fixed the problem by connecting resistors (470k) in series with each
segment and then connect all resistors to half the operating voltage of the
circuit. Then I used the tristate option along with low and high to obtain
voltages such as -5,-2.5,0,2.5,5 volts.

Hope this helps,
-----------------------
Conny Andersson, LiTH


'Graphical LCDs'
1995\10\30@093214 by Mike Goelzer
flavicon
face
       Parallax app note 5 talks about controlling an Hitachi LCD module.
The one they use is a character only LCD, though.  Has anyone tried to
interface a PIC to one of those graphical LCDs (like the ones in graphing
calculators)?  If anyone has done this, or knows of an app. note or
schematic I could find somewhere, I'd be very interested.

Thanks.

-mike
--
Mike Goelzer
<TakeThisOuTmgoelzerEraseMEspamspam_OUTus.net>

1995\10\30@112606 by Paul Picot

flavicon
face
On Mon, 30 Oct 1995, Mike Goelzer wrote:

>         Parallax app note 5 talks about controlling an Hitachi LCD module.
> The one they use is a character only LCD, though.  Has anyone tried to
> interface a PIC to one of those graphical LCDs (like the ones in graphing
> calculators)?

I've had a look in several of these sorts of calculators, with the aim of
using the LCD for my own purposes.  Unfortunately, they all seem to bury
the LCD controller in the calculator microcontroller.  It would seem the
only way to use these LCDs is to use a similar microcontroller and
program IT.  It looks virtually impossible to use these as off-the-shelf
LCD units... the drive waveforms are decidedly non-trivial.

If anyone has a lead on small bitmap LCD's that aren't outrageous in
price, I'm sure a lot of people on this list would like to hear about them.

One off-the-wall idea is to use these small LCD televisions: they have OK
resolution (starting about 160x120?) and can take a standard serial
bitstream in ... ;-)  You can even do colour if you want to pay a bit more.

-Paul

1995\10\30@113035 by Mike Goelzer

flavicon
face
       The list server rejected this message the first time around (at
least, it sent me
a note saying that the message had been rejected) so I am sending it again.
If anyone gets this message twice, I apologize.

      Parallax app note 5 talks about controlling an Hitachi LCD module.
The one they use is a character only LCD, though.  Has anyone tried to
interface a PIC to one of those graphical LCDs (like the ones in graphing
calculators)?  If anyone has done this, or knows of an app. note or
schematic I could find somewhere, I'd be very interested.

-mike
--
Mike Goelzer
<RemoveMEmgoelzerspamTakeThisOuTus.net>

1995\10\30@114544 by BBoles

flavicon
face
Digi-Key has some Optrex graphical LCD modules 240 * 64 pixels with controller
on board.  OP64240N-ND $95.

Rgds, Brian.           bbolesEraseMEspam.....microchip.com

______________________________ Reply Separator _________________________________
Subject: Re: Graphical LCDs
Author:  Paul Picot <EraseMEppicotspamIRUS.RRI.UWO.CA> at Internet_Exchange
Date:    10/30/95 11:24 AM


On Mon, 30 Oct 1995, Mike Goelzer wrote:

>         Parallax app note 5 talks about controlling an Hitachi LCD module.
> The one they use is a character only LCD, though.  Has anyone tried to
> interface a PIC to one of those graphical LCDs (like the ones in graphing
> calculators)?

I've had a look in several of these sorts of calculators, with the aim of
using the LCD for my own purposes.  Unfortunately, they all seem to bury
the LCD controller in the calculator microcontroller.  It would seem the
only way to use these LCDs is to use a similar microcontroller and
program IT.  It looks virtually impossible to use these as off-the-shelf
LCD units... the drive waveforms are decidedly non-trivial.

If anyone has a lead on small bitmap LCD's that aren't outrageous in
price, I'm sure a lot of people on this list would like to hear about them.

One off-the-wall idea is to use these small LCD televisions: they have OK
resolution (starting about 160x120?) and can take a standard serial
bitstream in ... ;-)  You can even do colour if you want to pay a bit more.

-Paul

1995\10\30@144423 by John La Rooy

flavicon
face
>
> I've had a look in several of these sorts of calculators, with the aim of
> using the LCD for my own purposes.  Unfortunately, they all seem to bury
> the LCD controller in the calculator microcontroller.  It would seem the
> only way to use these LCDs is to use a similar microcontroller and
> program IT.  It looks virtually impossible to use these as off-the-shelf
> LCD units... the drive waveforms are decidedly non-trivial.
>
I tried this with a calculator I bought for about $10NZ ($5US), it
had a 10 digit tilting display which meant it was connected to the board
via a nasty piece of flat ribbon instead of the even more nasty carbon
rubber connectors they usually use. By displaying all 8's, and
disconnecting one line at a time, I found that it had 3 backplanes.
I then connected it up to about 5 4094's and a bunch of resistors, worked
ok but a lot of work to get it going.


--
John

==============================================================
RemoveMEj_larooyEraseMEspamEraseMEatlas.otago.ac.nz
Univeristy of Otago
New Zealand                     The early bird is for the cat
==============================================================

1995\10\30@145719 by Mike Goelzer

flavicon
face
>Digi-Key has some Optrex graphical LCD modules 240 * 64 pixels with controller
>on board.  OP64240N-ND $95.
>
>Rgds, Brian.           RemoveMEbbolesspam_OUTspamKILLspammicrochip.com
>

Yes, but the original question was what are the issues involved in
controlling these beasts using a PIC.  For example, how do you interface to
them, how many I/O
pins are required, etc.  If anyone has any info on this, I'd be interested
to hear it.

-mike
--
Mike Goelzer
<RemoveMEmgoelzerTakeThisOuTspamspamus.net>

1995\10\30@155647 by Paul Picot

flavicon
face
> Digi-Key has some Optrex graphical LCD modules 240 * 64 pixels with controller
> on board.  OP64240N-ND $95.

My (old) catalogue shows them (OP24064) as $145.46.  So the price is a bit
better, but still unreasonable IMHO.  The trade literature says LCD panels
(glass,electrodes,polarizers) are about $1/square inch.  The controller
chips are surely quantity items, and can't be worth more than $2.  Add
another $2 for the board and steel mounting frame.  $10 raw parts cost.
Even counting a factor-of-two at both the manufacturer and distributor,
and throwing in a bit of shipping costs, these modules should cost
less than $50.

-Paul

1995\10\30@170659 by Paul Picot

flavicon
face
On Mon, 30 Oct 1995 EraseMEBBolesspamspamspamBeGoneCCMAIL.MICROCHIP.COM wrote:

> Digi-Key has some Optrex graphical LCD modules 240 * 64 pixels with controller
> on board.  OP64240N-ND $95.

Hey! Wait a minute! I just had a second look: the OP24064N-ND (I assume
you just transposed the digits above) seems NOT to come with controller:
it says it requires a HD1830B/MSM6255 controller set.  Sigh.  Add another
$30 or so and some headache.

-Paul

1995\10\30@183815 by BBoles

flavicon
face
    Nope, I didn't transpose the digits.  I'm on pg. 351 of the #955
    Sept-Oct. 95 catalog.  I haven't actually used it, but the book reads
    that the controller is on board.


______________________________ Reply Separator _________________________________
Subject: Re: Re[2]: Graphical LCDs
Author:  Paul Picot <RemoveMEppicotKILLspamspamIRUS.RRI.UWO.CA> at Internet_Exchange
Date:    10/30/95 5:03 PM


On Mon, 30 Oct 1995 BBolesSTOPspamspamspam_OUTCCMAIL.MICROCHIP.COM wrote:

> Digi-Key has some Optrex graphical LCD modules 240 * 64 pixels with controller
> on board.  OP64240N-ND $95.

Hey! Wait a minute! I just had a second look: the OP24064N-ND (I assume
you just transposed the digits above) seems NOT to come with controller:
it says it requires a HD1830B/MSM6255 controller set.  Sigh.  Add another
$30 or so and some headache.

-Paul

1995\10\31@005859 by Scott Stephens

picon face
I've found some good deals on graphic LCD's though Timeline & Nuts & Volts.


'Display For LCD Matrix'
1995\11\08@182405 by John.P.Hollingshead
flavicon
face
I'm looking for code, pinouts etc for LCD matrix displays.

Also, I'm looking for some good sources for the displays.  What I
have in mind, is for using a pic 16c57 for taking the 2of 8 binarie
from a cd22202e dtmfdecode chip, and outputing to a serial e-prom and
to output to the display.  It then must be able to access the eeprom
to get readback buffers.

Also, I'd like to find out how to use a pic to output to rs-232c and
parrellel.

any help would be appreciated.


John P. Hollinghsead ]I[  KB5SXH
President Texas Data Systems
Pearland, TX
spamBeGoneavdealSTOPspamspamEraseMEhollingshead.com
(713) 485-0394
Fax: (713) 485-8223

'Display For LCD Matrix (fwd)'
1995\11\09@002251 by David G. Schmidt

flavicon
face
Check out the Sept 95 issue of Popular Electronics.  Terry Weeder of
Weeder technologies has done an article and sells such a unit cheaply,
kit form.  He has
interfaced a PIC to a serial EEprom and an lcd display with scrollback
buffers.  This issue is within the last year.  He used a 4 bit binary
output DTMF chip, but his code can be modified for your 2 of 8 output
chip.  BTW, does the chip have a selector for 4 bit binary out or 2 of 8?

--------------------------------------------
( Dave Schmidt       DSchmidt Technologies )
( KILLspamdschmidtspamBeGonespamrain.org     Ventura, CA        )
( Own an FME? ->finger EraseMEdschmidtspamEraseMErain.org   )
--------------------------------------------

On Tue, 7 Nov 1995 @spam@John.P.Hollingshead@spam@spamspam_OUTHAPPY.FIRSTNETHOU.COM wrote:

{Quote hidden}

'DTMF sample code to LCD'
1995\11\09@103803 by David G. Schmidt

flavicon
face
Check out the Sept 95 issue of Popular Electronics.  Terry Weeder of
Weeder technologies has done an article and sells such a unit cheaply,
kit form.  He has
interfaced a PIC to a serial EEprom and an lcd display with scrollback
buffers.  This issue is within the last year.  He used a 4 bit binary
output DTMF chip, but his code can be modified for your 2 of 8 output
chip.  BTW, does the chip have a selector for 4 bit binary out or 2 of 8?

--------------------------------------------
( Dave Schmidt       DSchmidt Technologies )
( .....dschmidtspam_OUTspamrain.org     Ventura, CA        )
( Own an FME? ->finger TakeThisOuTdschmidt.....spamTakeThisOuTrain.org   )
--------------------------------------------

On Tue, 7 Nov 1995 TakeThisOuTJohn.P.HollingsheadKILLspamspamspamHAPPY.FIRSTNETHOU.COM wrote:

> I'm looking for code, pinouts etc for LCD matrix displays.

'EEPROM & LCD Matrix'
1995\11\09@110800 by SONY-OD

flavicon
face
From "Philippe"<.....sonyedespamRemoveMEiway.fr>

On Tue, 7 Nov 1995 RemoveMEJohn.P.HollingsheadspamspamBeGoneHAPPY.FIRSTNETHOU.COM wrote:

> Also, I'm looking for some good sources for the displays.  What I
> have in mind, is for using a pic 16c57 for taking the 2of 8 binarie
> from a cd22202e dtmfdecode chip, and outputing to a serial e-prom and
> to output to the display.  It then must be able to access the eeprom
> to get readback buffers.

I already do that, specially to read/write serial EEPROM, I use a 93C46, but
another type can also be driven with this code.

Here is a piece of code to drive EEPROM


;>>>>>> START OF SAMPLE CODE
; This what I do to drive a PLL MC145170 and a 96C46 EEPROM

;******************************************************************************
;   HCK      = PortC.1
;   DATA out = PortC.3
;   DATA in  = PortC.5
;   CS PLL   = PortC.2
;   CS ROM   = PortC.6
;
;----- PLL & EEPROM  Constants

bHCK           equ 1
PEnb           equ 2
REnb           equ 6
bDout          equ 3
bDin           equ 5
bLock          equ 0

;******************************************************************************
; READ Routine for SERIAL EEPROM (96C46 : 64 X 16Bit)
; REGISTER used:
;    Data1         -> $0E
;    Data2         -> $0D
;    Address/Temp  -> $0F
;    EETemp        -> $0A

        org $0600
                  ;76543210
SetDataOut     equ %10110001

EERead:  movlw SetDataOut   ; Set HCK/DOUT/ENB as OUTPUT
        tris  C
        bcf  SPort,bHCK    ; bHCK = 0
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        bsf  SPort,PEnb    ; PEnb = 1    PLL ACCESS disable

        bcf  SPort,bDOUT
        bsf  SPort,REnb
        nop
        nop
        bsf  SPort,bHCK
        nop
        nop

        call EEStart
        movf Temp,W        ; GET Address from Temp register
        andlw %00111111    ; it's a 6 bit ADDRESS
        iorlw  %10000000   ; ADD Read INSTRUCTION to the word
        call EERdOut
        call EERdIn
        movf  Data1,W
        movwf Data2
        call EERdIn
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        retlw 0

;---------------
EEStart: bcf SPort,bHCK
        bsf SPort,Renb
        bsf SPort,bDOut
        nop
        nop
        nop
        bsf SPort,bHCK
        nop
        nop
        bcf SPort,bHCK
        nop
        retlw 0

;---------------
EERdOut: bsf SPort,Renb
        movwf EETemp
        movlw 8
        movwf Temp
        bcf SPort,bHCK

EERdO_1: bcf SPort,bDOut
        rlf EETemp
        btfsc STATUS,Cy
        bsf SPort,bDOut
        nop
        nop
        bsf SPort,bHCK
        nop
        nop
        nop
        bcf SPort,bHCK
        decfsz Temp
        goto EERdO_1
        retlw 0

;---------------
$BREAK
EERdIn:  bsf SPort,Renb
        movlw 8
        movwf Temp
        bcf SPort,bHCK

EERdI_1: nop
        nop
        bsf SPort,bHCK
        nop
        bcf STATUS,Cy
        btfsc SPort,bDIn
        bsf STATUS,Cy
        rlf Data1
        nop
        bcf SPort,bHCK
        decfsz Temp
        goto EERdI_1
        retlw 0

;******************************************************************************
;******************************************************************************
; ENABLE, DISABLE and WRITE Routine for SERIAL EEPROM (64 X 16Bit)
; REGISTER used:
;    Data1         -> $0E
;    Data2         -> $0D
;    Address/Temp  -> $0F
;    EETemp        -> $0A
;    CounterA      -> $1D
;    CounterB      -> $1E


EEEnable:movlw SetDataOut   ; Set HCK/DOUT/ENB as OUTPUT
        tris  C
        bcf  SPort,bHCK    ; bHCK = 0
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        bsf  SPort,PEnb    ; PEnb = 1    PLL ACCESS disable

        bcf  SPort,bDOUT
        bsf  SPort,REnb
        nop
        nop
        bsf  SPort,bHCK
        nop
        nop
        bcf  SPort,bHCK

        call EEStart
        movlw %00110000    ; ENABLE WRITE INSTRUCTION
        call EERdOut
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        retlw 0

EEDisable:movlw SetDataOut   ; Set HCK/DOUT/ENB as OUTPUT
        tris  C
        bcf  SPort,bHCK    ; bHCK = 0
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        bsf  SPort,PEnb    ; PEnb = 1    PLL ACCESS disable

        call EEStart
        movlw %00000000    ; DISABLE WRITE INSTRUCTION
        call EERdOut
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        retlw 0

EEWrite: movlw SetDataOut   ; Set HCK/DOUT/ENB as OUTPUT
        tris  C
        bcf  SPort,bHCK    ; bHCK = 0
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        bsf  SPort,PEnb    ; PEnb = 1    PLL ACCESS disable

        call EEStart
        movf Temp,W        ; GET Address from Temp register
        andlw %00111111    ; it's a 5 bit ADDRESS
        iorlw %01000000    ; ADD WRITE INSTRUCTION to the word
        call EERdOut
        movf Data2,W       ; Get the "HIGH WORD"
        call EERdOut
        movf Data1,W       ; Get the "LOW WORD"
        call EERdOut

        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        nop                ; NOW, waiting for acknowledge
        bsf  SPort,bHCK
        nop
        clrf Temp
        bcf  SPort,bHCK
        nop
        bsf  SPort,REnb
        movlw MaxWriteTime
        movwf CounterA

EEWait_1:bsf SPort,bHCK
        nop
        nop
        btfsc SPort,bDIn
        goto EEWait_2
        nop
        bcf SPort,bHCK
        nop
        decfsz Temp
        goto EEWait_1
        decfsz CounterA
        goto EEWait_1
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        retlw 1            ; return "1" there is a problem to write th WORD !!!

EEWait_2:bcf  SPort,bHCK
        bcf  SPort,REnb    ; REnb = 0    ROM ACCESS disable
        retlw 0            ; return "0", OK.

;>>>>>> END OF SAMPLE CODE

'DTMF sample code to LCD'
1995\11\09@130508 by David Brenegan

picon face
I was wondering if you could modify his design to use a 16c84
and have the dtmf chip and the lcd use some of the same
data lines and seperate enable lines? Does this seem possible
or would you potentially lose some dtmf tones comming in?
(I'm new at this stuff....).

Thanks.
_David

'Display For LCD Matrix (fwd)'
1995\11\09@131339 by Joe Callahan

flavicon
face
For those of us that don't have access to Popular Electronics, could you
or someone post the address and/or phone number of "Weeder Technologies"?

Regards, Joe Callahan
spamBeGonecallahan@spam@spamspam_OUTaz.com
><><><><><><><><><><><><><><><><><><><><><>

On Wed, 8 Nov 1995, David G. Schmidt wrote:

{Quote hidden}

1995\11\09@142134 by David G. Schmidt

flavicon
face
When I get home from work this evening I'll post his address and phone
number.  Weeder Tech. also has a bunch of other PIC type kits and does PIC
consulting work also

--------------------------------------------
( Dave Schmidt       DSchmidt Technologies )
( EraseMEdschmidtspam@spam@rain.org     Ventura, CA        )
( Own an FME? ->finger @spam@dschmidtspam_OUTspam.....rain.org   )
--------------------------------------------

> or someone post the address and/or phone number of "Weeder Technologies"?
>
> > Check out the Sept 95 issue of Popular Electronics.  Terry Weeder of
> > Weeder technologies has done an article and sells such a unit cheaply,

'EEPROM & LCD Matrix'
1995\11\09@223809 by Tesaro Sandu

flavicon
face
Hello all ..
sorry about the topic .. its a different one  ..

we are doing a project with the PIC16C54-lp/p, the supply voltage is 3V
and the Xtal is 32.786 kHz .(watch crystal)..

it basically just gets the result from 4 swithes, and flashes a LED
acordingly..

Our problem is that some do not want to start. The crystal does not want
to start on some units. We are using 33p caps with them .. We have tried
different values, and we still get the same problem ...

We tried the delayed reset .. still is the same problem...

HELP ;)


Any ideas pplz ...  --
------------------------------------------------------------------------------

    Quote : Ambition is the key to success.
            Do you listen to your heart or someone elses ?
            Life is short, Make the most of it!

    Tesaro Sandu                   or                   Love-God (IRC)

                        call on  : (0416) 141 818
                   email on : spamBeGonetsanduEraseMEspamst.nepean.uws.edu.au
          http: //http://www.st.nepean.uws.edu.au/users/tsandu/index.html

------------------------------------------------------------------------------

1995\11\09@225719 by Brad Phillips

flavicon
face
About those watch crystals....

I had the same problem a few days ago. Try some 47pF caps and see how you
go - this was my solution.
cheers, Brad

'DTMF sample code to LCD'
1995\11\10@023556 by adrian

flavicon
picon face
> I was wondering if you could modify his design to use a 16c84
> and have the dtmf chip and the lcd use some of the same
> data lines and seperate enable lines? Does this seem possible
> or would you potentially lose some dtmf tones comming in?
> (I'm new at this stuff....).


Hmmm.

Typical LCD - 4 data lines, R/W, E, RS       total 7 lines
Typical DTMF - 4 lines only, maybe five      lets say 4 lines
Serial EEPROM, clock and data                total 2 lines
                                             13 lines = 16C84

You could probably make it work without too much hassle.
I guess control control input keys, but DTMF could be used for this also.
You can use the EEPROM clock without a start condition as one of
the LCD lines (say RS) to free anothr line. This could be used with a diode
on the 4 LCD data lines to give a 4 key keypad.

piece of cake <-:

--
_
(_) _| _ . _  _   Tel +44 973 222257
( )(_|(  |(_|| )  Fax UK 0500 222258                    E&OE

1995\11\10@055356 by Mike Keitz

flavicon
face
>I was wondering if you could modify his design to use a 16c84
>and have the dtmf chip and the lcd use some of the same
>data lines and seperate enable lines? Does this seem possible
>or would you potentially lose some dtmf tones comming in?
>(I'm new at this stuff....).
>
If the DTMF chip has an enable pin, then it can be used to share a bus with
the LCD, serial EEPROM, and other chips assuming they have enables as well.
Each chip needs a dedicated line back to the PIC to select it.  In a larger
system a decoder like a 74HCT138 could be used (unfortunately, the LCD,
93CXX, and most DTMF chips have active high enables, so an active-low
decoder wouldn't work well).  Data will not be lost since it only takes a
few microseconds to access each chip and go to the next one.  Also, many
DTMF chips latch the last tone code received until another one is detected.
I usually use the LCDs in the 4-bit mode to save PIC pins as well.

Using a bus like this, with none of the peripheral chips selected the PIC
pins can be used as inputs by driving them through resistors.  This could be
used for the 'tone detected' function from the DTMF chip as well as any user
controls that the project has.

Another note about this project, the HD44780-based LCD units have 80 bytes
of display RAM and 64 bytes of custom-character RAM, regardless of the size
of the screen.  Especially if the display is smaller than 80 characters, the
extra 128 bytes or so of RAM could be used for (volatile) scroll-back
storage instead of a serial EEPROM.  The specifications I have don't say how
much power the display units use with the display disabled though, it may
not be practical to 'sleep' them and keep the RAM alive if the
decoder/display is expected to retain the data for a long time.

-Mike

'GRAPHICAL LCDS'
1995\11\12@152738 by doug r. boulware

flavicon
face
PP> If anyone has a lead on small bitmap LCD's that aren't outrageous in
PP> price, I'm sure a lot of people on this list would like to hear
PP> about them.

I recently got a 480 X 128 LCD display from ALL ELECTRONICS (1-800-
826-5432) for $12.  It has drivers but no controller.  I was hoping to
build a controller from a PIC, but after getting the part and looking at
the specs, I decided the PIC was too slow.

The screen is divided into four quadrants, and each quadrent has a
serial data line.  The pixel data is clocked into the four serial lines
at around 1.2Mhz.  The spec sheet said the minimum clock frequency was
something like 1.08Mhz.

I ended up sending it back and asked to exchange it for a simpler
single line character LCD display, which also costs $12.  Haven't got it
yet.

Doug Boulware <dougrbspamBeGonespamfree.org>




* RM 1.3  *

1995\11\16@185535 by doug r. boulware

flavicon
face
PP> If anyone has a lead on small bitmap LCD's that aren't outrageous in
PP> price, I'm sure a lot of people on this list would like to hear
PP> about them.

I recently got a 480 X 128 LCD display from ALL ELECTRONICS (1-800-
826-5432) for $12.  It has drivers but no controller.  I was hoping to
build a controller from a PIC, but after getting the part and looking at
the specs, I decided the PIC was too slow.

The screen is divided into four quadrants, and each quadrent has a
serial data line.  The pixel data is clocked into the four serial lines
at around 1.2Mhz.  The spec sheet said the minimum clock frequency was
something like 1.08Mhz.

I ended up sending it back and asked to exchange it for a simpler
2 X 20 character LCD display, which also costs $12.  Haven't got it yet.

Doug Boulware <RemoveMEdougrb@spam@spamspamBeGonefree.org>




* RM 1.3  *

'Lcd Displays'
1995\11\20@202729 by avdeal

flavicon
face
I'm trying to get some code and so on together, for displaying to a
ROHM 16x1 dot matric display.

any help would be appreciated..


John P. Hollinghsead ]I[  KB5SXH
President Texas Data Systems
Pearland, TX
.....avdeal@spam@spamEraseMEhollingshead.com
(713) 485-0394
Fax: (713) 485-8223

'PIC as muxed LCD driver'
1995\11\21@010938 by Gregg Blas

flavicon
face
I've only been reading this list for a month or so,
and already picked up numerous pieces of interesting
information. I am also new to the PIC processor, and
am about to start a new project using the 16C65 and
would appreciate any assistance on the following problem:
 Microchips' Ap Note AN563 gives some pretty specific
info for the hardware and software for using a PIC as
a multiplexed LCD driver directly from the pins, but the
example is for a simple 2-backplane LCD. I would like
to use the same technique to drive a 3-backplane LCD...
basically a 3 3/4 BCD digit LCD with a few annunciators.
Is such a thing possible without violating the DC voltage
spec of the LCD? How complex is the code, and can it be
done with a '65?  Any code examples would be appreciated...
TIA
.....greggwbRemoveMEspamnetcom.com
         Gregg Blas
-- .....greggwbSTOPspamspam@spam@netcom.com --

1995\11\21@010938 by Gregg Blas

flavicon
face
I've only been reading this list for a month or so,
and already picked up numerous pieces of interesting
information. I am also new to the PIC processor, and
am about to start a new project using the 16C65 and
would appreciate any assistance on the following problem:
 Microchips' Ap Note AN563 gives some pretty specific
info for the hardware and software for using a PIC as
a multiplexed LCD driver directly from the pins, but the
example is for a simple 2-backplane LCD. I would like
to use the same technique to drive a 3-backplane LCD...
basically a 3 3/4 BCD digit LCD with a few annunciators.
Is such a thing possible without violating the DC voltage
spec of the LCD? How complex is the code, and can it be
done with a '65?  Any code examples would be appreciated...
TIA
greggwbEraseMEspam@spam@netcom.com
         Gregg Blas
-- RemoveMEgreggwbspamspamBeGonenetcom.com --

'Lcd Displays'
1995\11\21@025143 by SONY-OD

flavicon
face
on Fri, 10 Nov 1995, John P. Hollinghsead wrote:

>I'm trying to get some code and so on together, for displaying to a
>ROHM 16x1 dot matric display.

>any help would be appreciated..

This is the set of commands for all LCD panel which are driven with the
HITACHI HD44780 controller, just check your panel to look at the chip.
LCD panel can driven by 4 or 8 bits. There is also 3 lines EN (Enable), D/I
(Data/Instruction) and R/W (Read/Write).
To connect with a minimum of wires you need 4+3 I/O lines in 4 bit mode.

Sequence for signals are as follow
              1st         2nd
              ____        ____
EN        ____|    |______|    |_____
             ____        ____
Data      ___|____|______|____|______
(4bit mode)   d4-d7        d3-d0

LCD panel is drived by an HITACHI controller HD44780 (panel ref: LM054,
LM016L, LM020L, LM041L, LM032L, LM044L, LM243A, LM027, LM23A, LM017L,
LM018L, etc ...).

Commands can be sent in frame of 4 or 8 bits. A reset put the panel in 8
bits mode. 4 bits mode use only bit B4,B5,B6 and B7.

Commands:
Exec.   DI RW b7 b6 b5 b4 b3 b2 b1 b0
1,52ms  0  0  0  0  0  0  0  0  0  1  Reset LCD Panel, Erase RAM
1,52ms  0  0  0  0  0  0  0  0  1  -  Cursor + AC=0, Display in origin position
37us    0  0  0  0  0  0  0  1 I/D S  Define cursor movment and shift display
37us    0  0  0  0  0  0  1  D  C  S  Display ON/OFF(D), cursor(C) and blonk
at                                       cursor position(B)
37us    0  0  0  0  0  1 S/L R/L-  -  Move the cursor and shift display
37us    0  0  0  0  1  DL N  F  -  -  Define bus length (DL), number of
line,                                         matrix font used (5x8 or 5x10)
37us    0  0  0  1  CG RAM Address    Define CG RAM Address
37us    0  0  1     DD RAM Address    Define DD RAM Address
0us     0  1  BF  Address counter AC  Read busy Flag & AC
37us    1  0     Write DATA           Write DATA into DD or CG RAM
37us    1  1     Read DATA            Read DATA from DD or CG RAM


Legend:
I/D  = 1: Increment, I/D = 0 : Decrement
S    = 1: Shift display
R/L  = 1: Shift to the right; R/L = 0 : Shift to the left
DL   = 1: 8 Bits; DL = 0 : 4 Bits
N    = 1: 2 or 4 lines; N = 0 : 1 line
F    = 1: 5x10 matrix; F = 0 : 5x8 matrix
BF   = 1: Busy; BF = 0 : free, can receive an instruction
DD Ram: Data Display RAM
CG Ram: Character Generator RAM

Execution time is given for a 270khz clock frequency (250-270Khz seems to be
the average value for current LCD panel).

RAM is not continuous RAM, mapping depend how many characters and line there
is in the panel. You can also define your own characters (CG RAM), only 8
CHR could be defined:

for 16x1:
1st line:  00h  01h ...  27h


for 16x2:
1st line:  00h  01h ...  27h
2nd line   40h  41h ...  67h

Regards,

      Philippe. <spamBeGonesonyedeKILLspamspam@spam@iway.fr>

1995\11\21@025143 by SONY-OD

flavicon
face
on Fri, 10 Nov 1995, John P. Hollinghsead wrote:

>I'm trying to get some code and so on together, for displaying to a
>ROHM 16x1 dot matric display.

>any help would be appreciated..

This is the set of commands for all LCD panel which are driven with the
HITACHI HD44780 controller, just check your panel to look at the chip.
LCD panel can driven by 4 or 8 bits. There is also 3 lines EN (Enable), D/I
(Data/Instruction) and R/W (Read/Write).
To connect with a minimum of wires you need 4+3 I/O lines in 4 bit mode.

Sequence for signals are as follow
              1st         2nd
              ____        ____
EN        ____|    |______|    |_____
             ____        ____
Data      ___|____|______|____|______
(4bit mode)   d4-d7        d3-d0

LCD panel is drived by an HITACHI controller HD44780 (panel ref: LM054,
LM016L, LM020L, LM041L, LM032L, LM044L, LM243A, LM027, LM23A, LM017L,
LM018L, etc ...).

Commands can be sent in frame of 4 or 8 bits. A reset put the panel in 8
bits mode. 4 bits mode use only bit B4,B5,B6 and B7.

Commands:
Exec.   DI RW b7 b6 b5 b4 b3 b2 b1 b0
1,52ms  0  0  0  0  0  0  0  0  0  1  Reset LCD Panel, Erase RAM
1,52ms  0  0  0  0  0  0  0  0  1  -  Cursor + AC=0, Display in origin position
37us    0  0  0  0  0  0  0  1 I/D S  Define cursor movment and shift display
37us    0  0  0  0  0  0  1  D  C  S  Display ON/OFF(D), cursor(C) and blonk
at                                       cursor position(B)
37us    0  0  0  0  0  1 S/L R/L-  -  Move the cursor and shift display
37us    0  0  0  0  1  DL N  F  -  -  Define bus length (DL), number of
line,                                         matrix font used (5x8 or 5x10)
37us    0  0  0  1  CG RAM Address    Define CG RAM Address
37us    0  0  1     DD RAM Address    Define DD RAM Address
0us     0  1  BF  Address counter AC  Read busy Flag & AC
37us    1  0     Write DATA           Write DATA into DD or CG RAM
37us    1  1     Read DATA            Read DATA from DD or CG RAM


Legend:
I/D  = 1: Increment, I/D = 0 : Decrement
S    = 1: Shift display
R/L  = 1: Shift to the right; R/L = 0 : Shift to the left
DL   = 1: 8 Bits; DL = 0 : 4 Bits
N    = 1: 2 or 4 lines; N = 0 : 1 line
F    = 1: 5x10 matrix; F = 0 : 5x8 matrix
BF   = 1: Busy; BF = 0 : free, can receive an instruction
DD Ram: Data Display RAM
CG Ram: Character Generator RAM

Execution time is given for a 270khz clock frequency (250-270Khz seems to be
the average value for current LCD panel).

RAM is not continuous RAM, mapping depend how many characters and line there
is in the panel. You can also define your own characters (CG RAM), only 8
CHR could be defined:

for 16x1:
1st line:  00h  01h ...  27h


for 16x2:
1st line:  00h  01h ...  27h
2nd line   40h  41h ...  67h

Regards,

      Philippe. <sonyedespam_OUTspam@spam@iway.fr>

'PIC as muxed LCD driver'
1995\11\21@111414 by BBoles

flavicon
face
    The method shown in AN563 could be expanded to drive 3 or 4 commons.
    This method is using what is called 1/2 bias.  Three commons would
    require 1/3 multiplex.  If you get a copy of some documentation that
    shows the waveforms for 1/3 mux, with 1/2 bias, the required code
    should be easy to modify from the ANote.  My personal favorite LCD
    info is in Hitachi's "LCD Controller/Driver LSI Data Book"

    Naturally, the delays involved in setting the waveforms will induce
    more DC into the LCD.  To minimize this, run as fast as you can and
    write all ports in a burst of code that changes all ports together as
    fast as possible.

    Rgds, Brian.


______________________________ Reply Separator _________________________________
Subject: PIC as muxed LCD driver
Author:  Gregg Blas <spamBeGonegreggwb@spam@spamNETCOM.NETCOM.COM> at Internet_Exchange
Date:    11/20/95 10:05 PM


I've only been reading this list for a month or so,
and already picked up numerous pieces of interesting
information. I am also new to the PIC processor, and
am about to start a new project using the 16C65 and
would appreciate any assistance on the following problem:
 Microchips' Ap Note AN563 gives some pretty specific
info for the hardware and software for using a PIC as
a multiplexed LCD driver directly from the pins, but the
example is for a simple 2-backplane LCD. I would like
to use the same technique to drive a 3-backplane LCD...
basically a 3 3/4 BCD digit LCD with a few annunciators.
Is such a thing possible without violating the DC voltage
spec of the LCD? How complex is the code, and can it be
done with a '65?  Any code examples would be appreciated...
TIA
RemoveMEgreggwbEraseMEspamKILLspamnetcom.com
         Gregg Blas
-- spamBeGonegreggwbspam_OUTspamRemoveMEnetcom.com --


'PIC driving LCD question'
1995\12\21@234231 by Mike Goelzer
flavicon
face
       I have a snippet of code here which is from a Parallax app note
on interfacing a PIC to a standard character LCD module.  It is very
sparsely commented, and basically I was wondering if someone could help
me figure out how it works.  Here's the code:

               mov     temp2,#00110000b
                                     ;Initialize LCD: set 8-bit, 1-line
                                     ;operation

               call    blip_E
               mov     temp2,#00001110b
               call    blip_E
               mov     temp2,#00000110b
               call    blip_E

In case you're not familiar with this particular app note, the blip_E
routine basically just sends the data in temp2 to the LCD.  The reason
its in its own routine is that blip_E first waits until the LCD is not
busy before blipping the Enable line (hence the name, blip_E).

Anyway, according the that lone comment, this code sets the LCD to
8-bit, 1 line operation.  Can someone explain to me what each of
those three instructions which are being sent to the LCD are doing?
I'm actually working with a 2-line LCD, and I therefore want to know
which of those 3 instructions is setting the LCD to singe-line mode, so
I can change it to 2-line mode.  Also, any pointers to a good reference
book/article on controlling LCDs -- one that might have all the control
instructions such as the above 3 listed in it -- would be appreciated.

Thanks for any help.

-mike

1995\12\22@003635 by Andrew Warren

flavicon
face
Mike Goelzer <.....PICLISTspamRemoveMEMITVMA.MIT.EDU> wrote:

{Quote hidden}

Mike:

The first instruction, "00110000", is called "Function Set".  Its
bits are structured as follows:

       001LNF00        - L: Interface Data Length (0=4 bits, 1=8 bits)
                               - N: Number of Display Lines (0=1 line, 1=2 line
s)
                               - F: Font (0=5x7, 1=5x10)

The next instruction, "00001110", is called "Display On/Off Control".
The structure of this instruction is:

       00001DCB0       - D: Display On/Off (0=Off, 1=On)
                               - C: Cursor On/Off (0=Off, 1=On)
                               - B: Blink at Cursor position On/Off (0=Off, 1=O
n)

The final instruction "00000110", is called "Entry Mode Set".  It's
structured as follows:

       000001JS        - J: Cursor-Move Direction (0=Rightward, 1=Leftward)
                               - S: Shift (0=Leave Display static & Move Cursor
,
                                          (1=Leave Cursor static and Shift Disp
lay)

To modify this code for a 2-line display, change the first
instruction to "00111000".  Remember that the LCD controller treats
each line of the display as though it were 64 columns wide, so the
address of the first character of the second line is 40 hex, no
matter how wide your display actually is.

For more information, get the LCD databook from Hitachi, AND,
Stanley, EPSON, or any of the other manufacturers of these things...
They all use the same Hitachi LCD controller chip.

-Andy

Andrew Warren - fastfwdspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geopages.com/SiliconValley/2499

1995\12\22@040738 by Robert Lunn

flavicon
picon face
>         I have a snippet of code here which is from a Parallax app note
> on interfacing a PIC to a standard character LCD module.
>
...snip...
>
> Anyway, according the that lone comment, this code sets the LCD to
> 8-bit, 1 line operation.  Can someone explain to me what each of
> those three instructions which are being sent to the LCD are doing?
> I'm actually working with a 2-line LCD, and I therefore want to know
> which of those 3 instructions is setting the LCD to singe-line mode, so
> I can change it to 2-line mode.  Also, any pointers to a good reference
> book/article on controlling LCDs -- one that might have all the control
> instructions such as the above 3 listed in it -- would be appreciated.

When you say "standard character LCD module" you seem to mean an LCD
module using an Hitachi HD44780 Dot Matrix LCD Controller/Driver.
This is a _very_ common controller chip for small one, and two, line
displays; but "standard" might be stretching it.

You need a copy of the "Hitachi LCD Controller/Driver LSI" databook.
Or a datasheet for the HD44780 (or HD44780A, or LCD-II, or other
compatible) IC.

To keep you going, here is the command set for the chip:

       00000001        Clear display and Home cursor
       0000001*        Home cursor
       000001AB        Set cursor move and display shift
       00001CDE        Turn on/off display, cursor, blink
       0001FG**        Move cursor and shift display
       001HJK**        Set interface, lines, font
       01aaaaaa        Set character generator address
       1aaaaaaa        Set data ram address (Set cursor)

Where:

       *  = don't care (usually set to 0)
       A  = 1 for cursor increment, 0 for cursor decrement
       B  = 1 for display shift on cursor move, 0 otherwise
       C  = 1 to turn display on, 0 to turn display off
       D  = 1 to turn cusor on, 0 to turn cursor off
       E  = 1 to turn cursor blink on, 0 to turn blink off
       F  = 1 to shift display, 0 to move cursor
       G  = 1 to shift/move to the right, 0 to move left
       H  = 1 for 8-bit interface, 0 for 4-bit interface
       J  = 1 for 2-line display, 0 for 1-line display
       K  = 1 for 5x10 dot characters, 0 for 5x7 characters

All these instructions must be written to the command register (RS=0,
R/W=0).  Having configured the display and set the cursor, you then
display characters by writing ascii codes to the data register (RS=1,
R/W=0).  You cannot send commands/data to the chip while it is busy.
You must poll the BUSY flag by reading the command register (RS=0,
R/W=1).  The BUSY flag is bit#7, and is high when the chip is busy.
Bits #6..#0 are the current data ram address (cursor address).

If you don't want to poll the BUSY flag you must provide software
delays that are long enough to ensure the chip has finished executing
each command that you send.  The execution time of all commands is
40us, except for the "Clear display" and "Home cursor" commands,
which both take 1.64ms to execute.

Note that the '44780 chip is difficult to initialize.  The built-in
power-on reset circuit is unreliable, and a software initialization
sequence must usually be executed.

___Bob

1995\12\22@202114 by AV Presentations

picon face
Try ComputerCraft magazine, formerly Modern Electronics, September '91
issue.  The article by Jan Axelson has quite a bit of info. HTH

morris beverly     EraseMEavpresRemoveMEspamSTOPspamworld.std.com


'lcd display +ram'
1996\03\25@123049 by n Carstens
flavicon
face
Hi everyone,

To the chap with the 6264 which eats nicads for breakfast.
The datasheet of the ram chip 6264 states that to retain info with battery
the Vcc and chip enable pins must be held at two thirds of Vcc. (important
2/3) Also try to use schottky diodes for the battery to chip supply. Also
try to isolate the chip enable pin with a fet as a lot of current goes lost
in the chip enable pin going to the decoding logic.I built a
8031 board with a 62256 ram chip and it has kept info for nearly 9 months
on a cr2016 lithuim battery

Can anyone please help me with the following. I am using a 1 line by 20
LCD display for a barometer project using the pic71. My problem is the
display is old and the backlighting is failling. Can anyone please give me
a source of backlighting manufacturers.

BTW I think this forum is great.

Thanks
Anton

''65 as LCD driver-need code!'
1996\03\27@072039 by Moshe Fish

flavicon
face
Does anyone know of any shareware or code for the '65 that is available to drive
an 8 digit LCD with 3 backplanes. Has anyone got experience in this. I am
pressed for time and would even be willing to pay for it (provided it was a
reasonable amount).
-------------------------------------
Name   :Moshe Fish
E-mail :RemoveMEmfishKILLspamspamTakeThisOuTnetvision.net.il
Date   :03/27/96
Time   :14:33:12


'lcd controller'
1996\04\15@161434 by On Line Instrument Systems
picon face
At 10:32 PM 4/13/96 -0500, you wrote:
{Quote hidden}

interested in looking into your controller board/chip.  My address:

Shawn Ellis
On Line Instrument Systems
130 Conway Dr.
Bogart, GA  30622

Thanks,

Shawn

'LCD Help'
1996\04\19@112438 by Norm Cramer

flavicon
face
I have decided to add a LCD display to my current PIC project.  I remember a
few messages about errors in the Microchip App note.  What are the errors?
Where is a reliable source of info?  Does anyone have some sample code that
they are willing to share?  I am using a PIC16C84 and a PIC16C73 and want to
run the LCD module in 4 bit mode.  BTW The LCD display is a 2 line by 20
character display.

Thanks for any help,

Norm

1996\04\19@115039 by Scott Dattalo

face
flavicon
face
Norm Cramer wrote:

WRT to LCD modules
> Where is a reliable source of info?

Check out

Peer Ouwehand, http://www.iaehv.nl/users/pouweha/lcd.htm

and

Chris Burian, http://www.paranoia.com/~filipg/HTML/LINK/F_LCD_tech.html


Scott

1996\04\19@121207 by Todd Peterson

picon face
>Norm Cramer wrote:
>
> WRT to LCD modules
> Where is a reliable source of info?

Check out our experimentors' board.  It has a built in LCD port, and the
included driver routine takes all the tediousness out of the design.

http://www.netins.net/showcase/elab

Or send your snail mail address to me at spam_OUTtpetersonspam_OUTspamspam_OUTnetins.net and I'll send you
a free information packet.

Todd Peterson


===========================================================
*** Developers of the PICPlus(TM) Microcontroller Board ***

Todd Peterson, Computer Engineer   (tpetersonspam_OUTspamnetins.net)
E-LAB Digital Engineering, Inc.

P.O. Box 246
Lawton, IA 51030-0246
(712) 944-5344

Visit us at: http://www.netins.net/showcase/elab/

E-Mail Now for Your Free PICPlus(TM) Information Packet!
TO: RemoveMEtpetersonKILLspamspam@spam@netins.net   (include POSTAL mailing address)
===========================================================

1996\04\24@073134 by PH Tee

flavicon
face
Please send me a copy of your Free PICPlus(TM) Information Packet.
--

email: phteespamBeGonespam.....tksb.pc.my
Add: 18, Jalan Tembaga SD5/2B, Bandar Baru Sri Damansara,
Kepong, 52200 Kuala Lumpur, Malaysia
Tel:603-6354655, Fax:603-6354657


'Source for LCD shutters?'
1996\05\06@123200 by Jay Shroff
flavicon
face
Might be a bit off the subject but it does involve using a PIC. i'm
trying to build a cheap tachometer for model helicopters using PICS, and was
wondering if anyone knows about any sources for cheap lcd shutters and what
sort of latency i could expect?

Thanks
Jay


'Need help with LCD design'
1996\06\07@041032 by rrose
flavicon
face
I'm trying to figure out I can drive a dual-digit LCD display which
utilitizes 16 pins when I only have a few pins available on the
microprocessor.

The way the LCD works is that it is an eighteen pin device with two of
the pins being the power source.  The individual segments are lit when
the corresponding pins are connected to ground.

Does anyone have any ideas/suggestions?  I'm a novice at this stuff so
please keep the solutions simple. :)

Richard Rosenheim
KILLspamrrosespam.....accessnv.com

1996\06\07@172733 by Byron A Jeff

face picon face
>
> I'm trying to figure out I can drive a dual-digit LCD display which
> utilitizes 16 pins when I only have a few pins available on the
> microprocessor.

There are never enough I/O pins are there?

>
> The way the LCD works is that it is an eighteen pin device with two of
> the pins being the power source.  The individual segments are lit when
> the corresponding pins are connected to ground.

You hvae a part number on that? A source even?
>
> Does anyone have any ideas/suggestions?  I'm a novice at this stuff so
> please keep the solutions simple. :)

Try this: Use a couple of 74HC595 8 bit shift register with tri-state
output register. It takes 3 lines of output (DATA,CLK,and Register CLK).
Data is shifted in on each rising edge of CLK and the current 8 bits in
the shift register is transferred to the output register on the rising
edge of RCLK. The top bit of the shift register is available independant of
the output register so that 2 or more parts can be serially cascaded.

So cascade 2 '595s together giving 16 bits of output for 3 bits of input.

Hope this helps,

BAJ

1996\06\07@175928 by Eric Smith

flavicon
face
Richard Rosenheim <spam_OUTrrosespamKILLspamACCESSNV.COM> writes:
> The way the LCD works is that it is an eighteen pin device with two of
> the pins being the power source.  The individual segments are lit when
> the corresponding pins are connected to ground.

I would point out for the benefit of those who haven't used LCDs that
this must be a module with integral drive electronics.  If you just have a
bare LCD, you *must* use AC drive, or you will destroy the LCD in short
order.  It is, however, possible to drive small bare LCDs from PIC port
pins directly.  Microchip has an application note on it (AN563, I think).

It is often easier to use the ubiquitous character LCD modules which have
an integral controller with a parallel interface.

Eric

'LCD display control'
1996\06\08@023944 by David E. Queen

flavicon
face
At 11:10 PM 2/7/96 MST, you wrote:
>I've gotten 4bit mode to work.  My secret was

...

>Hope that helps.... if there's interest, I'll package a complete
>sample application and post it to the web.
>
>David
>--
>The 70s are hip...http://www.rt66.com/dthomas/70s/70s.html
>

interested!

'LCD Multiplexing'
1996\06\09@221152 by Dana Frank Raymond

flavicon
face
I am currently working on a redesign of a battery operated product that uses
a 28 segment LCD display. Since the production volume is going to be
substantial (>10K pieces) I am rationalizing the hardware to its bare bones.

I want to eliminate the current 32 segment LCD driver chip (a Motorola part)
and do the multiplexing with the PIC itself. One way to reduce complexity is
to multiplex the 28 segments as 7 segments X 4 colums. Not being familiar
with LCD Multiplexing, I checked out the Intersil databook (yes, taken over
by Harris awhile back) to see how their LCD Multiplexors worked. They use
something called tri-plexing, which calls for each row and column line to be
able to source 4 discrete voltages - not an easy task with a PIC.

What I'd like to ask is this: Does an individual LCD segment act like a
capacitor in that a stored charge is proportional to contrast, or is it
simply that applying a potential difference across the segment causes
crystal twist and the effect's duration and intensity is entirely physical?

OK, the reason for this complicated question is this: I can setup a 28
segment LCD display as a 7X4 array. All 7+4=11 lines would be tristatable so
that only one of 4 column lines would be active at a time, and an AC signal
will be applyed across the 'ON' segments by alternatively sourcing and then
sinking the appropriate segments. A segment line (1 of 7) would be tristate
when the driven segment is 'OFF'. This is to prevent other segments
receiving 1/2V while they are connected as 2 segments, in series, with the
center connected to a tristated column driver. By only sourcing segments on
one pass, and then sinking on the next, we prevent 'bleeding'.

However, if an LCD segment needs a sustained charge to stay twisted, then I
would be concerned that any leakage off of segement charge would kill the
display's contrast.

As well, since tristated lines are used, how sensitive would the display be
to leakage current overall?

I know this is somewhat obscure. Perhaps someone has already tried this or
done the research.

Thanks.
Regards, Dana Frank Raymond
RemoveMEdfrRemoveMEspamEraseMEicom.ca

'LCD module from Radio Shack ?'
1996\06\10@091241 by Harrison Cooper

flavicon
face
Just browsing thru the catalog this weekend, and noticed a
LCD 2 line x (don't remember) for around $25, but did
indicate it was 4 bit compatible.  Anyone ever used this
part,or know who the OEM is on it ?  Next time I'm by, I'll
see about grabbing some data on it.

'LCD Multiplexing'
1996\06\10@112125 by Rodger Richey

picon face
    Dana,

    Maybe a better solution would be to use a PIC16C923 or PIC16C924.
    These devices have an on-chip LCD module that is capable of driving:

               1 COM  x 32 SEGs
               2 COMs x 31 SEGs
               3 COMs x 30 SEGs
               4 COMs x 29 SEGs

    These are the features of the PIC16C923/924:

       - 4K x 14 Program Memory
       - 176 x 8 Data Memory
       - DC to 8MHz operating speed
       - Timer0 8-bit timer with 8-bit prescaler
       - Timer1 16-bit timer/counter
       - Timer2 8-bit timer/counter with 8-bit period, prescaler,
         postscaler
       - One PWM
       - Synchronous Serial Port with SPI and I2C
       - 8-bit, 5 channel A/D converter (924 only)
       - LCD Module
               - Multiple timing sources
               - Can drive LCD while in SLEEP
               - Static, 1/2, 1/3, and 1/4 multiplex modes
               - Static and 1/3 bias capability
       - 68-pin PLCC or 64-pin TQFP packages

    Microchip should be sampling these devics within the next couple of
    months.

    Hope this helps.

    Regards,

    Rodger Richey
    Sr. Applications Engineer
    Microchip Technology Inc.


______________________________ Reply Separator _________________________________
Subject: LCD Multiplexing
Author:  Dana Frank Raymond <KILLspamdfrspamspamBeGoneICOM.CA> at Internet_Exchange
Date:    6/9/96 10:03 PM


I am currently working on a redesign of a battery operated product that uses
a 28 segment LCD display. Since the production volume is going to be
substantial (>10K pieces) I am rationalizing the hardware to its bare bones.

I want to eliminate the current 32 segment LCD driver chip (a Motorola part)
and do the multiplexing with the PIC itself. One way to reduce complexity is
to multiplex the 28 segments as 7 segments X 4 colums. Not being familiar
with LCD Multiplexing, I checked out the Intersil databook (yes, taken over
by Harris awhile back) to see how their LCD Multiplexors worked. They use
something called tri-plexing, which calls for each row and column line to be
able to source 4 discrete voltages - not an easy task with a PIC.

What I'd like to ask is this: Does an individual LCD segment act like a
capacitor in that a stored charge is proportional to contrast, or is it
simply that applying a potential difference across the segment causes
crystal twist and the effect's duration and intensity is entirely physical?

OK, the reason for this complicated question is this: I can setup a 28
segment LCD display as a 7X4 array. All 7+4=11 lines would be tristatable so
that only one of 4 column lines would be active at a time, and an AC signal
will be applyed across the 'ON' segments by alternatively sourcing and then
sinking the appropriate segments. A segment line (1 of 7) would be tristate
when the driven segment is 'OFF'. This is to prevent other segments
receiving 1/2V while they are connected as 2 segments, in series, with the
center connected to a tristated column driver. By only sourcing segments on
one pass, and then sinking on the next, we prevent 'bleeding'.

However, if an LCD segment needs a sustained charge to stay twisted, then I
would be concerned that any leakage off of segement charge would kill the
display's contrast.

As well, since tristated lines are used, how sensitive would the display be
to leakage current overall?

I know this is somewhat obscure. Perhaps someone has already tried this or
done the research.

Thanks.
Regards, Dana Frank Raymond
dfrspamspamicom.ca

'LCD module from Radio Shack ?'
1996\06\10@141750 by David Schmidt

flavicon
face
Timeline in California has 16x2 line LCD displays for $8.00 each!
They are of the standard Hitachi 14 pin configuration and can be
written to in 8 or 4 bit mode.  I buy my displays from them all
the time.
Dave
DSchmidt Technologies


At 07:12 AM 6/10/96 -0600, you wrote:
>Just browsing thru the catalog this weekend, and noticed a
>LCD 2 line x (don't remember) for around $25, but did
>indicate it was 4 bit compatible.  Anyone ever used this
>part,or know who the OEM is on it ?  Next time I'm by, I'll
>see about grabbing some data on it.
>
>

1996\06\10@161112 by David Schmidt

flavicon
face
Great source for LCD displays.  Includes data sheets.

TIMELINE
23605 Telo Ave
Torrance, CA 90505
1-800-872-8878
1-800-223-9977

Some sample prices.
16x1 line LCD display 3 for $25.00
16x2 line LCD display $8.00 each.

Dave
DSchmidt Technologies

At 03:10 PM 6/10/96 -0400, you wrote:
>Timeline in California has 16x2 line LCD displays for $8.00 each!
>They are of the standard Hitachi 14 pin configuration and can be
>written to in 8 or 4 bit mode.  I buy my displays from them all
>the time.
>Great!!  Could you post an address (phone, e-mail, snail mail, or URL) to the
>group??  8^)

1996\06\10@170554 by Neil Gandler

flavicon
face
On Mon, 10 Jun 1996, David Schmidt wrote:

{Quote hidden}

______________________________

How about backlit displays?

 Neil Gandler

1996\06\10@200515 by David Schmidt

flavicon
face
>> TIMELINE
>> 23605 Telo Ave
>> Torrance, CA 90505
>> 1-800-872-8878
>> 1-800-223-9977
>How about backlit displays?

 Some, but you need to call and find out what they have
in inventory that is backlit.  They also have some large
format 16x1 and 16x2 LCD displays at higher prices.
Dave
DSchmidt Technologies

'LCD Multiplexing'
1996\06\10@210639 by Dana Frank Raymond

flavicon
face
>     Maybe a better solution would be to use a PIC16C923 or PIC16C924.

Thanks for the lead Roger. I was under the impression that these parts would
not be shipping until the new year. Sigh... I missed the consultant's
meeting at the end of the month.

I'll check the CDROM for the data sheets.

Thanks again.

Regards, Dana Frank Raymond
RemoveMEdfrspamBeGonespamRemoveMEicom.ca

1996\06\12@115822 by Conny Andersson

flavicon
face
On 6/9/96 10:03 PM, Dana Frank Raymond wrote:

-snip-

>What I'd like to ask is this: Does an individual LCD segment act like a
>capacitor in that a stored charge is proportional to contrast, or is it
>simply that applying a potential difference across the segment causes
>crystal twist and the effect's duration and intensity is entirely physical?

 It's the potential difference that causes the liquid crystals to "line up"
 in a way so that an incident plane-polarized ray of light will be twisted
 about 90 degrees. The LCD segment is often modelled as a capacitor so you
 are right in both statements.

 First, light travels through a plane-polarizer and then gets twisted by
 the "lined up" crystals and finally gets polarized again. The rays are
 then reflected at the backplate and transmitted back to the user.

 Rays propagating through the "lined up" crystals will "disappear" and
 be seen as black and all the other rays comes back polarized but still
 visible. The "inactive" part of the liquid is twisting the incident
 light at random so there is a small loss here. This can be seen as
 darker areas on a common LCD.

 Note that this is a *very* simplified description of the process and
 please don't ask me how it actually works, I haven't read all about
 advanced quantum theory yet (and probably never will). I can
 recommend the book "Optics" by Eugene Hecht, Addison-Wesley Publ.
 The book explains almost everything about optic phenomena, lenses,
 waves, polarization, diffraction and much more.

 In practise, it's not an easy task to drive a multiplexed LCD in the
 correct way but the goals are to:

  * eliminate the DC-component over each and every segment

  * "light up" the correct segments without disturbing the others
    the RMS voltage applied determines when the segment is on or off.

 The first goal is hard to implement in a processor with lots of
 other things to do, a dedicated LCD-driver is nescessary if the
 LCD is supposed to live a long and healthy life.
 The second goal is a matter of clever engineering and experience,
 the manufacturers often have detailed data sheets on how to drive
 their LCD:s.

 A year ago, I used a 7x6 LCD for a simple RPM-counter. The 16C55
 did drive the LCD directly and it worked but not very well. There
 is an app-note for this: AN563.

 -- Conny

 PS. I'm cleaning the floor (boring job but nescessary) in my electronic
 workshop and that's why this letter became long as a s-p-a-m but
 hopefully some of you could benefit from it. DS.

1996\06\12@233910 by Dana Frank Raymond

flavicon
face
>  A year ago, I used a 7x6 LCD for a simple RPM-counter. The 16C55
>  did drive the LCD directly and it worked but not very well. There
>  is an app-note for this: AN563.

Thanks for the recommendation and your thoughts Connie. I believe I have a
way of doing it using 11 tristate lines (for a 7X4 LCD) using 4 passes per
refresh cycle. The big issue is the effect of leakage current while PIC
lines are triatate (could be tricky at high tempertures).

I can image some of the difficulties with using a non-interrupt capable PIC
for this (16C55). Namely, keeping the timing symetrical to eliminate DC
bias. I tend to use the TMR0 interrupt as a foreground task to 'virtualize'
the hardware for the application code. This technique has been very
sucessful for me. I'm currently completing a design that uses a 220R
resistor pack, PIC16C622, and a 74HC374 latch to multiplex 4 8 segment
displays and 8 individual leds as an 8X5 LED array. Works great, foreground
loading is on the order of 10-20% or so, with a refresh rate of 100Hz. The
foreground runs also timers, and scans, debounces, and provides other
special functions (like auto-repeat) for 8 switches, etc.

I'll check into AN563 as well as the new LCD driver PICs.

Thanks again.

Regards, Dana Frank Raymond
KILLspamdfrspamBeGonespamicom.ca

'LCD Display'
1996\06\13@103450 by Donald F. Wright Jr.

flavicon
face
I am looking for a display for a project I am doing with PIC's and might be
biting off more than I can chew.  I "want" a display like the ones used in
portable game units like the Sega Game gear.  It is a small Color LCD
display about 4" x 5".  Anybody have any knowledge or experience using
anything like this?  I basically want something nice and colorful to display
information on.  It is for a senior project and the more creative and
colorful, the better the grade.  Thanks!


  Donald Frederick Wright Jr.
  School info: Lawrence Technological University
  E-mail: @spam@DW79208STOPspamspam@spam@LTU.EDU
  Work Info: AVL North America
  E-mail: DNWRIGHTspamBeGonespamspamBeGoneAVLNA.COM

1996\06\13@140333 by John Payson

flavicon
face
> I am looking for a display for a project I am doing with PIC's and might be
> biting off more than I can chew.  I "want" a display like the ones used in
> portable game units like the Sega Game gear.  It is a small Color LCD
> display about 4" x 5".  Anybody have any knowledge or experience using
> anything like this?  I basically want something nice and colorful to display
> information on.  It is for a senior project and the more creative and
> colorful, the better the grade.  Thanks!

Do you care about having the thing produce any useful information, or just
about it being colorful?  If the latter, you could probably use a PIC16C84,
a PLD, a few resistors, and an NPN transistor to generate color video but
your resolution would be pretty limitted (about 160 pixels across MAX; 80
pixels across for most hardcoded data).

1996\06\13@141201 by Eric Smith

flavicon
face
> I "want" a display like the ones used in portable game units like the
> Sega Game gear.  It is a small Color LCD display about 4" x 5".

Halted Electronics in Santa Clara, CA has some active matrix LCDs perhaps
3" x 4" which accept R, G, B, and composite sync inputs.  No composite
video input, so if you want to use a video source you'll have to come
up with a decoder.  Includes a backlight with an inverter to drive it.
I think they are asking about $80.

Cheers,
Eric

1996\06\13@171629 by Peter L. Taylor

flavicon
face
-- [ From: Peter L. Taylor * EMC.Ver #2.5.02 ] --


> > I "want" a display like the ones used in portable game units like the
> > Sega Game gear.  It is a small Color LCD display about 4" x 5".
>
> Halted Electronics in Santa Clara, CA has some active matrix LCDs perhaps
3" x
> 4" which accept R, G, B, and composite sync inputs.  No composite video
input,
> so if you want to use a video source you'll have to come up with a decoder
.
> Includes a backlight with an inverter to drive it. I think they are asking
> about $80.

How would one contact Halted Electronics?

--
Peter L. Taylor
~~~~~~~~~~~~~~~~~~~~~~~~
Email: spamBeGonepetertspamtransera.com
~~~~~~~~~~~~~~~~~~~~~~~~
http://www.transera.com
~~~~~~~~~~~~~~~~~~~~~~~~
TransEra Corp.
345 East 800 South
Orem, Utah 84058
~~~~~~~~~~~~~~~~~~~~~~~~
Voice:  (801)224-6550
Fax:    (801)224-0355
~~~~~~~~~~~~~~~~~~~~~~~~

'LCD Contrast from PWM ?'
1996\06\17@100700 by Norm Cramer

flavicon
face
I have been working on a project using a 20x2 LCD module.  I am using a
variable resistor to control the contrast of the display.  The thought
occurred to me that this is a voltage level that might be suitable to use a
PWM to control.  Has anyone else tried this?  The advantages would be less
parts (always good), and allowing the user to adjust the contrast from the
key pad rather than with a knob.  Disadvantage is that the system now needs
to remember the last setting, but I already have a EEPROM in my design so no
big deal.

Thought?

Norm

1996\06\17@125728 by John Payson

flavicon
face
> I have been working on a project using a 20x2 LCD module.  I am using a
> variable resistor to control the contrast of the display.  The thought
> occurred to me that this is a voltage level that might be suitable to use a
> PWM to control.  Has anyone else tried this?  The advantages would be less
> parts (always good), and allowing the user to adjust the contrast from the
> key pad rather than with a knob.  Disadvantage is that the system now needs
> to remember the last setting, but I already have a EEPROM in my design so no
> big deal.
>
> Thought?

I've wanted to do this myself (use an R and a C instead of a pot) but never
actually done it.  I'd suggest using a fairly large R (C doesn't have to be
all that big--display won't draw much current) and ensuring that the output
doesn't ripple too much.  Even if your RC constant is 500ms, this shouldn't
really affect anything since users probably won't change contrast that fast
anyway.

'Interfacing with 4/8-bit LCD display - SHARP 16155'
1996\06\25@124011 by LEUNG LAUREN KWAN-KIT

flavicon
face
Hi, all,

I wondered if any one of you have had a subroutine handy for PIC(16C74 in
particular) to interface with an 4 or 8-bit LCD display.  The one that I
think I'd like to use is SHARP 16155, 1 line x 16 char.  Please help me
out if you do have anything.

Thanks in advance.

- Lauren

| Lauren Kwan-Kit Leung                 email   : spam_OUTlleungSTOPspamspamee.ubc.ca
|                                       www     : http://www.ee.ubc.ca/~lleung
| University of British Columbia        tel     : 733-3098
| Faculty of Applied Science            pager   : 1-604-978-7657
| Electrical Engineering (Computer)     callsign: VE7IPC <145.270MHz->

1996\06\25@173736 by Peer Ouwehand

flavicon
face
At 09:37 96/06/25 -0700, you wrote:
>I wondered if any one of you have had a subroutine handy for PIC(16C74 in
>particular) to interface with an 4 or 8-bit LCD display.  The one that I
>think I'd like to use is SHARP 16155, 1 line x 16 char.  Please help me
>out if you do have anything.
>
>Thanks in advance.
>
>- Lauren

have a look at
http://www.iaehv.nl/users/pouweha/lcd.htm
for a PIC16C84 <--> HD44780 8-bit example

Peer

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
       Peer Ouwehand
       RemoveMEpouwehaspamspamiaehv.nl
       http://www.iaehv.nl/users/pouweha/
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

1996\06\26@094131 by Norm Cramer

flavicon
face
Lauren,

I have an example that of a 4bit interface to the industry standard LCD
display.  Let me know if you want it and I will e-mail the source directly
to you (A little large for the list.)

Norm


At 09:37 AM 6/25/96 -0700, you wrote:
{Quote hidden}

---------------------------------------------------------------------------
            Norm Cramer            Work:  KILLspamcramerspamspamspam_OUTdseg.ti.com
         Texas Instruments         Home:  cramerRemoveMEspamiamerica.net
        Software Engineering       Voice: 214-462-4923
Embedded Real Time Systems         aka WD2AEM
---------------------------------------------------------------------------

1996\06\26@101702 by Carlos E Lopez-Reyna

flavicon
face
Norman,

       Hi, I used to had a 4 bit interface program for LCD from the list
but it got lost. Would it be possible to receive yours over e-mail ?
Thanks
                               Carlos Lopez-Reyna

1996\06\26@110326 by Norm Cramer

flavicon
face
I have received several requests for the code, should I go ahead and post it
to the list, or e-mail each person?  The text is about 900 lines long.

Norm


At 10:17 AM 6/26/96 -0400, you wrote:
>Norman,
>
>        Hi, I used to had a 4 bit interface program for LCD from the list
>but it got lost. Would it be possible to receive yours over e-mail ?
>Thanks
>                                Carlos Lopez-Reyna
>
>

1996\06\26@122457 by Norm Cramer

flavicon
face
Mark Sullivan was kind enough to loan me some "web" space (Thanks Mark) and
has put the code at the following URLS:

http://niobrara.com/mks/pic/cramerlcd.h
and
http://niobrara.com/mks/pic/cramerlcd.asm

You will also need the p16c84.inc file (or variant for your PIC) from
Microchip.  I think these come with MPLAB.  Let me know if there are any
questions.

Thanks,

Norm

At 10:01 AM 6/26/96 -0500, you wrote:
>I have received several requests for the code, should I go ahead and post it
>to the list, or e-mail each person?  The text is about 900 lines long.
>
>Norm
>


'LCD code example corrections'
1996\07\03@153155 by Norm Cramer
flavicon
face
The LCD code that I made available has been updated.  It was missing a clock
of one byte of initialization data to the LCD.  It worked OK as it was, but
to match the data book, I corrected the code.  The code was written for a
2x20 LCD module but will work with the other modules.  You can get the
updated code from:

WEB:

http://niobrara.com/mks/pic/cramerlcd.h
and
http://niobrara.com/mks/pic/cramerlcd.asm

FTP: (should be updated soon)
ftp://ftp.mcc.ac.uk/pub/micro-controllers/PIC/cramer.zip

Norm

'Need 16x1 line LCD source'
1996\07\11@114721 by David Schmidt

flavicon
face
Hello,
  sorry about this non PIC/stamp related posting.
I need a supplier of 16x1 line LCD displays BUT they need
to have:

- all 16 characters mapped sequentially in memory
 (don't have enough memory for the other type)
- the connector is a 2x7 header on the left side of the
 display
- backlight not needed

  My usual source (Timeline) doesn't currently have
any 2x7 header style ones.

Thanks
Dave

'Hitachi LCD module'
1996\07\23@053324 by Andy Errington

flavicon
face
Hi All,

I am trying to get an Hitachi LM016L LCD module working with a PIC 84,
with no success.  I have had the module working with a STAMP, and I
understand everything I need to do to setup and use the module, but it
just ain't workin'.

I am using PORTA <0:3> for the LCD data port (connected to the MSB of
the LCD data pins), and PORTB <4:6> for E, RS and R/^W.  Obviously I am
attempting to initialise the module for 4 bit operation.  My question
is:  am I likely to have problems with PORT A, and should I stick
everything on PORT B?

This is a simple problem, I just need reassurance to keep trying.

Andy (the other one)
Lancaster, UK

1996\07\23@055612 by Kalle Pihlajasaari

flavicon
face
Hi Andy (too),

> I am trying to get an Hitachi LM016L LCD module working with a PIC 84,
> with no success.  I have had the module working with a STAMP, and I
> understand everything I need to do to setup and use the module, but it
> just ain't workin'.
>
> I am using PORTA <0:3> for the LCD data port (connected to the MSB of
> the LCD data pins), and PORTB <4:6> for E, RS and R/^W.  Obviously I am
> attempting to initialise the module for 4 bit operation.  My question
> is:  am I likely to have problems with PORT A, and should I stick
> everything on PORT B?

Not having used that direct configuration with the LCD I am speaking
from general experience with the LCD and C84 devices.

If it worked with the Stamp then your problem is probably timing related.

Put pauses of 2 ms after mode, clear and home commands and 100 us after
ather commands.  Also send the enable pulse to the display with
3 instructions (lo-hi-lo) with possibly a short delay after the
data and address times have settled, the PIC is FAST and the LCD is
SLOW.

> This is a simple problem, I just need reassurance to keep trying.

If nothing helps, start the wiring and code from scratch and you will
probably notice your mistake :-)

Cheers
--
Kalle Pihlajasaari     EraseMEkalleSTOPspamspamRemoveMEdata.co.za
Interface Products     Box 15775, Doornfontein, 2028, South Africa
+27 (11) 402-7750      Fax: +27 (11) 402-7751

1996\07\23@063628 by Odriozola Belden

flavicon
face
Really like what you write after your name (the other one).

Rogerio


At 10:33 AM 23/07/96 +0100, you wrote:
{Quote hidden}

1996\07\23@085346 by Norm Cramer

flavicon
face
I wonder if your problem is port A.  Pin RA4 is an open collector output and may
float if the LCD module doesn't pull it up.  This could cause problems when
doing the initialization.  I usually use port A as the control lines and
port B as the data.  If you are using the Microchip app notes, there are a
few errors.  I have an example to control the LCD from a 16C84 but I can't
find the web address at the moment.  E-mail me if you are interested in the
code.

Norm


At 10:33 AM 7/23/96 +0100, you wrote:
{Quote hidden}

1996\07\23@124337 by Walter Banks

picon face
Andy,

> I am trying to get an Hitachi LM016L LCD module working with a PIC 84,
> with no success.  I have had the module working with a STAMP, and I
> understand everything I need to do to setup and use the module, but it
> just ain't workin'.
>
> I am using PORTA <0:3> for the LCD data port (connected to the MSB of
> the LCD data pins), and PORTB <4:6> for E, RS and R/^W.  Obviously I am
> attempting to initialise the module for 4 bit operation.  My question
> is:  am I likely to have problems with PORT A, and should I stick
> everything on PORT B?

I suspect that several others are right about timing. The following code
is from a standarized Embedded C library that I have been using for a
few years. I copied the following listing fragment from a project I did
for Circuit Cellar. It was compiled with MPC on a 16C74. The LCD display
was connected to Port D in this case. To save an I/O pin I generally
connect the R/^W to ground.



Walter Banks Byte Craft

                 #include <lcd4.c>
                 /********************************************************
                  *  Device driver for 4 bit LCD interface using         *
                  *  Hitachi H2570 controllers. These displays are in    *
                  *  configurations from one line by 16 characters to    *
                  *  4 lines by 40 characters                            *
                  *                                                      *
                  *  No warranty is implied or given as to               *
                  *  their usability for any purpose.                    *
                  *                                                      *
                  *       (c) Copyright 1990                             *
                  *       Byte Craft Limited                             *
                  *       Waterloo, Ontario                              *
                  *       Canada N2J 4E4                                 *
                  *       (519) 888-6911                                 *
                  *                                                      *
                  *       Walter Banks                                   *
                  ********************************************************/


0000                              registerx index;
                                 #pragma option p ;
               /*
               ---------------
                              |
                              |
                              |
                         Pn0  |--------------------------\
                         Pn1  |--------------------------+\
                         Pn2  |--------------------------++\
                         Pn3  |--------------------------+++\
                 E Clock Pn4  |-------------------\      ||||
                Register Pn5  |-------------------+-\    ||||
                Select   Pn6  |-                  | |    ||||
                         Pn7  |-                  | |    ||||
                              |                   | |    ||||
                              |                   | |    ||||
                              |                   | |    ||||
                              |           Vcc     | |    ||||
               ---------------             |      | |    ||||
                                           |----  | |    ||||
                                           |    | | |    ||||
                                           -    | | |    ||||
                                      20K | <---+ | |    ||||
                                      pot  |    ||| |    ||||
                                      ----------+++ |    ||||
                                     |       1 |||||||||||||| 14
                                     |        ----------------------------
                                    ---      | ..............             |
                                     -       |  Liquid Crystal Display    |
                                             |                            |
                                              ----------------------------
               */


0005                    #define LCDdata PORTD     /*  Data output         */
0006                    #define LCD_RS PORTD.5    /*  Register select bit */
0007                    #define LCD_E  PORTD.4    /*  Clock bit           */

                   /********************************************************
                    * wLCDdat - Write data word to LCD peripheral          *
                    *  Enter with data word in accumulator                 *
                    *  Delay w120fS after data write                       *
                    ********************************************************/

                               void wLCDdat(unsigned int tempa)
0035                             {
001B 1283    BCF    STATUS,RP0
001C 00B5    MOVWF  35                      /* Write HI nybble word to LCD */
001D 00A1    MOVWF  21             LCDdata = tempa >> 4;
001E 0EA1    SWAPF  21
001F 300F    MOVLW  0Fh
0020 0521    ANDWF  21,W
0021 0088    MOVWF  PORTD
0022 1688    BSF    PORTD,5        LCD_RS  = 1 ;           /* RS->1 */
0023 1608    BSF    PORTD,4        LCD_E   = 1 ;           /* E->1  */
0024 1208    BCF    PORTD,4        LCD_E   = 0 ;           /* E->0  */
0025 1288    BCF    PORTD,5        LCD_RS  = 0 ;           /* RS->0 */
0026 300F    MOVLW  0Fh            LCDdata = tempa & 0x0f;
0027 0535    ANDWF  35,W                     /* Write LO nybble word to LCD */
0028 0088    MOVWF  PORTD
0029 1688    BSF    PORTD,5        LCD_RS  = 1 ;           /* RS->1 */
002A 1608    BSF    PORTD,4        LCD_E   = 1 ;           /* E->1  */
002B 1208    BCF    PORTD,4        LCD_E   = 0 ;           /* E->0  */
002C 1288    BCF    PORTD,5        LCD_RS  = 0 ;           /* RS->0 */

002D 3014    MOVLW  14h            index = 20;
002E 0084    MOVWF  FSR
002F 0384    DECF   FSR            while (--index);        /* 120usec $$$$*/
0030 0804    MOVF   FSR,W
0031 1903    BTFSC  STATUS,Z
0032 2834    GOTO   0034h
0033 282F    GOTO   002Fh
0034 0008    RETURN              }

                    /*********************************************************
                     * wLCDctrl4 - Write control word to LCD peripheral      *
                     *      configured as a 4 bit interface                  *
                     *  Enter with control word in accumulator               *
                     *  Delay w4.5mS if A=0x01 or 0x02 else delay w120fS     *
                     *********************************************************/
                             void wLCDctrl4(unsigned int tempa)
0036                            {
0035 1283    BCF    STATUS,RP0
0036 00B6    MOVWF  36
                                        /* Write HI nybble to LCD */
0037 00A1    MOVWF  21           LCDdata = tempa >> 4;
0038 0EA1    SWAPF  21
0039 300F    MOVLW  0Fh
003A 0521    ANDWF  21,W
003B 0088    MOVWF  PORTD
003C 1608    BSF    PORTD,4      LCD_E   = 1 ;           /* E->1  */
003D 1208    BCF    PORTD,4      LCD_E   = 0 ;           /* E->0  */
003E 300F    MOVLW  0Fh          LCDdata = tempa & 0x0f; /* Write LO nybble to
LCD */
003F 0536    ANDWF  36,W
0040 0088    MOVWF  PORTD
0041 1608    BSF    PORTD,4      LCD_E   = 1 ;           /* E->1  */
0042 1208    BCF    PORTD,4      LCD_E   = 0 ;           /* E->0  */
0043 3014    MOVLW  14h          index = 20;
0044 0084    MOVWF  FSR
0045 0384    DECF   FSR          while (--index);        /* 120usec   */
0046 0804    MOVF   FSR,W
0047 1903    BTFSC  STATUS,Z
0048 284A    GOTO   004Ah
0049 2845    GOTO   0045h
004A 3002    MOVLW  02h          if (tempa <= 2)
004B 1283    BCF    STATUS,RP0
004C 0236    SUBWF  36,W
004D 1903    BTFSC  STATUS,Z
004E 2851    GOTO   0051h
004F 1803    BTFSC  STATUS,C
0050 2860    GOTO   0060h
0051                               {
0051 0384    DECF   FSR             while (--index);
0052 0804    MOVF   FSR,W                      /* 4.6 ms or so delay */
0053 1903    BTFSC  STATUS,Z
0054 2856    GOTO   0056h
0055 2851    GOTO   0051h
0056 0384    DECF   FSR             while (--index);
0057 0804    MOVF   FSR,W
0058 1903    BTFSC  STATUS,Z
0059 285B    GOTO   005Bh
005A 2856    GOTO   0056h
005B 0384    DECF   FSR             while (--index);
005C 0804    MOVF   FSR,W
005D 1903    BTFSC  STATUS,Z
005E 2860    GOTO   0060h
005F 285B    GOTO   005Bh
                                   }
0060 0008    RETURN              }

                             void initLCD(void)
                               {
                                /* LCD display peripheral initialization */
0061 3024    MOVLW  24h           wLCDctrl4(0x24);
0062 2035    CALL   0035h                 /*  Function Set-4-bit,1-line,5X7  */
0063 300C    MOVLW  0Ch           wLCDctrl4(0x0c);
0064 2035    CALL   0035h                 /*  Display on, Cursor off         */
0065 3006    MOVLW  06h           wLCDctrl4(0x06);
0066 2035    CALL   0035h                 /*  entry mode- Inc addr, no shift */
0067 3001    MOVLW  01h           wLCDctrl4(0x01);
0068 2035    CALL   0035h                 /*  Clear Display */
0069 0008    RETURN             }

                             void putcharLCD(char sci_char)
                              /* Send a character to the LCD display */
0037                            {
006A 1283    BCF    STATUS,RP0
006B 00B7    MOVWF  37
006C 300A    MOVLW  0Ah          if ((sci_char == 0x0a) ||
006D 0237    SUBWF  37,W             (sci_char == 0x0d))  /* Look for a LF */
006E 1903    BTFSC  STATUS,Z
006F 2874    GOTO   0074h
0070 300D    MOVLW  0Dh
0071 0237    SUBWF  37,W
0072 1D03    BTFSS  STATUS,Z
0073 2877    GOTO   0077h
0074 3001    MOVLW  01h            wLCDctrl4(0x01); /*  Clear Display */
0075 2035    CALL   0035h
0076 287A    GOTO   007Ah           else
0077 1283    BCF    STATUS,RP0     wLCDdat(sci_char);
0078 0837    MOVF   37,W
0079 201B    CALL   001Bh
007A 0008    RETURN              }

1996\07\23@140505 by fastfwd

face
flavicon
face
Andy Errington <spam_OUTPICLISTRemoveMEspamEraseMEMITVMA.MIT.EDU> wrote:

> I am using PORTA <0:3> for the LCD data port (connected to the MSB
> of the LCD data pins), and PORTB <4:6> for E, RS and R/^W.
> Obviously I am attempting to initialise the module for 4 bit
> operation.  My question is:  am I likely to have problems with PORT
> A, and should I stick everything on PORT B?
>
> This is a simple problem, I just need reassurance to keep trying.
>
> Andy (the other one)

Other Andy:

You should be fine with PORTA... Especially since you're not using
RA4.  Your problem is undoubtedly timing-related; you probably need
to slow your initialization routine WAY down, and you should be using
the LCD's "BUSY" flag for all other operations.

-Andy

Andrew Warren - TakeThisOuTfastfwdRemoveMEspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

1996\07\24@054633 by Andy Errington

flavicon
face
Hi,

Many thanks to all who have responded.  I hope  the information is
useful to other PICLIST readers.

Firstly can I thank all of those who advised me about the Murata 4MHz
ceramic resonator, it's working fine, and you _can_ connect the middle
pin to +5V to simplify board layout.

Secondly the LCD module...

I tried my module on the Stamp again, which showed me it was still
working properly, and I haven't damaged it (relief!).  Back to the '84.
One problem I think I have is reading the busy flag, so I replaced that
section with a delay loop.  Now I get some life from the display.  I am
using portions of Microchips LCD application note, so my code sends 'M'
'i' 'c' 'r' 'o' 'c' 'h' 'i' 'p' to the 'Send_char' routine.  Deep joy!
On the display is some text!  Hang on, what does it say?  'Mogwognow'

I have worked out that the middle 2 bits of the lower nibble seem to be
always set to one, except for the first character (!).  Could it be that
my SWAPF function is broken inside the CPU?  I don't know,  I shall
follow people's suggestions and slow it all down some more.  More news
as it's made.

To anyone else who is using an LCD module with no success:  Take heart,
and keep trying!

Andy (the other one)

1996\07\24@101647 by Peer Ouwehand

flavicon
face
At 10:47 96/07/24 +0100, you wrote:

<<snip>>

{Quote hidden}

(Parts of the text are a reprint of some postings in februari 1996
by Scott Dattalo and myself)

Assuming you are using AN587 to write your code:
This app.note has a bug in the code to *read from* any HD44780 based LCD
module (this affects ALL read operations).

A quote of Scott's comment (4-bit LCD interface):
The proper way to perform a read operation is to:
1) Clear RS (Register Select signal on LCD Module).
2) Set R/W (Read/Write signal on LCD Module). This will select the "read"
   mode.
3) Set E (The enable bit on the LCD Module).
4) Read the 4 MSB's of the data bus on the LCD Module.
5) Clear E.
6) Set E.
7) Again, read 4 MSB's.
8) Clear E.

The two nibbles are then concatenated to form a byte. If you're reading the
busy bit, then bit 7 will reflect its state while bits 6 through 0 are either
the moste recent character or data RAM address.

The way AN587 does a read operation is:
1) Clear RS (Register Select signal on LCD Module).
2) Set R/W (Read/Write signal on LCD Module). This will select the "read"
   mode.
3) Set E (The enable bit on the LCD Module).
4) Clear E.
5) Read the 4 MSB's of the data bus on the LCD Module.
6) Set E.
7) Clear E.
8) Again, read 4 MSB's.

In other words, AN587 reverses steps 4 and 5 and steps 7 and 8. The effect is
that the LCD module gets disabled before the data is read by the PIC.
(end quote)

This bug is in both the 4-bit and 8-bit code of AN587!
A correct version of an 8-bit interface (using the 16C84 and based on AN587),
the schematics and an example (see 4.1.4. Availability) can be found at:
 http://www.iaehv.nl/users/pouweha/lcd2.htm
The code on this page makes use the busy flag successfully.
You only need delay loops during LCD initialisation.

Happy coding...

Peer.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
       Peer Ouwehand
       EraseMEpouwehaRemoveMEspamiaehv.nl
       http://www.iaehv.nl/users/pouweha/

       Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

1996\07\24@122121 by rob (r.m.) mudry

flavicon
face
I had similar problems when interfacing an LCD to an 8051 controller.  Make
sure you are reading/writing data on the correct clock edge and pay close
attention to the chips timing req'ts and the timing you are generating.
Good luck.

Do you know a good source for cheap 2x16 line LCD displays?

Send reply to 'spamrmudry.....spamspambnr.ca'  (I'm not on the list)
Thanks, Rob



In message "Re: Hitachi LCD module", you write:

{Quote hidden}

1996\07\24@201352 by Thomas Coonan

flavicon
face
>I had similar problems when interfacing an LCD to an 8051 controller.  Make
BTW:  I have PIC 16C54 code that controls such LCD displays, as well
as accepting serial inputs to them from, say, a PC.  Code is on my page, if
anyone needs yet another code example of this.

Thomas A. Coonan
http://www.mindspring.com/~tcoonan

1996\07\25@050800 by Andy Errington

flavicon
face
Hi all,

well I have the LCD module working on the PIC, using delays between
characters rather than reading the busy flag.  Thanks to Peer Ouwehand
for pointing out the error of trying to read the LCD data with pin E low
(which tristates the data bus!).  I have looked through Hitachi's LCD
documentation, and this fact is not at all obvious.  However I still
cannot successfully check for the busy flag.  Most of the samples I have
seen simply tie R/^W low (always write), and use delays only.  This
means you save one I/O pin, which might be satisfactory.  I shall have
another go at reading from the LCD when I go home tonight (yes I _do_
have a home to go to).

Meanwhile I have successfully read and decoded data from a magnetic card
(a credit card in this case), and displayed it on my LCD.  I currently
ignore parity on each character, and the final parity check, but this
doesn't matter for the purposes of experimentation.  Later I shall check
parity, and then I shall attempt to decode the data with the card going
through backwards.

I hope all this drivel is of interest to someone.  It is to me.

Many thanks to all correspondents so far.

Andy (the other one)

>shameless plug<

PS I shall be seeking employment in the Yorkshire area (north of England
for our overseas readers) from January '97.  My main skills are
client/server development with VB, SQL Server and NT.  As you can see I
dabble with low level assembly, and I also have experience in access
control and security.

--
---------------------------------------------------------------------
Andrew M Errington                               Tel: +44 1524 593678
Microcomputer Consultant                         Fax: +44 1524 844011
The Computer Centre                  Mobile (Orange):     0976 243931
Lancaster University                      a.erringtonspam_OUTspam@spam@lancaster.ac.uk
Lancaster LA1 4YW     www.lancs.ac.uk/people/cpaame/cpaame.htm
---------------------------------------------------------------------
"A dog is not just for Christmas, there may be some left for
sandwiches on Boxing Day" - Vladimir Illich Ulyanov 1920

1996\07\25@053747 by fastfwd

face
flavicon
face
Andy Errington <.....PICLISTspamspam.....MITVMA.MIT.EDU> wrote:

> well I have the LCD module working on the PIC, using delays
> between characters rather than reading the busy flag. .... I still
> cannot successfully check for the busy flag.  Most of the samples I
> have seen simply tie R/^W low (always write), and use delays only.
> This means you save one I/O pin, which might be satisfactory.

Other Andy:

It also means that your LCD routines will be slower than necessary,
and it prevents you from reading the display (which can be very
useful with small microcontrollers like the PIC, since it relieves
you of the burden of storing a copy of the displayed data in the
microcontroller's RAM).

It also prevents you from using the display's otherwise-unused RAM as
slow-but-plentiful external RAM for the PIC.

You haven't given enough detail for me to really diagnose your
particular problem.  Make sure, though, that you're reading all
EIGHT bits of data from the display... With your 4-bit interface,
you'll need to do TWO reads to get all the data.

Here's some sample code; it's written with the assumption that the 4
LCD data lines are tied to PORTD 4-7; SETPDI is equated to 1111xxxx
(binary) and SETPDO is equated to 0000xxxx (binary).  "PAGE0" and
"PAGE1" are simple macros that set/clear the register-page-select
bit:

;
; WAIT FOR THE LCD'S "BUSY" FLAG TO CLEAR.
;

LCDREADY:

       PAGE1                   ;SWITCH TO DATA-SEGMENT 1.

       MOVLW   SETPDI          ;MAKE THE LCD DATA BUS ALL
       MOVWF   TRISD ^ 080H    ;INPUTS.

       PAGE0                   ;SWITCH BACK TO DATA-SEGMENT 0.

LCDWTLP:

       BCF     LCDRS           ;SETUP TO READ THE BUSY FLAG.
       BSF     LCDRW           ;

       BSF     LCDE            ;CLOCK THE DATA IN.
       NOP                     ;

       MOVF    PORTD,W         ;GRAB THE HI-NIBBLE OF DATA
                               ;(BIT 7 = BUSY).

       BCF     LCDE            ;FINISH CLOCKING.

       NOP                     ;WAIT A CYCLE.

       BSF     LCDE            ;CLOCK THE LO-NIBBLE OUT (AND
       NOP                     ;IGNORE IT).
       BCF     LCDE            ;

       ANDLW   10000000B       ;MASK OFF ALL BUT THE BUSY FLAG.

       BNZ     LCDWTLP         ;IF THE LCD'S STILL BUSY, LOOP
                               ;BACK AND TRY AGAIN.

       MOVLW   00001111B       ;OTHERWISE, CLEAR THE DATA BUS.
       ANDWF   PORTD

       PAGE1                   ;SWITCH TO DATA-SEGMENT 1.

       MOVLW   SETPDO          ;MAKE THE LCD DATA BUS ALL
       MOVWF   TRISD ^ 080H    ;OUTPUTS.

       PAGE0                   ;SWITCH BACK TO DATA-SEGMENT 0.

       RETURN                  ;RETURN.

For maximum efficiency, I generally call this routine just BEFORE
performing any operation on the LCD, rather than after.

Hope this helps...

-Andy

Andrew Warren - fastfwdKILLspamspamEraseMEix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499

'LCD Serial Controller code..fixed link..'
1996\07\25@093210 by Thomas Coonan

flavicon
face
    I hope I fixed my WWW link.  Sorry..
       http://www.mindspring.com/~tcoonan

1996\07\25@222910 by Ken Parkyn

flavicon
picon face
Thomas Coonan wrote:
>
>      I hope I fixed my WWW link.  Sorry..
>         http://www.mindspring.com/~tcoonanTom;
getting ERROR 304 when trying to access lcd.asm...
busy?

Cheers,
--
****************************************************************************
Ken Parkyn                                  email: EraseMEK.Parkyn@spam@spam@spam@sct.gu.edu.au
Electronics Workshop                        phone: (07) 3875 7289
Division of Science and Technology          fax:   (07) 3875 7656

Griffith University
Nathan QLD 4111
Australia                                   Office: Science 2   Room
-1.17
****************************************************************************

1996\07\26@040405 by Don McKenzie

flavicon
face
Ken Parkyn wrote:
{Quote hidden}

You must have been early Ken. I had problems initially, but got in OK later.
Thanks Thomas.

Don McKenzie spamBeGonedonmckRemoveMEspamEraseMElabyrinth.net.au
DonTronics Tullamarine, Australia
http://www.labyrinth.net.au/~donmck

EASY PIC'n Beginners Guide to using PIC 16/17 MicroChip products.
Picosaurus(tm) 40 pin PICBasic with 8 channels of A-D, and real Uart.
PIC Basic Compiler. Programmers from 15 USD.  Pic-Axe(tm) A New Tool.

'Implementing Powertip 16x2 line LCD'
1996\07\27@231922 by Ken Parkyn

flavicon
picon face
Can anyone please point me to  any FAQ or home pages which may have code to use
the above PIC with a
PIC16C57.
For any unfamiliar with the device (Powertip PC-1602F1) its an 8 bit data/3 bit
control device, and
should be a piece of cake for anyone with micro experience (which I lack).
TIA,
Ken P.

'Hitachi LCD module'
1996\07\31@103306 by Sten Dahlgren

flavicon
face
On Wed, 24 Jul 1996, Andy Errington wrote:

snip

> section with a delay loop.  Now I get some life from the display.  I am
> using portions of Microchips LCD application note, so my code sends 'M'
> 'i' 'c' 'r' 'o' 'c' 'h' 'i' 'p' to the 'Send_char' routine.  Deep joy!
> On the display is some text!  Hang on, what does it say?  'Mogwognow'
>
I recognice this ! Are you using 4bit mode ? When i used the
Microchipcode i discovered that they had forgotten one of the initial
delays so that my LCD was run in 8bit mode instead.
Look for all the LCD FAQ's awailable.

---
Sten Dahlgren  CelsiusTech Systems   ! "I'd rather have 39 Hp under my arm
S-175 88 Jaerfaella      Sweden      ! than one under my backside"
RemoveMEsedaKILLspamspamRemoveMEcelsiustech.se +46-8 58084430   ! join your nearest karting club now !!


'40*2 LCD'
1996\08\09@205500 by Don McKenzie
flavicon
face
Bernard Seront wrote:
{Quote hidden}

As well as the unused pic pin and negative charge pump generator, I have also
used a ni-cad 1.2V battery, and the negative rail of a MAX-232 that was needed
in the cct for comms anyway, however these days they (Max-232's) seem to be
getting cheaper.

I guess you could add one just for the low power negative rail required by these
types of displays.

Don McKenzie spamBeGonedonmckKILLspamspamTakeThisOuTlabyrinth.net.au
DonTronics Tullamarine, Australia
http://www.labyrinth.net.au/~donmck

EASY PIC'n Beginners Guide to using PIC 16/17 MicroChip products.
Picosaurus(tm) 40 pin PICBasic with 8 channels of A-D, and real Uart.
PIC Basic Compiler. Programmers from 15 USD.  Pic-Axe(tm) A New Tool.

'HD44780 based 16x1 LCD display probl'
1996\08\09@213512 by David Schmidt

flavicon
face
Oh yeah, to address your question below, if you are hoping to buy 8x2 line
displays because you want to avoid having to do the display address change
thing,forget it!  All the two line displays I've used, the second line
is accessed just like the second half of the 16x1 line display you have
(unless you buy the 40x2 line displays, due to all the characters, you can
continuously write characters to it and it will properly write out the first
line, continue to the second, and when that fills, go back to the first line
and repeat.)
Dave

>PS:
>do you know if there are any markers on the LCD that say it is of the 8x2
>line type? I'd sooner buy the 16x1 liners if I can.
> -Russ

'LCD's mfg & resellers'
1996\08\10@104855 by Luiz Marques

flavicon
face
Hello All,

Due great interest in apps using LCDs I will build a list of manufactures
and reseller of LDC modules.

Any collaboration reply to my email or piclist

Further I will post the complete list here

I suppose Peer Ouwehand will compile a list to your home page

TIA
Luiz Marques

1996\08\10@132225 by Pekka Ritamaki

flavicon
face
to : Luiz Marques
>Due great interest in apps using LCDs I will build a list of manufactures
>and reseller of LDC modules.
I have 4*20 ( or smaller) LCD-module: which has following specs:
-9600 or 2400 baud input, Clear, delete, cursor forward, backward commands
gotorow 1-4 commands.All commands work from row 4 to 1 or backwards
- Logo from PIC16C84 EEPROM to display ROW1-4 with one command
- options: 12bit 2-ch AD-converter to RS-232 ( temperature reading  coming)
- 4 -buttons read to RS-232
- Backpack construction to LCD-module 7-24 V in 5 mA or 5V
- Price USD 69
- details in my ww-page
Regard Pekka
Pekka Ritamaki PROBYTE Oy Nirvankatu 31
FIN-33820 TAMPERE Finland http://www.sci.fi/~pri
Electronics product design: hardware+software+development tools
puh INT +358-31-2661885 fax INT +358-31-2661886

'40*2 LCD'
1996\08\11@184519 by Robert Lunn

flavicon
face
> One option I see is a Maxim dc-dc pump charge, or switched capacitor,
> inverter (MAX1044/ICL7660, MAX828/829 or MAX853) , looking at their data
> sheets it seems that could do the job. Anyone already tried or used
> similar components?

       Like the many others who have replied, I have used both an ICL7660
       (actually the Linear Technology equivalent) or the negative voltage
       from an RS-232 interface chip.

       Both solutions work without problems.

       Depending on what you are doing, building your own switched
       capacitor inverter is probably not worth the hassle.  Keep it
       simple and use a chip.  Note that there are newer versions of the
       '7660 that only need small (0.1 uf) external caps; I believe
       there's a version that doesn't need external caps at all.

___Bob

'LCD's mfg & resellers'
1996\08\12@175912 by Peer Ouwehand

flavicon
face
At 11:52 96/08/10 -0700, you wrote:
>Hello All,
>
>Due great interest in apps using LCDs I will build a list of manufactures
>and reseller of LDC modules.
>
>Any collaboration reply to my email or piclist
>
>Further I will post the complete list here
>
>I suppose Peer Ouwehand will compile a list to your home page
>
>TIA
>Luiz Marques

I will, as soon as I receive the info.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
       Peer Ouwehand
       EraseMEpouweha.....spamKILLspamiaehv.nl
       http://www.iaehv.nl/users/pouweha/

       Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

'LCD backlight sources'
1996\08\13@114746 by Paul Mathews

flavicon
face
There was a question about this earlier, but I didn't have the info at
the time.  One good source for small, high efficiency electroluminescent
backlights is:

BKL:  610 277 2910   fax 2956

fiber optic backlighting products from:

Lumitex

--

Paul Mathews, consulting engineer
AEngineering Co.
spamoptoengspamwhidbey.com
non-contact sensing and optoelectronics specialists

1996\08\13@120434 by Matthew Bustad

flavicon
face
>
> There was a question about this earlier, but I didn't have the info at
> the time.  One good source for small, high efficiency electroluminescent
> backlights is:
>
> BKL:  610 277 2910   fax 2956
>
> fiber optic backlighting products from:
>
> Lumitex
>
> --
>
> Paul Mathews, consulting engineer

Another is Spectra-Lux Corp., Kirkland Wa., (206) 823-6857

-Matthew (bustadSTOPspamspamtc.fluke.com) Fluke Corporation, Everett, Wa.

'digital watch lcds'
1996\08\14@161832 by Jerry English

flavicon
face
Does anybody know of a distributor or where I can get a small number
of liquid crystal displays of the size and type that are used in
digital watches? I am about at the point of just buying a cheap watch
and using the stuff inside.

Jerry English
Harris Corp.

'FAQ for LCD units'
1996\08\15@084626 by Harrison Cooper

flavicon
face
I've been saving most of the traffic on LCD modules,
in anticipation of using one in some future design.
Well, the time has arrived (I think), and I am curious
if anyone has put a FAQ together on the PIC and LCD
interfaces, suppliers of LCD, etc.  I thought someone
was talking about it, but don't see anything yet

1996\08\15@121746 by Bernard Seront

flavicon
face
At 06:45 AM 8/15/96 -0600, you wrote:
>I am curious
>if anyone has put a FAQ together on the PIC and LCD
>interfaces, suppliers of LCD, etc.
>
>

There's plenty of information about LCD's on the web (but not , as far as I
know, a list of suppliers).
These sites should bring you almost everywhere there's something related to
LCD's:

www.paranoia.com/~filipg/HTML/LINK/F_LCD_menu.html
http://www.doc.ic.ac.uk/~ih/doc/lcd/
http://www.iaehv.nl/users/pouweha/lcd.htm

Bernard.

-----
Bernard Seront, serontSTOPspamspamKILLspamseism1.ess.sunysb.edu (MIME ok)
http://rock.ess.sunysb.edu:8080/

1996\08\15@131139 by Peer Ouwehand

flavicon
face
At 12:15 96/08/15 -0400, you wrote:
>There's plenty of information about LCD's on the web (but not , as far as I
>know, a list of suppliers).
>These sites should bring you almost everywhere there's something related to
>LCD's:

A few users on this are are working on it, check
       http://www.iaehv.nl/users/pouweha/lcd_md.htm
It's a start, if someone has any supplier information to add to this list,
mail me, or use the mail form on the web page!

>Bernard.
>
>-----
>Bernard Seront, @spam@seront.....spamspamseism1.ess.sunysb.edu (MIME ok)
>http://rock.ess.sunysb.edu:8080/



Peer.
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
       Peer Ouwehand
       spampouweha.....spam.....iaehv.nl
       http://www.iaehv.nl/users/pouweha/

       Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

'Digital watch LCDs - esp. for PICs'
1996\08\15@155047 by Martin Nilsson

picon face
> From:    Jerry English <jenglish.....spamSU1B.ESS.HARRIS.COM>
> Subject: digital watch lcds
>
> Does anybody know of a distributor or where I can get a small number
> of liquid crystal displays of the size and type that are used in
> digital watches? I am about at the point of just buying a cheap watch
> and using the stuff inside.

Funny you asked right now. Yesterday, I reverse-engineered a cheap
chinese-made LCD watch. The interesting thing with this one is that
it uses a multiplexed LCD, 1/2-duty cycle, 1/2-bias, and so can be driven
with only 13 pins, 3 V.

This is exactly the number of free I/O-pins on the 18-pin PICs...
"Wait," you might say, "multiplexing means you need analog outputs,
doesn't it?" Yes, BUT in the special case of 1/2-duty cycle, all
segment pins (every segment pin drives two segments) are still
digital, and only the two common outputs use an intermediate
level. This can easily be arranged by HiZ-ing the common drives and
biasing with pairs of resistors.

Most seven-segment type cheap LCD-displays that can be bought
off-the-shelf are non-multiplexed and require something like 20+
drive pins, which makes it more cost-effective to buy a module
instead.  I believe most LCD displays are custom made, and become very
expensive in small quantities. If you need only a few, I would agree
the best way may be to disassemble a couple of
watches/timers/thermometers etc. from a local cheap-import store.

The watch I got at a local store here seems to be similar to Maplin's
YU05F @ GBP 8.50 (1995 catalogue), but I think Maplin is overpricing
that one (it is much cheaper here).

Good luck,

Martin Nilsson                           http://www.sics.se/~mn/
Swedish Institute of Computer Science    E-mail: KILLspammnspam_OUTspamsics.se
Box 1263, S-164 28 Kista                 Fax: +46-8-751-7230
Sweden                                   Tel: +46-8-752-1574

'FAQ for LCD units'
1996\08\19@175613 by Martin Nilsson

picon face
Bernard Seront wrote:

> >I am curious
> >if anyone has put a FAQ together on the PIC and LCD
> >interfaces, suppliers of LCD, etc.
> >
> >
>
> There's plenty of information about LCD's on the web (but not , as far as I
> know, a list of suppliers).
> These sites should bring you almost everywhere there's something related to
> LCD's:
>
> www.paranoia.com/~filipg/HTML/LINK/F_LCD_menu.html
> http://www.doc.ic.ac.uk/~ih/doc/lcd/
> http://www.iaehv.nl/users/pouweha/lcd.htm

Most of these FAQs are not really LCD FAQs, but HD44780-LCD-controller
FAQs.  The only exception is the LCD-physics FAQ, but it isn't very
useful if you really want to design something with LCDs.

True, HD44780 is probably by far the most common LCD controller, but
these FAQs are really very limited in scope. The best docs for LCDs in
general I've seen is the japanese Hitachi LCD Driver LSI Data Book. I
guess there must be an english version of it as well.

Martin Nilsson                           http://www.sics.se/~mn/
Swedish Institute of Computer Science    E-mail: spam_OUTmnspamTakeThisOuTsics.se
Box 1263, S-164 28 Kista                 Fax: +46-8-751-7230
Sweden                                   Tel: +46-8-752-1574

'LCD-Driver & Frequ. Measurement with 16c84'
1996\08\25@134206 by R.Kunert

flavicon
face
Hi All,

I'm searching for a solution for the following problem:
I want to measure a Frequency up to 1kHz and display this Frquency on a
7-Segment LCD Display with 4-Digits (similar to AN 563). Afterwards I
want to output the measured frequency on a Port.
I guess the 16c84 haven't much enough ports for this purpose. But anyway,
has anyone a solution?

Thanks for all Ideas

Ralf

1996\08\25@155701 by nogueira

flavicon
face
R.Kunert wrote:
>
> Hi All,
>
> I'm searching for a solution for the following problem:
> I want to measure a Frequency up to 1kHz and display this Frquency on a
> 7-Segment LCD Display with 4-Digits (similar to AN 563). Afterwards I
> want to output the measured frequency on a Port.
> I guess the 16c84 haven't much enough ports for this purpose. But anyway,
> has anyone a solution?
>
> Thanks for all Ideas
>
> Ralf

I have two diferent projects, one measure frequency and
the other drive a 4 digits 7-segment LED display.

My application use TMR0 with prescaler. It count the
number of pulses in 1 second or 0.1 seconds, than it
takes the value left in the prescaller and append to
the value in TMR0 to get a 16 bits number.
In 1 second I have 1 Hz resolution and in 0.1 second
I have 10 Hz resolution.

If you are interested, I can send you via e-mail.

Octavio
--
========================================================
Octavio Nogueira
  e-mail:   .....nogueira.....spamRemoveMEmandic.com.br
homepage: http://ourworld.compuserve.com/homepages/tato
voice/fax: +55 11 240-6474
========================================================

1996\08\27@035703 by Asian digital

flavicon
face
At 04:55 PM 8/25/95 -0200, you wrote:
{Quote hidden}

Hi,
       I'm quite interested in your frequency counting project. Would you
mind emailing me more information? Thanks.

Regards
Peter

1996\08\27@132030 by Rob Santello

flavicon
face
Octavio,

>I have two diferent projects, one measure frequency and
>the other drive a 4 digits 7-segment LED display.

I too would like info on your work.

Actually, let me ask you a question.  I play drums and often need to use a
metronome to set and maintain correct tempo.  This works but has drawbacks
in live situations where it is nice to let the tempo move around a bit but
still be at or near the reference tempo.  When using a metronome, once you
'drift' off beat you are 'out of sync' with the metronome and its difficult
to tell if you are still playing at the same rate with a quick glance.
There is a product on the market that uses a piezo on the snare drum and
displays the real time tempo (bmp: in beats per minute) on three 7 segment
LEDs (range: 40-300 bpm).  I bought one and it was terrible!  He used
discrete logic (11 IC's) and the tracking was bad and the resolution varied
according to the range.  Basically it was worthless!  I could really use
something like this and I knew even I could do better.  I've gotten started
on my prototype and so far have a metronome running along at a fixed 120bpm.
Using an '84 with a ICL7218D multiplex display driver (would eventually like
to roll this function into the '84), blah blah blah....

Anyway my question to you is, might you be interested (or have the time
even) to help?  I've been way to busy with work and other things to be able
to put time into this learning project but I could really use the working
product now.  I'm sure someone with your experience could whip something
simple like this out in no time.  Whereas, it will (already has) take me
much longer.  I do have some other 'features' to add to it if possible but
mostly just need to get this part of it going.  I don't know if you would be
interested in something like this or not.  If so, I'd take anything from
free suggestions to (depending on cost) compensating you for more detailed
help.  I will supply any info you would need (parameters, circuit ideas,
function, interface).

I guess I just need to know if you are even interested or able to do
anything like this? If so, what might you need to charge for your time?

Please let me know (or at least send the info on your semi-related projects
- anything that could help will be extremely appreciated!).

Thanks for your time...
Rob Santello
hm: (916) 366-6330  Rancho Cordova, CA

1996\08\27@150033 by John Payson

flavicon
face
> Actually, let me ask you a question.  I play drums and often need to use a
> metronome to set and maintain correct tempo.  This works but has drawbacks
> in live situations where it is nice to let the tempo move around a bit but
> still be at or near the reference tempo.  When using a metronome, once you
> 'drift' off beat you are 'out of sync' with the metronome and its difficult
> to tell if you are still playing at the same rate with a quick glance.

How about this for a device...

Initially, you would punch in the tempo and it would blink the light at
the appropriate rate.

If it detected a "beat" input just before the light was supposed to blink,
it would bump the speed up a little bit.  If it detected a beat just after
the light was supposed to blink, it would bump the speed down a little bit.
By varying the size of its "grab/ignore" zones, you could trade off ability
to adjust more quickly to changes in tempo for ability to ignore notes that
weren't "on the beat".

How does that sound for an approach?  [nb: I'd probably want to add some
phasing logic as well to help the system even more]

1996\08\27@152850 by mfahrion

flavicon
face
> > Actually, let me ask you a question.  I play drums and often need to use a
> > metronome to set and maintain correct tempo.  This works but has drawbacks
> > in live situations where it is nice to let the tempo move around a bit but
> > still be at or near the reference tempo.  When using a metronome, once you
> > 'drift' off beat you are 'out of sync' with the metronome and its difficult
> > to tell if you are still playing at the same rate with a quick glance.
>
> How about this for a device...
>
> Initially, you would punch in the tempo and it would blink the light at
> the appropriate rate.
>
> If it detected a "beat" input just before the light was supposed to blink,
> it would bump the speed up a little bit.  If it detected a beat just after
> the light was supposed to blink, it would bump the speed down a little bit.
> By varying the size of its "grab/ignore" zones, you could trade off ability
> to adjust more quickly to changes in tempo for ability to ignore notes that
> weren't "on the beat".


Hmmmm - interesting application - a metronome that follows you
instead of vice versa.  My music professors would have thrown a fit
:)

Anyway - I'm not sure you can just let the thing track you, if it
does this what's the point of having it?

How about you keep the standard speed metronome but add an
additional meter/gauge/display to indicate the "error" in tempo.
Not the distance of your beat from it but the differences in the
time between beats.  I can picture a vertical bar graph sort of
thing, which would illuminate progressively upwards when you exceed
the set tempo and downwards when as you drag.  This would help you
return to the original tempo with no loss/distortion of the original
"signal".

And here I thought that drummers kept a perfect tempo running in
their heads :)

Best regards
-mike
EraseMEmfahrionspamBeGonespamKILLspambb-elec.com

1996\08\27@174115 by Edwin Park

flavicon
face
    I play a lot of live music [and I am also a drummer :) ] and such an
    application may prove useful.  Some of the music being played live is
    electronic (i.e. MIDI, drum machine, etc).  Anyway, they are very
    unforgiving about getting out of tempo.  Real musician try to stay in
    beat with the rest of the band if the band seems to be changing the
    tempo a bit; however, these machine just go their own (and correct
    tempo).  People's meter are not perfect, so such a feedback system in
    an electronic music device would be nice.

    The best solution would be to have a monitor (speaker) come back to
    all the musicians, but oftentimes, this is not possible.  First, we
    have to set up quickly, so we always do not have a chance at a sound
    check.  Second, sometimes, we cannot figure a way around the feedback
    we may get if we did have a monitor come back to all the musicians.

    Of course, one has to be careful to prevent the "meter" from speeding
    up ad infinitum after the band starts to speed up.  This often happens
    in beginning bands (like my sixth grade concert band).  When one
    person in the band sped up, the rest of the band sped up, than more
    people sped up, etc.  It gets quite disastrous.

    -Edwin

    ----------------------------------------------------------------------

{Quote hidden}

Hmmmm - interesting application - a metronome that follows you
instead of vice versa.  My music professors would have thrown a fit
:)

Anyway - I'm not sure you can just let the thing track you, if it
does this what's the point of having it?

How about you keep the standard speed metronome but add an
additional meter/gauge/display to indicate the "error" in tempo. Not
the distance of your beat from it but the differences in the time
between beats.  I can picture a vertical bar graph sort of thing,
which would illuminate progressively upwards when you exceed the set
tempo and downwards when as you drag.  This would help you return to
the original tempo with no loss/distortion of the original "signal".

And here I thought that drummers kept a perfect tempo running in
their heads :)

Best regards
-mike
RemoveMEmfahrionspamBeGonespamspambb-elec.com

1996\08\27@174259 by nogueira

flavicon
face
Asian digital wrote:
> Hi,
>         I'm quite interested in your frequency counting project. Would you
> mind emailing me more information? Thanks.
>
> Regards
> Peter

Hi Peter, this is the routine
RA2 is connected to TMR0 input and the input is connected
to signal via 47K resistor.
The routine return the 24 bit value in REG3,REG2,REG1

;******************************************************
; ROTINA DE CONTAGEM, TEMPO DO LOOP 16us
; To 0.1s GATE=25
; To 1s GATE=250
;******************************************************
CONTA
       BCF     PORT_A,2                ;PARA CONTAGEM
       CLRF    REG3                    ;ZERA O REGISTRO
       CLRF    REG2
       CLRF    REG1
       MOVLW   250                     ;250 NORMALMENTE
       MOVWF   COUNT                   ;ZERA CONTADOR DE TEMPO
       CLRF    RTCC
       NOP
       NOP
       BSF     PORT_A,3                ;LIBERA CONTAGEM
CONTINUA
       NOP
       NOP
       NOP
       NOP
C0      NOP
       NOP
       NOP
       BTFSC   INTCON,RTIF            ;TESTA ESTOURO
       GOTO    INCRM
       NOP
       GOTO    NINCR
INCRM   BCF     INTCON,RTIF
       INCF    REG3,1                 ;SIM INCREMENTA REG3
NINCR   DECF    COUNT,1
       BTFSS   STATUS,Z
       GOTO    CONTINUA
       MOVLW   250
       MOVWF   COUNT
       DECFSZ  GATE,1
       GOTO    C0

       BCF     PORT_A,3               ;PARA CONTAGEM
       MOVF    RTCC,W
       MOVWF   REG2                    ;SALVA RTCC

MAIS    DECF    REG1,1
       BSF     PORT_A,RS               ;\INCREMENTA PRESCALLER
       NOP
       BCF     PORT_A,RS               ;/
       MOVF    REG2,W
       XORWF   RTCC,W                  ;VE SE RTCC MUDOU
       BTFSC   STATUS,Z
       GOTO    MAIS                    ;NAO MUDOU
       INCF    REG1,1
       RETURN



--
========================================================
Octavio Nogueira
e-mail:   @spam@nogueiraspamspammandic.com.br
homepage: http://ourworld.compuserve.com/homepages/tato
voice/fax: +55 11 240-6474
========================================================
"ProPic" The first Production PIC Programmer running in
Windows and under US$ 20.00.
Avaible at http://ourworld.compuserve.com/homepages/tato

1996\08\27@174306 by nogueira

flavicon
face
Rob Santello wrote:

> There is a product on the market that uses a piezo on the snare drum and
> displays the real time tempo (bmp: in beats per minute) on three 7 segment
> LEDs (range: 40-300 bpm).  I bought one and it was terrible!  He used
> discrete logic (11 IC's) and the tracking was bad and the resolution varied
> according to the range.  Basically it was worthless!  I could really use
> something like this and I knew even I could do better.  I've gotten started
> on my prototype and so far have a metronome running along at a fixed 120bpm.
> Using an '84 with a ICL7218D multiplex display driver (would eventually like
> to roll this function into the '84), blah blah blah....

I think it's easy to change your metronome to a 'inverse metronome', a device
that show your bpm, so you can adjust yourself.
All you have to do is to read the frequency and multiply by 60.

Octavio
--
========================================================
Octavio Nogueira
e-mail:   TakeThisOuTnogueiraKILLspamspam@spam@mandic.com.br
homepage: http://ourworld.compuserve.com/homepages/tato
voice/fax: +55 11 240-6474
========================================================
"ProPic" The first Production PIC Programmer running in
Windows and under US$ 20.00.
Avaible at http://ourworld.compuserve.com/homepages/tato

1996\08\27@174306 by nogueira

flavicon
face
Rob Santello wrote:

> There is a product on the market that uses a piezo on the snare drum and
> displays the real time tempo (bmp: in beats per minute) on three 7 segment
> LEDs (range: 40-300 bpm).  I bought one and it was terrible!  He used
> discrete logic (11 IC's) and the tracking was bad and the resolution varied
> according to the range.  Basically it was worthless!  I could really use
> something like this and I knew even I could do better.  I've gotten started
> on my prototype and so far have a metronome running along at a fixed 120bpm.
> Using an '84 with a ICL7218D multiplex display driver (would eventually like
> to roll this function into the '84), blah blah blah....

I think it's easy to change your metronome to a 'inverse metronome', a device
that show your bpm, so you can adjust yourself.
All you have to do is to read the frequency and multiply by 60.

Octavio
--
========================================================
Octavio Nogueira
e-mail:   .....nogueiraRemoveMEspammandic.com.br
homepage: http://ourworld.compuserve.com/homepages/tato
voice/fax: +55 11 240-6474
========================================================
"ProPic" The first Production PIC Programmer running in
Windows and under US$ 20.00.
Avaible at http://ourworld.compuserve.com/homepages/tato

1996\08\27@182647 by Mark K Sullivan

flavicon
face
Have you guys (i.e. real musicians) seen a product called "the human clock"
?  I think is was from an outfit called Kahler (Koehler?)  It was supposed
to listen to the humans and provide a clock for the sequencers.

- Mark Sullivan -

1996\08\27@191144 by John Payson

flavicon
face
> > Initially, you would punch in the tempo and it would blink the light at
> > the appropriate rate.
> >
> > If it detected a "beat" input just before the light was supposed to blink,
> > it would bump the speed up a little bit.  If it detected a beat just after
> > the light was supposed to blink, it would bump the speed down a little bit.
> > By varying the size of its "grab/ignore" zones, you could trade off ability
> > to adjust more quickly to changes in tempo for ability to ignore notes that
> > weren't "on the beat".
>
> Hmmmm - interesting application - a metronome that follows you
> instead of vice versa.  My music professors would have thrown a fit
> :)
>
> Anyway - I'm not sure you can just let the thing track you, if it
> does this what's the point of having it?

Actually, I was planning [but forgot to mention] to also incorporate a
display [perhaps the numerical display could flash in tempo] so the
drummer [or whomever] could see what tempo he was keeping.  The difference
between this and a conventional frequency counter would be that this unit
could ignore complicated rhythms and things which don't happen on the beat.

> How about you keep the standard speed metronome but add an
> additional meter/gauge/display to indicate the "error" in tempo. Not
> the distance of your beat from it but the differences in the time
> between beats.  I can picture a vertical bar graph sort of thing,
> which would illuminate progressively upwards when you exceed the set
> tempo and downwards when as you drag.  This would help you return to
> the original tempo with no loss/distortion of the original "signal".

Might be one way of doing things.  That or straight numeric--probably not
too much of a difference.

> And here I thought that drummers kept a perfect tempo running in
> their heads :)

I'm no drummer, but I can often manage to judge tempo and pitch pretty
well.

1996\08\27@191357 by John Payson

flavicon
face
> I think it's easy to change your metronome to a 'inverse metronome', a device
> that show your bpm, so you can adjust yourself.
> All you have to do is to read the frequency and multiply by 60.

This presupposes:

[1] Your signal source is a nice straight beat instead of a more complex
   pattern.

[2] Your frequency measurement has suitable resolution (you'd need a device
   which measures the period and displays the reciprocol unless you want
   to wait 10 seconds to get a reading accurate to 6bpm).

[3] Your input beat is sufficiently stable that consecutive readings won't
   be jumping around all over the place.

'I2C LCD?'
1996\08\27@222540 by Shel Michaels

picon face
Hi All...

  Anybody know of an LCD module (either dot matrix or seven segment) that
has not only the controller and drivers built in, but listens to I2C??
  My project is running short of pins, and this would be a great way to save
a few!
  Thanks _very_ much in advance!  8^)

Shel Michaels
KILLspamsbmichaelsspamTakeThisOuTaol.com
http://members.aol.com/sbmichaels/index.html

1996\08\27@232058 by Clyde Smith-Stubbs

flavicon
face
Shel Michaels <TakeThisOuTSbmichaelsspamspam_OUTAOL.COM> wrote:

>    Anybody know of an LCD module (either dot matrix or seven segment) that
> has not only the controller and drivers built in, but listens to I2C??

There is a Philips module LPH3827 that is a two-line LCD with an I2C interface.
I don't know anything more about it, because Philips Australia say it is
not available here. I know it exists, because I have one of them! But I've
never used it. It has 6 pins, which appear to be +5, GNDx2, contrast and the
I2C interface. The controller chip is epoxied onto the glass substrate.

Clyde

--
Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3300 5011
RemoveMEclydespamspamSTOPspamhitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3300 5246
http://www.hitech.com.au | QLD, 4051, AUSTRALIA.   | BBS:   +61 7 3300 5235
---------------------------------------------------------------------------
For info on the World's best C cross compilers for embedded systems, point
your WWW browser at http://www.hitech.com.au, or email .....infoEraseMEspamhitech.com.au

1996\08\28@061632 by n/a

flavicon
face
I used a HD 44780 LCD display from Hitachi in its 4Bit mode. The communication
is done over a 8574A IO-Expander Chip from PHILIPS. Please the comment at the
LCD routines for the wiring. The actual IIC Routines have been written for a
serial FRAM IC but can be used with a little trick as described in the comments
for the LCD as well. It works very nice with my application.

regards

Michael Schmidl
Manager Hardware Design

FAST Software Security Group ALADDIN
Gabriele-Muenter-Str. 1
D-82110 Germering, Germany
Phone: ++49.89.894221-0
Fax  : ++49.89.894221-40
email: spamBeGoneMSchmidlspamRemoveMEfast-ag.de

See our Web site at http://www.fast-ag.de

;*** here comes the code *********************************************

       LIST    P=16C84
       include "p16cxx.inc"
       include "p16cxxd.inc"
;
;*********************************************************************
SAME    EQU     H'0001' ;used to load value back into SAME file
;*********************************************************************
WBuf    equ     0x0C    ;IRQ W-Buffer
SBuf    equ     0x0D    ;IRQ S-Buffer

Which   equ     0x10
n       equ     0x11
i       equ     0x12

I2C_D   equ     0x13    ;IìC Data
I2C_AH  equ     0x14    ;IìC AdrHigh
I2C_AL  equ     0x15    ;IìC AdrLow
I2Cmask equ     0x16    ;IìC Mask for BitShift
I2Cwork equ     0x17    ;using just inside IìC routines
I2CFlag equ     0x18    ;1=terminate communiation, 0=keep open for more
#define R_LAST  I2CFlag,H'0000'
#define W_LAST  I2CFlag,H'0000'

; RAM until 0x2F
;*********************************************************************
; Pin Definition PortB
; Pin Definition PortA
#define SCL_PIN PORTA,H'0000'
#define SDA_PIN PORTA,H'0001'

;############################################################################
;# C o n s t a n t s                                                        #
;############################################################################
#define LCD_ADR 0x70            ;IIC-Address of 8574A
#define LCD_E   0x02
#define LCD_RW  0x04
#define LCD_RS  0x08
#define RAM_ADR 0xA0            ;IIC-Address of FRAM


;############################################################################
;# B e g i n   o f   C o d e                                                #
;############################################################################
       org     0x000           ;for 16C84
Reset   goto    Startup
       nop
       nop
       nop
IRQ     goto    irqServ

       org     0x005           ;for 16C84

;############################################################################
;# G e n e r a l   U t i l i t i e s                                        #
;############################################################################
;Copyright String (must be located in page 0!), $FF terminated
Mess1   addwf   PCL
       retlw   'X'
       retlw   '1'
       retlw   '.'
       retlw   '1'
       retlw   ' '
       retlw   '('
       retlw   'C'
       retlw   ')'
       retlw   '1'
       retlw   '9'
       retlw   '9'
       retlw   '5'
       retlw   ' '
       retlw   'M'
       retlw   'K'
       retlw   'S'
       retlw   0

;Nibble W to ASCII must be located in page 0!
NTOA    andlw   0x0F            ;be sure to use only 0..15 as parameter
       addwf   PCL             ;add lower nibble to the PC
       retlw   '0'
       retlw   '1'
       retlw   '2'
       retlw   '3'
       retlw   '4'
       retlw   '5'
       retlw   '6'
       retlw   '7'
       retlw   '8'
       retlw   '9'
       retlw   'A'
       retlw   'B'
       retlw   'C'
       retlw   'D'
       retlw   'E'
       retlw   'F'

;############################################################################
;# M a i n   L o o p                                                        #
;############################################################################
Main    ....

;############################################################################
;# D e l a y   R o u t i n e s                                              #
;############################################################################
Wait    movlw   .40             ;Wait 40 ms
WaitWms movwf   nWait           ;other entry point. Delay given by W [ms]
WaitL1  movlw   .203            ;.249 without TMR0 Irq every 100‘s
       movwf   iWait
WaitL2  nop
       decfsz  iWait,SAME
       goto    WaitL2
       decfsz  nWait,SAME
       goto    WaitL1
       return


;############################################################################
;# S t a r t u p                                                            #
;############################################################################
Startup
;initialize 8574 IO-Expander which drives the LCD
       movlw   LCD_ADR         ;set all lines low for the LCD
       movwf   I2C_AH
       movlw   0x00
       movwf   I2C_AL
       movwf   I2C_D
       call    WRONE
;initialize LCD
       movlw   .50
       call    WaitWms
       movlw   0x30            ;8bit
       call    LCDWRN0
       movlw   .5
       call    WaitWms
       movlw   0x30            ;8bit
       call    LCDWRN0
       movlw   .1
       call    WaitWms
       movlw   0x30            ;8bit
       call    LCDWRN0
       movlw   0x20            ;8bit
       call    LCDWRN0
       movlw   0x28            ;4bit, 2lines, 5x7
       call    LCDWRB0
       movlw   0x08            ;display off
       call    LCDWRB0
       movlw   0x01            ;display clear
       call    LCDWRB0
       movlw   0x06            ;shift
       call    LCDWRB0
       movlw   0x0D            ;display on
       call    LCDWRB0
;end of INIT LCD

;print (C) string to LCD
       clrf    i               ;set string index to 0
       movf    i,W             ;load string index
       incf    i               ;increment index for next round
       call    Mess1           ;get string[i] to W
       xorlw   0x00            ;test it for NULL
       btfsc   STATUS,Z
       goto    $+3             ;if NULL, exit loop
       call    LCDWRB1         ;else send it to LCD
       goto    $-7             ;and continue the loop
;end of PRINT (C) string to LCD

       movlw   0xC0            ;LCD HOME at line 2
       call    LCDWRB0

       goto    Main

;############################################################################
;# I 2 C - R o u t i n e s   f o r   2 4 C 0 4   F R A M   a n d   o t h e r#
;############################################################################
; the IIC WRITE routine has four entry points:
;   * WRONE (write just one byte): it sets the W_LAST flag, because the
;     routine must terminate the IIC communication after the byte written.
;     The communications starts with label WR1 because the address to be
;     written must be set first.
;   * WRFIRST (write the first of two or more bytes): it lets the W_LAST flag
;     cleared, because more bytes may follow later on.
;     The communications starts with label WR1 because the start address
;     must be set first.
;   * WRNEXT writes one more byte to the device. The routine starts with
;     label WR2, because no start address must be given because it has to be
;     set already by a former WRFIRST. It also leaves the W_LAST flag cleared
;     as it is, because more bytes will follow.
;   * WRLAST writes one byte to the device and terminates the IIC
;     communication afterwards. The routine starts with label WR2, because no
;     start address must be given because it has to be set already by a
;     former WRFIRST.
;
; All routines end at the SAME exit point where the W_LAST flag is cleared!
;
; The READ routine is also split in this four categories and handled similar.
;
; Timing is 100KHz slow IIC compliant with a 4MHz Clock used by the PIC.
;
WRONE   bsf     W_LAST          ;set LAST flag, because only one byte
WRFIRST goto    WR1             ;keep flags as they are
WRLAST  bsf     W_LAST          ;set LAST flag
WRNEXT  goto    WR2             ;read one byte
WR1     call    I2CS            ;Start

       movf    I2C_AH,W        ;write SLAVE Address
       andlw   0xFE            ;be sure R/~W is 0
       call    I2CXMIT
       call    I2CACK          ;Acknowledge

       movf    I2C_AL,W        ;followed by WORD ADDRESS
       call    I2CXMIT
       call    I2CACK

WR2     movf    I2C_D,W         ;now write the byte
       call    I2CXMIT
       call    I2CACK          ;wait for ACK of slave
       btfsc   W_LAST          ;skip next CALL if KEEP OPEN
       call    I2CP            ;terminate communication
       clrf    I2CFlag         ;reset all flags
       return
;-----
RDONE   bsf     R_LAST          ;set LAST flag, because only one byte
RDFIRST goto    RD1             ;keep flags as they are
RDLAST  bsf     R_LAST          ;set LAST flag
RDNEXT  goto    RD2             ;read one byte
RD1     call    I2CS            ;Start
       movf    I2C_AH,W        ;write SLAVE Address
       andlw   0xFE            ;be sure R/~W is 0
       call    I2CXMIT
       call    I2CACK          ;Acknowledge
       movf    I2C_AL,W        ;followed by WORD ADDRESS
       call    I2CXMIT
       call    I2CACK
       call    I2CP            ;terminate the WRITE
       call    I2CS            ;Start again
       movf    I2C_AH,W        ;write SLAVE Address
       iorlw   0x01            ;be sure R/~W is 1
       call    I2CXMIT
       call    I2CACK          ;Acknowledge
RD2
       call    I2CRECV         ;read 1 byte from slave
       btfss   R_LAST          ;skip next CALL if TERMINATE
       call    I2C0            ;acknowlege to slave, because NO TERMINATE
       btfsc   R_LAST          ;skip next CALL if KEEP OPEN
       call    I2C1            ;do not acknowlege to slave, because TERMINATE
       btfsc   R_LAST          ;skip next CALL if KEEP OPEN
       call    I2CP            ;terminate communication, because TERMINATE
       clrf    I2CFlag         ;reset all flags
       return
;-----------------------------------------------------------------------------
I2CRECV movlw   .8              ;8 Bits are comming in
       movwf   n
       clrf    I2C_D           ;set DATA to NULL
       bsf     STATUS,RP0      ;select Page1
       bsf     SDA_PIN         ;set to Input
       bcf     STATUS,RP0      ;back to Page0
I2CRL   bsf     SCL_PIN         ;SCL=1
       bcf     STATUS,C        ;Carry=0
       btfsc   SDA_PIN         ;what is SDA?
       bsf     STATUS,C        ;if 1, set CARRY=1
       rlf     I2C_D,SAME
       bcf     SCL_PIN         ;SCL=0
       decfsz  n,SAME
       goto    I2CRL
;
       bsf     STATUS,RP0      ;select Page1
       bcf     SDA_PIN         ;set to OUTPUT
       bcf     STATUS,RP0      ;back to Page0
       return
;---------------------------------------------------
;IìC transmit the byte stored in file W
I2CXMIT movwf   I2Cwork         ;save Byte to transfer
       movlw   .8              ;8 Bits must be transfered
       movwf   n
       movlw   0x80
       movwf   I2Cmask
I2CXL   movf    I2Cmask,W
       andwf   I2Cwork,W
       bnz     I2CX1
I2CX0   call    I2C0
       goto    I2CXN
I2CX1   call    I2C1
       goto    I2CXN
I2CXN   bcf     STATUS,C
       rrf     I2Cmask,SAME
       decfsz  n,SAME
       goto    I2CXL
       return
;---------------------------------------------------
;IIC get Slave Acknowlege (needs a timeout and a real check for "ACK")
I2CACK  bsf     STATUS,RP0      ;Page1 select
       bsf     SDA_PIN         ;configure it as Input
       bcf     STATUS,RP0      ;Page0 select
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bcf     SCL_PIN         ;5‘s Hold Time
       bcf     SDA_PIN
       bsf     STATUS,RP0      ;Page1 select
       bcf     SDA_PIN         ;configure it as Output
       bcf     STATUS,RP0      ;Page0 select
       return

;IIC transmit a 1 to slave
I2C1    bsf     SDA_PIN
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bcf     SCL_PIN         ;5‘s Hold Time
       return

;IIC transmit a 0 to slave
I2C0    bcf     SDA_PIN
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bsf     SCL_PIN         ;4‘s HIGH
       bcf     SCL_PIN         ;5‘s Hold Time
       return

;IIC START removes the tristate of SCL/SDA because we need control now
I2CS    bcf     SDA_PIN         ;SDA=0
       bsf     STATUS,RP0      ;Page1 select
       bcf     SDA_PIN         ;configure it as Output
       bcf     STATUS,RP0      ;Page0 select
       bcf     SCL_PIN         ;SCL=0
       bsf     STATUS,RP0      ;Page1 select
       bcf     SCL_PIN         ;configure it as Output
       bcf     STATUS,RP0      ;Page0 select
       bcf     SCL_PIN         ;>4‘s Hold Time
       return

;IIC STOP tristates the SCL/SDA pins so other devices may have control now
I2CP    bsf     STATUS,RP0      ;Page1 select
       bsf     SCL_PIN         ;configure it as Input
       bcf     STATUS,RP0      ;Page0 select
       bsf     STATUS,RP0      ;Page1 select
       bsf     SDA_PIN         ;configure it as Input
       bcf     STATUS,RP0      ;Page0 select
       return

;############################################################################
;# L C D   D i s p l a y   R o u t i n e s                                  #
;############################################################################
; the 4Bit mode of the HD 44780 is used. The communication is done over
; a 8574A IO-Expander with the following connections to the LCD:
;   P7=D7
;   P6=D6
;   P5=D5
;   P4=D4
;   P3=E
;   P2=RW
;   P1=RS
;   P0=unused
; The IIC-routines are the same as for the FRAM. Because a memory needs a
; master address plus an opcode byte but the 8574A needs only a master
; address followed immediatly by the data, we use a small trick to write to
; the LCD:
;   * IIC_AH holds the master address of the 8574A as usual.
;   * IIC_AL holds the 4 bit to be written with LCD_RW=0 and LCD_W=1
;   * IIC_D  holds the 4 bit to be written with LCD_RW=0 and LCD_W=0
; With this data we use the WRONE routine which outputs one data byte plus
; opcode (in our case two data bytes <g>) and terminates the communication
; afterwards. So, the LCD routines free the IìC-Bus after communication!
;
; Entry points:
;   LCDWRB0 write a byte into register 0 (configuration)
;   LCDWRN0 write nibble D[7:4] into register 0
;   LCDWRB1 write a byte into register 1 (display)
;
LCDWRB0 movwf   tmpWLCD ;save the W register with the 8 Bit
       andlw   0xF0    ;keep the upper part for the first 4 bits
       movwf   I2C_D   ;store it as "second" data
       iorlw   LCD_E   ;set LCD_E bit for "first" data
       movwf   I2C_AL  ;and store it as "first" byte
       movlw   LCD_ADR
       movwf   I2C_AH  ;store 8574A address as master address
       call    WRONE   ;write upper nibble to LCD
       movlw   .1
       call    WaitWms
       swapf   tmpWLCD,W  ;get saved value swapped so D[3:0] are in place
LCDWRN0 andlw   0xF0    ;keep the upper part for the first 4 bits
       movwf   I2C_D   ;store it as "second" data
       iorlw   LCD_E   ;set LCD_E bit for "first" data
       movwf   I2C_AL  ;and store it as "first" byte
       movlw   LCD_ADR
       movwf   I2C_AH  ;store 8574A address as master address
       call    WRONE   ;write lower nibble to LCD
       movlw   .1
       call    WaitWms
       return
;
LCDWRB1 movwf   tmpWLCD ;save the W register with the 8 Bit
       andlw   0xF0    ;keep the upper part for the first 4 bits
       iorlw   LCD_RS  ;set RS to 1
       movwf   I2C_D   ;store it as "second" data
       iorlw   LCD_E   ;set LCD_E bit for "first" data
       movwf   I2C_AL  ;and store it as "first" byte
       movlw   LCD_ADR
       movwf   I2C_AH  ;store 8574A address as master address
       call    WRONE   ;write upper nibble to LCD
       movlw   .1
       call    WaitWms
       swapf   tmpWLCD,W  ;get saved value swapped so D[3:0] are in place
       andlw   0xF0    ;keep the upper part for the first 4 bits
       iorlw   LCD_RS  ;set RS to 1
       movwf   I2C_D   ;store it as "second" data
       iorlw   LCD_E   ;set LCD_E bit for "first" data
       movwf   I2C_AL  ;and store it as "first" byte
       movlw   LCD_ADR
       movwf   I2C_AH  ;store 8574A address as master address
       call    WRONE   ;write lower nibble to LCD
       movlw   .1
       call    WaitWms
       return

       END



       Sbmichaels @ AOL.COM (Shel Michaels)
28.08.96 04:26
To: PICLIST @ MITVMA.MIT.EDU (Multiple recipients of list PICLIST) @ INTERNET
cc:  (bcc: PIC)
Subject: I2C LCD?

Hi All...

  Anybody know of an LCD module (either dot matrix or seven segment) that
has not only the controller and drivers built in, but listens to I2C??
  My project is running short of pins, and this would be a great way to save
a few!
  Thanks _very_ much in advance!  8^)

Shel Michaels
.....sbmichaelsEraseMEspamaol.com
http://members.aol.com/sbmichaels/index.html

1996\08\28@133523 by Michael Kutzke #3

flavicon
face
Shel Michaels <spamSbmichaelsspam_OUTspam@spam@AOL.COM> wrote:

>    Anybody know of an LCD module (either dot matrix or seven segment) that
> has not only the controller and drivers built in, but listens to I2C??

The best solution that I have seen to this is to use an I2C - 8 bit
I/O converter from Phillips (PCF 8574 Remote 8 bit I/O expander for
I2C bus: see http://www.semiconductors.philips.com/ps/gif/3042.gif)

This can then be used to connect to any normal LCD with a 7 bit
interface.

By the way, does anyone know a good US source for the PCF8574??

Thanks,  Mike
----------------------------------------------------------------------------
Michael Kutzke  (Honeywell, CAS/SPO) Hardware/Software Design
                     spammkutzke@spam@spamSTOPspamcfsmo.honeywell.com
The views expressed above are mine and mine alone and not those of
Honeywell
----------------------------------------------------------------------------

'LCD-Driver & Frequ. Measurement with 16c84'
1996\08\28@135517 by Reginald Neale

flavicon
face
>Have you guys (i.e. real musicians) seen a product called "the human clock"
>?  I think is was from an outfit called Kahler (Koehler?)  It was supposed
>to listen to the humans and provide a clock for the sequencers.
>
>- Mark Sullivan -

I think there is also a product called the Russian Dragon. It's a little
box with a microphone, a MIDI connection and a red or green LED depending
on whether you're ahead of (Rushin') or behind (Draggin') the beat.



.....................Reg Neale.....................
"Ignorance is a renewable resource"   P.J. O'Rourke

'I2C LCD'
1996\08\28@142500 by Wireless Scientific

flavicon
face
At 12:35 PM 8/28/96, Michael Kutzke #3 wrote:
>By the way, does anyone know a good US source for the PCF8574??


I just looked it up 10 seconds before I read my mail. Marshall has 6471
PCF8574PN in stock at $3.03. Don't know if that's good or bad.

craig


'PIC/LCD'
1996\09\04@232201 by Wynn Rostek
flavicon
face
I've been trying to convince NASA here to use PICs, and it looks like I've got
my chance.  We need a very low power drain system that basically runs several
very long duration count down timers and can display three lines of data.  I
seem to remember a discussion of LCD's not too long ago.  Does anyone have
a PIC board with an attached LCD?  Three lines of 12 characters would do it.

Can anyone pass along information on the power draw of any LCD displays?
(Monochrome, 3 lines of 16 characters)  I'm trying to keep total current
drain under 10 ma, figuring no more than 4 ma for the PIC.  How big of an
LCD display could we power?  Any pointers to web sites?

TIA,

Wynn Rostek
spamBeGoneWB4ZUYspamBeGonespam@spam@amsat.org
RemoveMEwynn.rostekRemoveMEspamRemoveMEksc.nasa.gov
warKILLspamspamspamnasa2.ksc.nasa.gov
spam_OUTwar@spam@spampalmnet.net
Wynn Rostek
TakeThisOuTwarspam_OUTspampalmnet.net
KILLspamwynn.....spamTakeThisOuTpitcairn.ksc.nasa.gov
TakeThisOuTwynn.rostekEraseMEspamRemoveMEksc.nasa.gov

Other Email addresses available if you really need 'em...

1996\09\05@110109 by Shawn Ellis

flavicon
face
>seem to remember a discussion of LCD's not too long ago.  Does anyone have
>a PIC board with an attached LCD?  Three lines of 12 characters would do it.
>

Yeah, I've done several of these now.  The interface is usually some simple
paralelle standard, can be hooked right up to the PIC's IO lines.  It can
all be done with one 8-bit port.


>Can anyone pass along information on the power draw of any LCD displays?
>(Monochrome, 3 lines of 16 characters)  I'm trying to keep total current
>drain under 10 ma, figuring no more than 4 ma for the PIC.  How big of an
>LCD display could we power?  Any pointers to web sites?
>

You should be fine with that power for most mid-sized LCD's, as long as you
don't try to backlight it.  Backlighting would cost you a little more than
20 ma for LED and about half that for EL!  Barring that, you should be able
to get away with a 4 x 16 digit display with something like a 76 x 25 mm
viewing area.  Just run the PIC at the lowest speed you think you can get
away with and use current limiters on all it's outputs!

1996\09\05@114510 by Jerry Heim

flavicon
face
All,

I am new to PICs and the PICLIST.  I have done a fair amount of work with
the 8051 (and compatible devices), but I am intrigued by the size/cost
advantages of the PIC series.

I am interested in connecting a PIC to a small display.  It appears that the
most code available for driving LCD modules use Hitachi display drivers (see
Microchip AN587 for example).  What is a good source for these Hitachi
displays?  Do the Optrex modules in the Digikey catalog use the Hitachi
display driver?

Also, I have a small stash of the HDSP 2112 LED modules from HP.  I am
considering writing a display driver for these modules, but it would be
great if someone who has already written a driver would share their code
with me.

Thanks in advance,

-Jerry Heim
spam_OUTgheimRemoveMEspam.....ball.com

1996\09\05@114727 by Wireless Scientific

flavicon
face
At 10:58 PM 9/4/96, Shawn Ellis wrote:
>>seem to remember a discussion of LCD's not too long ago.  Does anyone have
>>a PIC board with an attached LCD?  Three lines of 12 characters would do it.
>>
>
>Yeah, I've done several of these now.  The interface is usually some simple
>paralelle standard, can be hooked right up to the PIC's IO lines.  It can
>all be done with one 8-bit port.


With all this LCD talk, I haven't seen mention of mounting. What I really
need is a LCD with keypad that mounts to a NEMA 4 box for an outdoor
application (i.e. exposed to the elements).

Has anyone used a premanufactured display with keypad that's waterproof and
interfaced to a PIC? Of course, I want an inexpensive solution. There are
plenty of PLC interfaces for around $600-800, they are overkill.

Any ideas?
craig

1996\09\05@122908 by Philip Lalone

flavicon
face
On Thu, 5 Sep 1996, Jerry Heim wrote:

> I am interested in connecting a PIC to a small display.  It appears that the
> most code available for driving LCD modules use Hitachi display drivers (see
> Microchip AN587 for example).  What is a good source for these Hitachi
> displays?  Do the Optrex modules in the Digikey catalog use the Hitachi
> display driver?

       Lots of the Optrex LCD modules do use the Hitachi HD44780, they
support both 4-bit and 8-bit parallel data transfers.  I'd suggest getting
the Optrex databook and a 20x4 (DMC-20481) LCD module to mess around with.

                                       Philip Lalone
                                       Alpha-X Development

1996\09\05@182527 by Thomas Coonan

flavicon
face
Just in case folks are interested.. I did a PIC/LCD project awhile back.
I offer the code on my page.  I have left over boards and parts that I
offer (for a small fee to cover cost of parts and the board).  My page
covers this.

http://www.mindspring.com/~tcoonan

&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*
On Thu, 5 Sep 1996, Jerry Heim wrote:

> I am interested in connecting a PIC to a small display.  It appears that the
> most code available for driving LCD modules use Hitachi display drivers (see
> Microchip AN587 for example).  What is a good source for these Hitachi
> displays?  Do the Optrex modules in the Digikey catalog use the Hitachi
> display driver?

       Lots of the Optrex LCD modules do use the Hitachi HD44780, they
support both 4-bit and 8-bit parallel data transfers.  I'd suggest getting
the Optrex databook and a 20x4 (DMC-20481) LCD module to mess around with.

                                       Philip Lalone
                                       Alpha-X Development

1996\09\11@214338 by Todd Peterson

picon face
At 11:21 PM 9/4/96 -0400, you wrote:
>I've been trying to convince NASA here to use PICs, and it looks like I've got
>my chance.  We need a very low power drain system that basically runs several
>very long duration count down timers and can display three lines of data.  I
>seem to remember a discussion of LCD's not too long ago.  Does anyone have
>a PIC board with an attached LCD?  Three lines of 12 characters would do it.
>
>Can anyone pass along information on the power draw of any LCD displays?
>Any pointers to web sites?


Swing by my company's web site at http://www.netins.net/showcase/elab

We've got a PIC-based board with a direct 14 pin connection to most popular
LCD modules.  Supplied driver routine takes care of the details...


Todd Peterson, Computer Engineer   (spamtpetersonKILLspamspamKILLspamnetins.net)
E-LAB Digital Engineering, Inc.

1932 Hwy. 20
P.O. Box 246
Lawton, IA 51030-0246
(712) 944-5344

Visit us at: http://www.netins.net/showcase/elab

'LCD Screen and Driver IC'
1996\09\15@011044 by Ben L Wirz

flavicon
face
Hello Everyone,

       I need help finding a LCD screen and controller IC.  The screens needs
to be at least 4 " x 8".  As this may go in a comerical product, I am
looking for pointers to manufactures and suppliers not surplus stuff.
The screen will interface with a PIC which will have I/O lines open so a
parallel or serial interface to the controller IC is fine.  The
controller IC only needs to produce text, graphics aren't needed.

       I would very much appreciate any pointers you can give me, even
pointers to LCD manufactures and not specific products would be fine.

Ben,

Ben Wirz                For Great Deals on Nitinol Wire, H-Bridge IC's,
Wirz Electronics        Polaroid Sonar Units, PIC 16C84's, and more
spamblw2spam_OUTspamcec.wustl.edu      Hobbyist Robotic & Electronic Supplies, visit:
                       http://cec.wustl.edu/~blw2/index.html

1996\09\15@024341 by andreabelian

picon face
HELLO  EVERYONE:

I  have  extra picstart B1 without  power supply  I  would like to
trade  with  pic cookbook or books for beginners. Please  offer.



                                 Thank  you.




 e mail   STOPspamandreabelianspam_OUTspamspamBeGoneearthlink.net

'LCD displays'
1996\09\18@213006 by TONY NIXON 54964

flavicon
picon face
I don't know if you have access to a Farnell catalog, but they
advertise LCD graphic displays with micro interface.

These are from Hitachi and from Varitronix. They appear to have an 8
bit interface to them.

Regards

Tony

1996\09\18@213006 by TONY NIXON 54964

flavicon
picon face
I don't know if you have access to a Farnell catalog, but they
advertise LCD graphic displays with micro interface.

These are from Hitachi and from Varitronix. They appear to have an 8
bit interface to them.

Regards

Tony

'PIC/LCD'
1996\09\19@190214 by id John Philip Bodger

flavicon
face
Hi Wynn, you wrote:-
>I've been trying to convince NASA here to use PICs, and it looks like I've got
>my chance.  We need a very low power drain system that basically runs several
>very long duration count down timers and can display three lines of data.  I
>seem to remember a discussion of LCD's not too long ago.  Does anyone have
>a PIC board with an attached LCD?  Three lines of 12 characters would do it.
>
>Can anyone pass along information on the power draw of any LCD displays?
>(Monochrome, 3 lines of 16 characters)  I'm trying to keep total current
>drain under 10 ma, figuring no more than 4 ma for the PIC.  How big of an
>LCD display could we power?  Any pointers to web sites?
>
>TIA,
>
>Wynn Rostek

Well I don't know about the LCD display, but if you want real world figures
for the cpu, I have a PIC16C84 based board running at 1.8432MHz and the PIC
draws 0.6mA.   If all you want to do is run long timers then choose a low
clock speed and you can get the power consumption REAL low.  Remember most
LCD displays work pretty slow anyway, so you don't need a fast PIC unless
you are trying to do other things at the same time.  Remember that even with
low clock speeds and crystal control you may need to include some trimmer
circuitry and do some individual unit calibration if you want long-term
accuracy (like a swiss watch).
Use ultra high efficiency leds for backlighting the LCD display (if
necessary) and you can get away with a few mA for that.
Remember to use a low quiescent current voltage regulator or all of your
careful design work could be wasted (3mA drain if you use a 78L05ACZ).
Try something like a LM2936Z-5 but make sure you fit a decent brown-out
circuit to MCLR.

All the best.

Dave.

1996\09\20@123943 by Todd Peterson

picon face
At 11:59 PM 9/19/96 +0100, you wrote:
>Hi Wynn, you wrote:-
>>I've been trying to convince NASA here to use PICs, and it looks like I've got
>>my chance.  We need a very low power drain system that basically runs several
>>very long duration count down timers and can display three lines of data.  I
>>seem to remember a discussion of LCD's not too long ago.  Does anyone have
>>a PIC board with an attached LCD?  Three lines of 12 characters would do it.
>>
>>Can anyone pass along information on the power draw of any LCD displays?
>>(Monochrome, 3 lines of 16 characters)  I'm trying to keep total current
>>drain under 10 ma, figuring no more than 4 ma for the PIC.  How big of an
>>LCD display could we power?  Any pointers to web sites?

Stop by our web site and take a look at our Microcontroller Board - it might
be just what you are after.  It has a direct-connect LCD port, completely
under command of driver routines included with the board.

http://www.netins.net/showcase/elab

Let me know if you'd like to receive an information packet via postal service.

Thanks,

Todd Peterson
E-LAB Digital Engineering, Inc.

(712) 944-5344


'display's lcd'
1996\10\17@191440 by Tony Matthews
flavicon
face
hello
I need a single line of 16 to 20 characters alphanumeric for my
display.The device is line powered so..cost and size and ability of my
pic to handle are the prime criteria,I have'nt decided which pic to use
for sure the device will need 5 I/O's plus the display any suggestions
Thanks in advance
       spam_OUTtonyspamspamBeGonemailhost.magicnet.net

1996\10\19@141859 by Zhahai Stewart

flavicon
face
> I have'nt decided which pic to use for sure
> the device will need 5 I/O's plus the display any
> suggestions

Pretty much any PIC (oh, except the 8 pin) should be able to handle 5
I/O lines plus a smart alphanumeric display.

These LCDs require a minimum of 6 pins, if you use them in 4 bit mode
and use timing rather than BUSY feedback to control your output
speeds.  That's 4 data, one chip select, and an address (for
control/data.  If you want to use the BUSY flag, you need one more
for read/write (and you must switch directions of the data pins on
the PIC side, to input rather than output, when you want to read the
status).  With at least 13 I/O's this should be very possible along
with your 5 other I/Os.  (You can also use 8 bit mode for more speed if
that matters, requiring 10/11 pins depending on whether you want BUSY
feedback).
   Zhahai

@ Zhahai Stewart       EraseMEzhahaispamKILLspamhisys.com
@ A Meme Gardener      http://rainbow.rmii.com/~hisys/zhahai.html
@ Standard Disclaimer  YMMV - Your Maya May Vary

'LCD Displays: the cheapest??'
1996\10\23@203915 by james

flavicon
face
We have a project the requires the cheapest LCD display- probably glass
and driver.
Anyone know the cheapest way to get 6, 8, or more alphanumeric
characters with backlighting?

--
James Musselman
President
Radix/Cobalt Instruments, Inc.
PO Box 897
Clovis, CA 93612 USA
tel 209-297-9000     fax 209-297-9400
see my home page:  http://rdx.com

'Looking for a NEMA4 Alpha LCD Display'
1996\10\31@120431 by Mark Jurras

flavicon
face
A while back someone inquired about the availability of NEMA4 LCD displays.
I would like to add an alpha/numeric display to an outdoor system, using a
PIC, and need display that will keep the weather out of the box. The unit
cannot be mounted in a protective enclosure.

Has anyone found such a display or a solution using a regular display?

- -Mark Jurras

1996\10\31@125436 by Wireless Scientific

flavicon
face
At 11:14 AM 10/31/96, Mark Jurras wrote:
>A while back someone inquired about the availability of NEMA4 LCD displays.
>I would like to add an alpha/numeric display to an outdoor system, using a
>PIC, and need display that will keep the weather out of the box. The unit
>cannot be mounted in a protective enclosure.
>
>Has anyone found such a display or a solution using a regular display?
>
>- -Mark Jurras

Two Technologies
215 441 5305

They got NEMA4 LCD, keypad with high temp.

craig




________________________________________________________
Dr. Craig Hollabaugh
Wireless Scientific, Inc.
1890 South 14th Street
Building 100, Suite 105
Amelia Island, FL 32034
904 261 6977
904 261 2129 fax
EraseMEwsciRemoveMEspamnet-magic.net

Or you might know me as
Dr. Craig Hollabaugh
Analog Microelectronics, Georgia Institute of Technology
.....hollaspamspam_OUTmonique.adgrp.gatech.edu

or

Dr. Craig Hollabaugh
Aerospace Department, University of Texas, Austin
@spam@hollaEraseMEspamspamcfdlab.ae.utexas.edu


'LCD biasing'
1996\11\07@210951 by John Payson
picon face
Most of the multiplex LCD driver chips I've seen include a biasing network
to produce 1/3, 2/3, and full bias which are then used to drive the display;
the PIC 16C924 seems typical in that regard.

On a 3-way multiplexed display, blank pixels receive 1/3 voltage all the
time while dark pixels receive 1/3 voltage 2/3 of the time and full voltage
the other 1/3.

Is there any reason why this is done rather than using creative timing and
standard CMOS outputs?  Using a couple 74HC595s and some clever programming,
I have driven a 4.5 digit display (multiplexed 3x12) and found the contrast
to be quite good: excluding the time all pixels are off (PWM'ing for soft-
ware control of contrast), dark pixels are on 3/4 of the time while blank
pixels are on 1/4 of the time.

Note that on a 5:1 multiplex, the best timing will dark pixels on just over
2/3 of the time (and light pixels just under 1/3).  A 7:1 multiplex allows
dark pixels just under 2/3 and light pixels just over 1/3.  Note that the
programming for higher multiplexes gets increasingly complex; 3:1 is not too
hard, but 5:1 would be a pain and 7:1 would be a monster.  Don't even think
about 9:1 or 11:1.....

1996\11\12@133318 by Piotr Piatek

flavicon
face
John Payson <supercatTakeThisOuTspamKILLspamMCS.NET> wrote:

> Most of the multiplex LCD driver chips I've seen include a biasing
network
> to produce 1/3, 2/3, and full bias which are then used to drive the
display;
> the PIC 16C924 seems typical in that regard.
>
> On a 3-way multiplexed display, blank pixels receive 1/3 voltage all the
> time while dark pixels receive 1/3 voltage 2/3 of the time and full
voltage
> the other 1/3.
>
> Is there any reason why this is done rather than using creative timing
and
> standard CMOS outputs?  Using a couple 74HC595s and some clever
programming,
> I have driven a 4.5 digit display (multiplexed 3x12) and found the
contrast
> to be quite good: excluding the time all pixels are off (PWM'ing for
soft-
> ware control of contrast), dark pixels are on 3/4 of the time while blank
> pixels are on 1/4 of the time.
>

I can confirm that this method works.  My test program drives the
backplanes of a multiplexed LCD display with following bit patterns:

backplane 1: 0000
backplane 2: 0011
backplane 3: 0101

The corresponding segment patterns for each dark/blank pixel
combination are:

0001, 0010, 0100, 1000, 0111, 1011, 1101, 1110

After each cycle all patterns are reversed to keep the DC bias
low.  The dark/blank RMS voltage ratio is much better than with
conventional method - 3:1 instead of 1.91:1 .

I don't know why Jonh's idea isn't commonly used.  Maybe he is
the first who invented this method ?

- Piotr

Piotr Piatek    RemoveMEpisielekTakeThisOuTspaminet.com.pl

'Connecting LCD-display'
1996\11\15@053503 by Henk Renting

flavicon
face
Dear readers,

I am using a PIC16C622 in an optical-electrical (EO-)converter. To display
the value measured I use a Hitachi LM020XMBL, controlled by a HD44780
LCD-contoller. I want to transfer the data in a four-bit configuration at
the high nibble of port B of the pic.

There's an example of how to do this in the Microchip Embedded Control
Handbook, but to my opinion it should be much easier to do. I only have to
send ASCII-signs to the display (numbers 0 to 9 and the %-sign). On the
internet I can't find anything to my satisfaction too. Perhaps anyone else
has already interfaced this LCD-module to a PIC16C622. Please let me know

Thanks in advance,

Henk Renting
e-mail: @spam@h.h.rentingSTOPspamspamel.utwente.nl

'16c84 lcd interface'
1996\11\15@182252 by Tony Matthews

flavicon
face
hi
Should I use port b 1-7 with 4-7 for data and if not why,I need a four
bit interface and will want read/write capability I've read all the
FAQ's and am less sure than ever.  Tony M.

1996\11\15@193115 by Bob Blick

picon face
Tony writes:
>hi
> Should I use port b 1-7 with 4-7 for data and if not why,I need a four
>bit interface and will want read/write capability I've read all the
>FAQ's and am less sure than ever.  Tony M.
>

Yes, that's how you should do it. However, unless you need to read the ram
in the display, the R/W pin is just a waste of pin. The lcd speed is
predictable, with clear/home being one of the slowest commands, so you can
use a timing loop to make sure you don't write to the lcd when it's still busy.

Cheers, Bob

'Hitachi LM575 LCD display'
1996\11\18@091558 by Nitschke,Gene M

flavicon
face
Anyone have specs or a web site (for specs) on a Hitachi LM575 LCD
display?  I had the specs but they were misplaced in the last spring
cleanup at home!

Thanks in advance
Gene

'Searching for source of LED backlight 40x2 LCD mod'
1996\11\19@043852 by NEIL GANDLER

flavicon
face
I am searching for a distributor of led backlight LCD modules 40x2.
Distributors with a good selection. The 40x2 modules from Digi-key
have crazy viewing angles. I just learned the $50 hard way. I
prefer sources that have reasonable prices in small quantities (~$50)
What would also be helpfull is an LCD module with seperate LED
connections. The above mentioned module has its LED GND connected
to system ground. I would like to use my low side driver (DS75452)
to control brightness, through my PIC PWM output. I would appreciate
any help.

       Neil Gandler

'Digikey's selection of Optrex LCD Modules (Crazy v'
1996\11\19@044440 by NEIL GANDLER

flavicon
face
I recently bought an Optrex LCD 40x2 yellow backlight module from
Digi-Key. Surprisingly when I finally connected it, the viewing angle
was was weird. From the data book, the module I bought had a so
called "6'oclock" viewing angle. Which means the best viewing angle
would be if you place the module in the center of a giant clock face,
pointing to the sky
and you stood on the 6, looking in front of you at the module, with your
head aligned with the surface of the module. (hope you got that)
After re-checking Digi-key's selection, they had no 40x2 displays
with a 12'oclock viewing angle, which I would think by my logic, be
the most popular.
Who would have a use for such a crazy viewing angle of 6'oclock?
Am I missing something here. In most applications, one views an LCD
from head on. Looking at my display head on, shows a very low contrast
read-out. Playing with the contrast voltage doesn't improve things much.
I would appreciate some advice, especially a distributor of
backlit LCD modules with a wider selection as well as low prices in
small quantity (~$50 for a 40x2 led backlit). Thanks

       Neil Gandler

PS> What would also be helpfull is an LCD module with seperate LED
connections. The above mentioned module has its LED GND connected
to system ground. I would like to use my low side driver (DS75452)
to control brightness, through my PIC PWM output.

'More info: Hitachi LM575 LCD Display'
1996\11\20@031412 by Nitschke,Gene M

flavicon
face
I have several Hitachi LM575 LCD displays but no specs!  Does any one
have specs or a WEB site where I could retrieve same?  These appear to
be 2 line by 16 characters?

Details:
Part number on front 123S00252.  Part number on back LM575.
Two chips on back HD44100H and HD44780A46.
14 Pin connector on back.

Thanks in advance.
Gene Nitschke
Email: TakeThisOuTGene_NitschkeTakeThisOuTspamRemoveMEwb.xerox.com
Landline: (716) 422-5329

'Digikey's selection of Optrex LCD Modules (Crazy v'
1996\11\20@212808 by Robert Lunn

flavicon
face
> Who would have a use for such a crazy viewing angle of 6'oclock?

       Sitting here at my desk, I have a telephone with an LCD.
       I'm looking at this LCD from 6 o'clock.

       Lying next to me is my mobile.  I'm looking at it's LCD
       from 6 o'clock.

       Lying on the desk in front of me is a calculator.  I'm
       looking at it's LCD from 6 o'clock.

       Get the picture?

___Bob

'Searching for source of LED backlight 40x2 LCD mod'
1996\11\21@211935 by Kalle Pihlajasaari

flavicon
face
Hi Neil,

>  I am searching for a distributor of led backlight LCD modules 40x2.
> Distributors with a good selection. The 40x2 modules from Digi-key
> have crazy viewing angles. I just learned the $50 hard way. I
> prefer sources that have reasonable prices in small quantities (~$50)
>  What would also be helpfull is an LCD module with seperate LED
> connections. The above mentioned module has its LED GND connected
> to system ground. I would like to use my low side driver (DS75452)
> to control brightness, through my PIC PWM output. I would appreciate
> any help.

A few weeks ago I was quoted a onesies price of US$235 for a 40 x 2 LCD with
a transflective setup (works with the Backlight off) from the local chapter
of AVNET a very large component house.  The local chapter is called AVNET Kopp
but only because it merged with Kopp last year.

I don't know of details for any other countries but can make call to find out
if you send me e-mail.

Cheers
--
Kalle Pihlajasaari     spam_OUTkallespamspam.....ip.co.za
Interface Products     P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750     Fax: 402-7751

'More info: Hitachi LM575 LCD Display -Reply'
1996\11\22@051316 by ang (Chee Foon Tiang)

flavicon
face
>I have several Hitachi LM575 LCD displays but no specs!
>Does any one have specs or a WEB site where I could retrieve
>same?  These appear to be 2 line by 16 characters?

>Details:
>Part number on front 123S00252.  Part number on back LM575.
>Two chips on back HD44100H and HD44780A46.
>14 Pin connector on back.

>Thanks in advance.
>Gene Nitschke
>Email: Gene_Nitschke.....spam@spam@wb.xerox.com
>Landline: (716) 422-5329

Basically you just need the specs for the HD44780U,
the A46 following the HD44780 denotes the ROM character
patterns.

As far as I know, there is no web site for the specs.
Therefore you need to get the "Hitachi LCD Controller/Driver
LSI" databook from your local representative.

Assuming you are in the States:

Hitachi America Ltd
Semiconductor & IC Division
2000 Sierra Point Parkway
Brisbane, CA 94005-1835
tel: 415-589-8300
fax: 415-583-4207

If you are able to give me your location, I can
give you the regional address.

By the way, the address above are valid for 1995.

Rgds,

Peter Tiang
Design Engineer
spamBeGonetiangcfoonspamspam_OUThitachi.com.my

'Digikey's selection of Optrex LCD Modules (Crazy v'
1996\11\22@090907 by Odriozola Belden

flavicon
face
I guess 6 'oclock would be great for overhead displays and flat panels like
some audio mixers.

Rogerio

At 04:34 AM 19/11/96 -0500, you wrote:
{Quote hidden}

'NOT crazy viewing angles for LCD's,'
1996\11\22@131647 by David Schmidt

flavicon
face
6 o'clock and 12 o'clock just means that the contrast is enhanced for
off axis viewing from that direction!!!!!!!

non-supertwist LCD displays don't have a very wide viewing angle.  You
can buy displays optimized for the angle of viewing that you are going
to use.

If you will always view your display head on, use 6 or 12 o'clock.

If you will always be looking at your display from a slightly lower
viewing position (like your wristwatch) then you want the 6 o'clock
viewing angle.

If you will always be looking at your display from a slightly higher
viewing position (like a clock facing you on your desktop, then you
want the 12 o'clock viewing angle.

Just imagine if your VCR had a 6 o'clock viewing angle LCD.  You would
have to look at it head on or bend your head so it was below the display
to see it clearly.  With the 12 o'clock display you can still read it
standing up away from it.

Does this clear things up?
Dave

'More info: Hitachi LM575 LCD Display'
1996\11\22@161823 by Brooke

flavicon
face
Nitschke,Gene M wrote:
>
> I have several Hitachi LM575 LCD displays but no specs!  Does any one
>  have specs or a WEB site where I could retrieve same?....
> Two chips on back HD44100H and HD44780A46.

Gene:

The 44780 is a VERY common LCD controler chip.  The 44100 are segment
drivers.
See the ECH (or download AN587 from Microchip's web site).  Following
are some
bookmarks relating to LCDs:

http://hobbes.king.ac.uk/matt/pic/lcd.html
www.paranoia.com/~filipg/HTML/LINK/F_LCD_menu.html
www.iaehv.nl/users/pouweha/lcd2.htm#PIC_example
http://www.skypoint.com/~jeffs39/
http://www.cs.colostate.edu/~hirsch/LCD.html
www.epson.co.jp/epson/english/device/lineup/asspe.htm
http://www.eio.com/public/lcd/

Have Fun,
Brooke


'Digikey's selection of Optrex LCD Modules (Crazy v'
1996\12\01@075652 by hoss karoly
flavicon
face
Robert Lunn wrote:
>
> > Who would have a use for such a crazy viewing angle of 6'oclock?
>
>         Sitting here at my desk, I have a telephone with an LCD.
>         I'm looking at this LCD from 6 o'clock.
>
>         Lying next to me is my mobile.  I'm looking at it's LCD
>         from 6 o'clock.
>
>         Lying on the desk in front of me is a calculator.  I'm
>         looking at it's LCD from 6 o'clock.
>
>         Get the picture?
>
> ___Bob
and the multimeter,clock,notebook
BUT the philips lcd I got from the loc distributor
is a 12 o'clock one so I don't know how to build it in my 6 o'clock
type dashboard :(
the only thing is good in 12 o'clock version is ...guess

bye
charley

'yet another LCD question'
1996\12\01@212322 by Henry Carl Ott

picon face
Hi folks,
Quick question (maybe).
I'm trying to drop in a surplus replacement LCD display (1x16 hd44780
controller) into an existing PIC project, and I'm having a problem.
The original display (a densitron lm2015) works fine, but the new display
(noname, but suposedly supertwist) only displays the first 8 characters.
They both have a hd44780 controller, but I notice that the densitron also
has an additional OKI row driver.
Will the hd44780 drive 16 character without an additional row driver? Or
did I some how wind up with some crippled 8 character displays (never heard
of it before). I'm guessing it might have something to do with the duty
cycle, but I don't want to touch the working source code and have burn new
chips.
I can't find any references to this problem in any of the numerous online
LCD FAQs.

Thanks in Advance.


PS&FWIW the new displays seem to have a six o'clock viewing angle :-)

carl

----------------------------------------------------------------
Henry Carl Ott   N2RVQ   | talk/chat  carlott@204.74.7.186
EraseMEcarlott.....spaminterport.net    | http://www.interport.net/~carlott/
----------------------------------------------------------------
"A day job...in an office? My worst nightmare!"-Ticknophobia

1996\12\01@215030 by David Schmidt

flavicon
face
Yes, it will drive all 16 characters fine but the 16 characters are not
in sequential order when you write to the display.  The first 8 characters
are in sequence, the last 8 are offset by 40 characters.  The Densitron
16x1 line display is organized as 16x1 line in memory.  The surplus LCD display
you now have is organized as a 8x2 line display with a 16x1 line 'glass'.

 After you send your first 8 characters, send the display a C0h instruction
(not a character!), this will position the cursor at the 9th position for
writing.  After you display your next 8 characters, or anytime you want to
return to the first character, send the home command.

Surplus LCD displays are a great value, but this memory organization is
something to watch out for!  Also look out for extended temperature displays
- you cannot see the characters without driving the contrast pin negative.
Also, if the display is not supertwist, be careful of the viewing angle.

Dave


At 09:19 PM 12/1/96 -0500, you wrote:
{Quote hidden}

---------------------------------------------------------------------------
( DSchmidt Technologies, Ventura CA         http://www.rain.org/~dschmidt )
( Freq selectors for FME/FMX/FM25, DTMF decoders. Email dschmidtspamspamTakeThisOuTrain.org )
---------------------------------------------------------------------------

1996\12\01@225341 by Jacob Blichfeldt

flavicon
face
Hi

On 1*16 displays using only one HD44780 (no additional 44100), multiplexed
at 1:16, the DD RAM address for the last 8 characters begins at 40h. It is
because the HD44780 sets up the display as 2 lines (2*8), when using 1:16
multiplexing.

You were right. It had something to do with the dutycycle (strange the FAQs
don't mention it?).
I guess you have to change the source code, to fix the problem :-(    The
LCD-modules with only one controller are the far most common.  If you write
to both adresses (9h and 40h), both types of displays will work.

-Jacob Blichfeldt


> Hi folks,
> Quick question (maybe).
> I'm trying to drop in a surplus replacement LCD display (1x16 hd44780
>controller) into an existing PIC project, and I'm having a problem.
> The original display (a densitron lm2015) works fine, but the new display
>(noname, but suposedly supertwist) only displays the first 8 characters.
>They both have a hd44780 controller, but I notice that the densitron also
>has an additional OKI row driver.
> Will the hd44780 drive 16 character without an additional row driver? Or
>did I some how wind up with some crippled 8 character displays (never
heard
{Quote hidden}

Attachment converted: wonderlandfive:WINMAIL.DAT (????/----) (000075F3)

'OPTREX LCD display'
1996\12\02@054004 by Peter Grey

picon face
Can anyone help.

I have standardised on a LCD from Optrex for a PIC based meter and now find
that the stock is on long delivery times from my Australian supplier, but I
need to get them in the next few weeks. The model number is DMC16128 with no
backlighting.

Any help is appreciated.

TIA,
Peter Grey
Neosystems
Australia

'yet another LCD question'
1996\12\02@120010 by Henry Carl Ott

picon face
To recap the problem,

I was trying to drop in a surplus replacement LCD display (1x16 hd44780
controller) into an existing PIC project, and it did'nt work.
The original display (a densitron lm2015) works fine, but the new display
(noname, but suposedly supertwist) only displays the first 8 characters.
They both have a hd44780 controller, but I notice that the densitron also
has an additional OKI row driver.
-------------------------------------------------------------------------

And the answer is... that surplus 1x16 displays with just a single hd44780
are memory organized as 2x8 displays. There are various ways of dealing with
this in the code. This is no problem, it was just a question of bothering to
make the changes to the source code of the original debugged (ha!) project
or just saving the displays for a new design.

My thanks go to David, Jacob, and Mike (who actually sent the answer to my
pager via my web page interface) for the timely response.


carl

----------------------------------------------------------------
Henry Carl Ott   N2RVQ   | talk/chat  carlott@204.74.7.186
TakeThisOuTcarlott@spam@spam@spam@interport.net    | http://www.interport.net/~carlott/
----------------------------------------------------------------
"A day job...in an office? My worst nightmare!"-Ticknophobia

'dual RS232, 40 kB ram, LCD display - I need help.'
1996\12\04@091449 by Ralf Sigmund

flavicon
face
Hello
I am about to start my first Pic Project. It is a small device that
should

 (1) accept digital data (numbers & strings) from a Measurement device
via RS 232 at  any time.

 (2A) store the Information in memory (approx. 20 Kilobytes of data)
 (2B) display the latest aquired data on a LCD display

 (3) send all data to a PC via a second RS 232

After reading some FAQs there remain still some questions:

What kind of Memory should I use (lithium battery backed up static ram,
EEPROM, Flash...)?
How do I wire the memory to a PIC? Any Circuits ?

How do I wire two RS 232 ports ( one with Hardware Handshake )? Do I need
a UART or is just a simple MAX 232 signal converter enough?
Where can I get Sourcecode for serial communications?

Should I try to program the PIC in assembler code or in a high level
language like C? My budget is very limited, as I am a student. I would
like to get a cheap development environment with lots of information on
using it, writing pic assembler code etc..

Does anyone know of information on similar project?

How can I get documentation on PICs from Germany. Do you know any
suppliers which ship to Europe, Germany?


Thank you for any hints.

Again thanks and Bye
  Ralf

'"dual RS232, 40 kB ram, LCD display" = concurrency'
1996\12\04@122205 by Dan R. Nelson

flavicon
face
Ralf,

At 15:12 04/12/96 +0100, you wrote:
{Quote hidden}

Ralf,

Many have been trying to squeese a lot out of the PIC. On the surface your
needs point to concurrent operation. I feel that if you truely need
concurrency than
your foundation routine/software should focus on concurrency with application
routines that can 'put and get' data to the concurrent routines.

A few general questions?

Q: Are the two RS232 ports simplex (one way) or do they require two way
handshaking.

Q: What are the baud rates required from the equpiment and to the PC?

Q: Is the purpose of the 20 kilobytes of data memory used to synchronise and/or
for storing the equipment data and then when complete sending it to the PC?

The two simplex ports with no keypad or manual user interface implies that
is the case. Or does the input from the non-pc equipment stimulate the
forwarding/processing of the 20 kbytes stored?

Q: How much data is to be displayed on the LCD. Will it be alphameric or simply
numeric data?

Q: Can it be assumed the LCD is smart and is interfaced via a serial link
(I2C, 8-N-1 serial async comms, other?)

Whether  you use a C compiler or should focus on assembler language will
depend on how much concurrency is required to handle the application. C
would be desireable but you real-time applications of concurrent nature tend
to be better suited for a lower level language with tighter control,
especially if program
memory becomes an issue. A hybrid concurrency routine written in assembler could
provide a foundation for C-level development.

What you are looking for above is quite achievable using a low end PIC
(assuming you have the I/O ports you need).The project you are taking on (as
you outlined above) involves muliple interfaces and I/O support. All
interfaces will undoubted be serial so put a  focus on a generic serialising
scheme (input and output) and tailor it to the specific serial interfaces
you need. If you are handling more than two serial ports (or a full duplex
port) don't rely on edge triggered interrupts if the aggregate thruput of
all serial comms approach 9600 baud. Yes you guessed it RTCC and port
sampling permits adding concurrency without using interrupts...

---True Concurrency is real and has been demonstated with a PIC---
Microlink Systems Ltd (in) has done much work inapplications requiring
concurrent operations, all written in assembler. Unfortunately the software
used is proprietary (not free or shareware).

The generic concurrent operating system  is pseudo multi-tasking and relies
on "finite state machine" methodology. It is designed for use with a  a
single 16C84  or a non-interrupt 16C5x  PIC. With a single PIC 16c84 at
10Mhz concurrent 4800 baud 8-bit manchester coded radio comms works
concurrently with 9600 baud n-8-1 (10 bit) NRZ (aka ASCII code) comms),
using both CDMA (contention) and/or polled communication diciplines. Up to
three serial half duplex channels can be handled witha pic 16c84 as long as
the aggregate data rate (all combined) does not exceed about 14,400 bps (and
a 20mhz PIC is used).

Microlink are toying with commercialising the concurrent operationg system
to function as a development plateform for all times of realtime
applications requiring low cost, little real-estate, and concurrency.
--------------------------------------------------------------------------------

The only confidence I can add is 'true concurrency' has been achieved and that
as a student it is a challenge for you to pursue it, but with a focus on what is
required in terms of concurrency...

Later...

Dan

'dual RS232, 40 kB ram, LCD ...'
1996\12\04@130736 by Thomas Vegeby

flavicon
face
>I am about to start my first Pic Project. It is a small device that
>should
>
>  (1) accept digital data (numbers & strings) from a Measurement device
>via RS 232 at  any time.
>  (2A) store the Information in memory (approx. 20 Kilobytes of data)
>  (2B) display the latest aquired data on a LCD display
>  (3) send all data to a PC via a second RS 232

PICs are great little controllers, but I would not use them here.
The main reason is the lack of two hardware UARTs and the limited capability
of handling large amounts of RAM or EEPROM.  If you choose serial EEPROM
you get an expensive solution, if you choose parallell RAM the interface
is a bit complicated (PICs from the 16C-family).

I assume your "Measurement device" delivers data without any particular
protocol or flow control.  For the transfer to PC you need a safe protocol,
which is up to you to design,  and this takes quite an amount of code in the
microcontroller.

Choose Dallas 87C520 microcontroller.  This one has good power management
capabilities and two internal UARTs. It has 16 kByte EPROM which ought to
be more than enough for your application.  You can easily attach parallell
RAM of desired size, 32-128 kByte.  Or you can use flash memory,
e.g. AMD Am29F010 (131,072 x 8-Bit, CMOS 5.0 Volt-only, Sector Erase), for
power safe storage.

The main snag might be that the are no really cheap programmers for this
processor.

Best regards
Thomas

'dual RS232, 40 kB ram, LCD display - I need help.'
1996\12\04@133022 by Brooke

flavicon
face
Ralf Sigmund wrote:
>
> Hello
> I am about to start my first Pic Project. It is a small device that
> should
>
>   (1) accept digital data (numbers & strings) from a Measurement device
> via RS 232 at  any time.
>
>   (2A) store the Information in memory (approx. 20 Kilobytes of data)
>   (2B) display the latest aquired data on a LCD display
>
>   (3) send all data to a PC via a second RS 232
.......
Ralf:

How about allowing the data to go directly to the PC.
Use a PIC to listen-in to the data and convert it to
ASCII and send to the LCD.  This can easily be done
using a 16F84.

Have Fun,
Brooke

1996\12\04@135058 by Shawn Ellis

flavicon
face
>How about allowing the data to go directly to the PC.
>Use a PIC to listen-in to the data and convert it to
>ASCII and send to the LCD.  This can easily be done
>using a 16F84.
>
>Have Fun,
>Brooke
>
Yeah, and the PC's rs232 buffer could be made to be quite large if you are
using something like Visual Basic in Windows 95...
Allowing you to record the data without the PC's attention...

'Found direct, inexpensive source for LCD Modules'
1996\12\05@135617 by NEIL GANDLER

flavicon
face
Everyone this is not an advertizement or spam. This artcile is for
people who are interested in finding a great, inexpensive source
of LCD modules direct from the manufacturer at great prices. I
have been searching wide the past few months for 40x2 led backlit STN
displays at 12'ocklock viewing angle. I bought an optrex from Digikey
for over $50 which had a 6'ocload angle. Finally I stumble on a
company called OKAYA, at WWW.OKAYA.COM. They have their datasheets
on-line. I called them today. A woman named Stephanie, was very helpfull
and said it would be no problem purchasing this type of LCD in single
quantiies. The best part is the price, only $34.02 !!!. They have yellow,
green,amber,orange,red backlight types, wtn,stn,tn types.They have
a $25 miniimium order, but only take COD, or some other type of company
credit, that I didn't ask about. Either way, I know many of you have
had similar frustrations for LCD sources, give this company a try.
I hope I have provided some help to many of you.

Okaya LCD
219-477-4488


Neil Gandler
University at Buffalo

1996\12\05@140903 by David Schmidt

flavicon
face
I too can vouch for this company.  I've been buying 16x1 line lcd displays
at the viewing angle I want (big deal right?) with a 14 pin dual inline header
on the left side (that's the kicker, you can't buy that connector style easily),
brand new for $10.98 each.

Only problem is the 8-12 week lead time from Japan.

Dave

At 01:44 PM 12/5/96 -0500, you wrote:
>Everyone this is not an advertizement or spam. This artcile is for
>people who are interested in finding a great, inexpensive source
>of LCD modules direct from the manufacturer at great prices. I
>company called OKAYA, at WWW.OKAYA.COM. They have their datasheets
>on-line. I called them today. A woman named Stephanie, was very helpfull
>Okaya LCD
>219-477-4488
---------------------------------------------------------------------------
( DSchmidt Technologies, Ventura CA         http://www.rain.org/~dschmidt )
( Freq selectors for FME/FMX/FM25, DTMF decoders. Email TakeThisOuTdschmidtspamspamrain.org )
---------------------------------------------------------------------------

'safe port initialization 16c84. LCD speed'
1996\12\06@051154 by Kalle Pihlajasaari

flavicon
face
Hi Michael, Tony,

> > also is there a minimum clock speed for writing to an lcd module.
>
> yes, most lcd modules have a busy bit that can be read or a command
> execution time of 40us for most commands and upto 200us for clear
> display commands.

Tony was asking about a minimum write speed.  You have described the
maximum write speed limitations.

The LCD displays are essentially static in I/O operation and you can
write to it at any convenient speed as long as the rise times on the
signals are reasonable.

There are minimum pulse widths that also cannot be exceeded which
prevents direct connection to processor busses without wait states
as well as the command execution limits Michael mentioned.

Cheers
--
Kalle Pihlajasaari   KILLspamkalleKILLspamspamspamBeGoneip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

'lcd write times'
1996\12\06@055630 by Michael S. Hagberg

flavicon
face
just to clearify write times.

minimum times for signals are

Enable pulse width 450ns
Register select and read / write set up times 140ns
Data setup time 195ns

there is no maximum times for these signals.

but having programmed a few different lcd modules, i believe
the real question is how much time must pas between each byte
of data sent to the device.

the clear display command requires between 82us and 1.6ms

Return home 40us to 1.6ms

all other commands 40us

just a note about return home, i use the set CG ram address
to location zero, it only takes 40us.

michael

1996\12\06@062359 by Kalle Pihlajasaari

flavicon
face
Hi,

> Return home 40us to 1.6ms
>
> just a note about return home, i use the set CG ram address
> to location zero, it only takes 40us.

If the display has scrolled the two commands may behave differently.

Speculation but likely.

Cheers     *<<<-|
--
Kalle Pihlajasaari   spamBeGonekalleKILLspamspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

1996\12\06@104416 by myke predko

flavicon
face
>Hi,
>
>> Return home 40us to 1.6ms
>>
>> just a note about return home, i use the set CG ram address
>> to location zero, it only takes 40us.
>
>If the display has scrolled the two commands may behave differently.

Yes.  If you are going to do anything funky with an LCD (ie
scrolling/shifting the display), don't go by the 40usec/1.6msec
specifications - poll the Busy Flag (Bit 7 of the Instruction Port) of the
LCD.

I realize that this takes an extra pin (rather than just holding the R/W pin
at a constant value), and a bit of extra code (actually about the same
amount as a 160 usec dlay) but it will make sure everything works okay
without a *lot* of the messy debug that I went through before breaking down
and just putting it in when I was working with the LCDs.

Good luck,

myke

Today, the commercial sector is advancing computer and communication
technology at a breakneck pace.  In 1992, optical fiber was being installed
within the continental U.S. at rates approaching the speed of sound (if
computed as total miles of fiber divided by the number of seconds in the year).

Aviation Week and Space Technology, October 28, 1996

'OPTREX LCD display'
1996\12\06@122939 by Brian Lane

flavicon
face
On Mon, 2 Dec 1996 21:40:31 +1100, you wrote:

>Can anyone help.
>
>I have standardised on a LCD from Optrex for a PIC based meter and now find
>that the stock is on long delivery times from my Australian supplier, but I
>need to get them in the next few weeks. The model number is DMC16128 with no
>backlighting.

 Call timeline at 1-800-872-8878 and see if they have the model you
need. They sell surplus displays, but you can sometimes find a decent
quantity from them.

 Brian

---
 Nexus Computing        nexus@spam@spamKILLspameskimo.com        http://www.eskimo.com/~nexus

'lcd write times'
1996\12\06@191240 by Tony Matthews

flavicon
face
myke predko wrote:
{Quote hidden}

year).
>
> Aviation Week and Space Technology, October 28, 1996

'safe port initialization 16c84. LCD speed'
1996\12\06@191446 by Tony Matthews

flavicon
face
Kalle Pihlajasaari wrote:
>
> Hi Michael, Tony,
>
> > > also is there a minimum clock speed for writing to an lcd module.
> >
> > yes, most lcd modules have a busy bit that can be read or a command
> > execution time of 40us for most commands and upto 200us for clear
> > display commands.
>
> Tony was asking about a minimum write speed.  You have described the
> maximum write speed limitations.
>
> The LCD displays are essentially static in I/O operation and you can
> write to it at any convenient speed as long as the rise times on the
> signals are reasonable.
Thanks Kalle
You're correct I anticipate operating at a reduced clock speed for
several reasons and did not know if there were internal timing dohickeys
like the pic 84' uses to program it's own data eeprom "so I've read".

>
> There are minimum pulse widths that also cannot be exceeded which
> prevents direct connection to processor busses without wait states
> as well as the command execution limits Michael mentioned.
>
> Cheers
> --
> Kalle Pihlajasaari   EraseMEkalleRemoveMEspam@spam@ip.co.za   http://www.ip.co.za/ip
> Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
> + 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

'code or data for optrex lcd 8x2 on '84'
1996\12\07@192212 by Tony Matthews

flavicon
face
hi
The part is from digi key #73-1106-nd optrex #dm50448n and I need help
with alphanumeric code to connect it to a pic 16c84  with an rc slow
clock using rb1-7 it has two rows of 7 on one end.
       Thanks guy's Tony M.

'dual RS232, 40 kB ram, LCD display - I need help.'
1996\12\07@232030 by Alex I. Torres

flavicon
face
  Hi All PICers !

Wednesday December 04 1996 11:12,
RemoveMERalf.SigmundspamspamEraseMESTUD.UNI-HANNOVER.DE wrote in PICLIST:

RS> I am about to start my first Pic Project. It is a small
RS> device that should
RS>
RS>   (1) accept digital data (numbers & strings) from a
RS> Measurement device via RS 232 at  any time.

You only receive data from this device ?  (1)

RS>   (2A) store the Information in memory (approx. 20 Kilobytes
RS> of data)

 It is the most problem. If you use 16C74 you can put one port as
DATA (8 bit), other ports as ADDRESS (15 bit for 32 kB)
and -CS,-WR,-OE (3 bit) : 8+15+3=26 bit. C74 have 33 bit I/O.
What about using 3x 6264 (8kx8 cmos static ram) or other with
more memory space (62256) ?  (I have many 6264 :-)
13 bit for address, and 3 bit for chip selection.

RS>   (2B) display the latest aquired data on a LCD display

If you want to built low-cost device try to use any 4-digit LCD
display with Microchip's AY-0438 controller. It require onle 3
wire (PIC's I/O) for communicate.

RS>   (3) send all data to a PC via a second RS 232

Only send ?  (2)

RS> After reading some FAQs there remain still some questions:
RS>
RS> What kind of Memory should I use (lithium battery backed up
RS> static ram, EEPROM, Flash...)? How do I wire the memory to a
RS> PIC? Any Circuits ?
RS>
RS> How do I wire two RS 232 ports ( one with Hardware Handshake
RS> )?

If (1) and (2) is true the best way is 16C74 that have serial port.

RS> Do I need a UART or is just a simple MAX 232 signal
RS> converter enough?

It's depend for the RS232 speed. If you not use high speed the
simplest (and low cost) solution is :
         +5v --------------| e
                   |      /
from PIC's TxD      R2   |/
   --->----- R1----|----|\  c
                        | \---------------------->---  RS232 RxD
                           |
                           |
                           R3         |\ |
                           |----------| /|-------<--- RS232  TxD
                          _|_         |/ |   |
                          ---+C1             |  R1,R2,R3 2-10 kOhm
                           |                 |  C1 5-100 uFx16-20v
                          _|_                |
to PIC's RxD                                  |
----------------<------------------------------

I dont remember, mayby PIC's signals must be inverted.

Resume:
using 16C74 with 3x 6264 and AY-0438 :
 8data+13address+3xCS+OE+WE+2xRS232+3xAY =31 bit.
You have 2 I/O free for handshake.
---------------------------------------------------------------------
  Best Wishes, Alex Torres.
  Kharkov, Ukraine, exUSSR.
  E-Mail To : STOPspamaltor.....spamcook.kharkov.ua   via InterNet
              or 2:461/28             via FidoNet

--- GoldED 2.50.A0531+

1996\12\09@065353 by David Nicholls

flavicon
face
       Hi there,
               I'm interested in something similar ! I too am about to
start my first serious pic project and I intend to have serial i/o to pc,
16 digital inputs, 9 relay driver outputs an lcd display and up to 8k of
EEPROM (on serial i2c bus). I plan to use a pic16c74 with 9 outputs
dedicated to a uln2803 relay buffer. 8 pins multiplexed as one of 2 8bit
banks of digital inputs ( reading from an 8 bit tristate latch ) and also
drive 8 of the data lines on a hitachi lcd display. With the other 3
control lines provided by dedicated pins. A further 3 pins are allocated
to the multiplexing of the 3 devices ( A little overkill but not too
much) .
               Personally I have a preference to EEPROM on an I2C bus as
this only uses 2-3 wires and doesn't waste much board space or need
complex wiring.. As for the serial I/O. Well the 16c74 has its own serial
port but you may need a max232 to to convert its ttl outputs to the 12v
rs232 standard. However if these are you only needs then you may be more
inclinded towards using a pic16c84.. As this chip has an onboard eeprom 1k
for program storage. It is a much more project development friendly
device. If your program will fit in 1K and then data speeds are slow
enough to store in an EEPROM. ( serial rates probably would be ). Also
this chip is considerably cheaper than its larger counterpart. $12 as
opposed to $50 for the 16c74 EPROM ver. Irish Prices !) However if I
remember correctly the 16c84 may not have an inbuilt UART ( Only just
realised that ) so you may have to code this youself. (Tricky I recon)
Perhaps the 16c71 may be a happy compromise..
               Anyway as you probably realised I am  not the most
experienced in programing PICs but perhaps my suggestions may fuel
comments from other more experienced PICers. Anyway best of luck in your
endevours and let me know how you get on, as I will probably experience
similar problems.


                                       David Nicholls


On Fri, 6
Dec 1996, Alex I. Torres wrote:

{Quote hidden}

'code or data for optrex lcd 8x2 on '84'
1996\12\09@114516 by myke predko

flavicon
face
>hi
>The part is from digi key #73-1106-nd optrex #dm50448n and I need help
>with alphanumeric code to connect it to a pic 16c84  with an rc slow
>clock using rb1-7 it has two rows of 7 on one end.
>        Thanks guy's Tony M.

Hi Tony,

Maybe you could give some clearer requirements?  I don't understand what you
mean by saying "using rb1-7 it has two rows of 7 on one end".

myke

Today, the commercial sector is advancing computer and communication
technology at a breakneck pace.  In 1992, optical fiber was being installed
within the continental U.S. at rates approaching the speed of sound (if
computed as total miles of fiber divided by the number of seconds in the year).

Aviation Week and Space Technology, October 28, 1996

1996\12\09@192405 by Tony Matthews

flavicon
face
myke predko wrote:
>
> >hi
> >The part is from digi key #73-1106-nd optrex #dm50448n and I need help
> >with alphanumeric code to connect it to a pic 16c84  with an rc slow
> >clock using rb1-7 it has two rows of 7 on one end.
> >        Thanks guy's Tony M.
>
> Hi Tony,
>
> Maybe you could give some clearer requirements?  I don't understand what you
> mean by saying "using rb1-7 it has two rows of 7 on one end".
>
> myke
>
Hi I meant by two rows at the end as opposed to one row of terminals
across the top of the lcd module as these seem to be the two standards I
see most.My module arrived today and I am still seeking software help.
The software and FAQ that I have recieved and found so far are for other
pic,s than the 84' and did little to satisfy me.
As to the rb1-7 I simply meant those were the pins I had chosen to drive
the display.sorry about the confusing post.I have been chewed out on
that one before.(slow learner). Tony M.

1996\12\09@194038 by Peer Ouwehand

flavicon
face
At 19:25 96/12/09 -0500, you wrote:
>Hi I meant by two rows at the end as opposed to one row of terminals
>across the top of the lcd module as these seem to be the two standards I
>see most.My module arrived today and I am still seeking software help.
>The software and FAQ that I have recieved and found so far are for other
>pic,s than the 84' and did little to satisfy me.

You might try  http://www.IAEhv.nl/users/pouweha/lcd.htm


>As to the rb1-7 I simply meant those were the pins I had chosen to drive
>the display.sorry about the confusing post.I have been chewed out on
>that one before.(slow learner). Tony M.


Peer.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
   Peer Ouwehand
   spam_OUTpouwehaspamspamiaehv.nl
   http://www.iaehv.nl/users/pouweha/

   Wanna chat... try me on PowWow.

   Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

1996\12\10@094053 by myke predko

flavicon
face
>>
>Hi I meant by two rows at the end as opposed to one row of terminals
>across the top of the lcd module as these seem to be the two standards I
>see most.My module arrived today and I am still seeking software help.
>The software and FAQ that I have recieved and found so far are for other
>pic,s than the 84' and did little to satisfy me.
>As to the rb1-7 I simply meant those were the pins I had chosen to drive
>the display.

When you have a 7x2 connector, this simply means that the pins are put in
this order:

           7x2
    Gnd - 1   2 - Vcc
Contrast - 3   4 - R/W  - Typically Held Low (for Instructions
      E - 5   6 - R/S
  Bit 0 - 7   8 - Bit 1
  Bit 2 - 9  10 - Bit 3
 Bit 4 - 11  12 - Bit 5
 Bit 6 - 13  14 - Bit 7

This can be connected to easily using Ribbon ("Scotchflex") Connectors.

As for Code, here's a post earlier from Walt Banks of Bytecraft.  You should
be able to use it pretty much directly (but you may want to change some pin
definitions):

                 #include <lcd4.c>
                 /********************************************************
                  *  Device driver for 4 bit LCD interface using         *
                  *  Hitachi H2570 controllers. These displays are in    *
                  *  configurations from one line by 16 characters to    *
                  *  4 lines by 40 characters                            *
                  *                                                      *
                  *  No warranty is implied or given as to               *
                  *  their usability for any purpose.                    *
                  *                                                      *
                  *       (c) Copyright 1990                             *
                  *       Byte Craft Limited                             *
                  *       Waterloo, Ontario                              *
                  *       Canada N2J 4E4                                 *
                  *       (519) 888-6911                                 *
                  *                                                      *
                  *       Walter Banks                                   *
                  ********************************************************/


0000                              registerx index;
                                 #pragma option p ;
               /*
               ---------------
                              |
                              |
                              |
                         Pn0  |--------------------------\
                         Pn1  |--------------------------+\
                         Pn2  |--------------------------++\
                         Pn3  |--------------------------+++\
                 E Clock Pn4  |-------------------\      ||||
                Register Pn5  |-------------------+-\    ||||
                Select   Pn6  |-                  | |    ||||
                         Pn7  |-                  | |    ||||
                              |                   | |    ||||
                              |                   | |    ||||
                              |                   | |    ||||
                              |           Vcc     | |    ||||
               ---------------             |      | |    ||||
                                           |----  | |    ||||
                                           |    | | |    ||||
                                           -    | | |    ||||
                                      20K | <---+ | |    ||||
                                      pot  |    ||| |    ||||
                                      ----------+++ |    ||||
                                     |       1 |||||||||||||| 14
                                     |        ----------------------------
                                    ---      | ..............             |
                                     -       |  Liquid Crystal Display    |
                                             |                            |
                                              ----------------------------
               */


0005                    #define LCDdata PORTD     /*  Data output         */
0006                    #define LCD_RS PORTD.5    /*  Register select bit */
0007                    #define LCD_E  PORTD.4    /*  Clock bit           */

                   /********************************************************
                    * wLCDdat - Write data word to LCD peripheral          *
                    *  Enter with data word in accumulator                 *
                    *  Delay w120fS after data write                       *
                    ********************************************************/

                               void wLCDdat(unsigned int tempa)
0035                             {
001B 1283    BCF    STATUS,RP0
001C 00B5    MOVWF  35                      /* Write HI nybble word to LCD */
001D 00A1    MOVWF  21             LCDdata = tempa >> 4;
001E 0EA1    SWAPF  21
001F 300F    MOVLW  0Fh
0020 0521    ANDWF  21,W
0021 0088    MOVWF  PORTD
0022 1688    BSF    PORTD,5        LCD_RS  = 1 ;           /* RS->1 */
0023 1608    BSF    PORTD,4        LCD_E   = 1 ;           /* E->1  */
0024 1208    BCF    PORTD,4        LCD_E   = 0 ;           /* E->0  */
0025 1288    BCF    PORTD,5        LCD_RS  = 0 ;           /* RS->0 */
0026 300F    MOVLW  0Fh            LCDdata = tempa & 0x0f;
0027 0535    ANDWF  35,W                     /* Write LO nybble word to LCD */
0028 0088    MOVWF  PORTD
0029 1688    BSF    PORTD,5        LCD_RS  = 1 ;           /* RS->1 */
002A 1608    BSF    PORTD,4        LCD_E   = 1 ;           /* E->1  */
002B 1208    BCF    PORTD,4        LCD_E   = 0 ;           /* E->0  */
002C 1288    BCF    PORTD,5        LCD_RS  = 0 ;           /* RS->0 */

002D 3014    MOVLW  14h            index = 20;
002E 0084    MOVWF  FSR
002F 0384    DECF   FSR            while (--index);        /* 120usec $$$$*/
0030 0804    MOVF   FSR,W
0031 1903    BTFSC  STATUS,Z
0032 2834    GOTO   0034h
0033 282F    GOTO   002Fh
0034 0008    RETURN              }

                    /*********************************************************
                     * wLCDctrl4 - Write control word to LCD peripheral      *
                     *      configured as a 4 bit interface                  *
                     *  Enter with control word in accumulator               *
                     *  Delay w4.5mS if A=0x01 or 0x02 else delay w120fS     *
                     *********************************************************/
                             void wLCDctrl4(unsigned int tempa)
0036                            {
0035 1283    BCF    STATUS,RP0
0036 00B6    MOVWF  36
                                        /* Write HI nybble to LCD */
0037 00A1    MOVWF  21           LCDdata = tempa >> 4;
0038 0EA1    SWAPF  21
0039 300F    MOVLW  0Fh
003A 0521    ANDWF  21,W
003B 0088    MOVWF  PORTD
003C 1608    BSF    PORTD,4      LCD_E   = 1 ;           /* E->1  */
003D 1208    BCF    PORTD,4      LCD_E   = 0 ;           /* E->0  */
003E 300F    MOVLW  0Fh          LCDdata = tempa & 0x0f; /* Write LO nybble to
LCD */
003F 0536    ANDWF  36,W
0040 0088    MOVWF  PORTD
0041 1608    BSF    PORTD,4      LCD_E   = 1 ;           /* E->1  */
0042 1208    BCF    PORTD,4      LCD_E   = 0 ;           /* E->0  */
0043 3014    MOVLW  14h          index = 20;
0044 0084    MOVWF  FSR
0045 0384    DECF   FSR          while (--index);        /* 120usec   */
0046 0804    MOVF   FSR,W
0047 1903    BTFSC  STATUS,Z
0048 284A    GOTO   004Ah
0049 2845    GOTO   0045h
004A 3002    MOVLW  02h          if (tempa <= 2)
004B 1283    BCF    STATUS,RP0
004C 0236    SUBWF  36,W
004D 1903    BTFSC  STATUS,Z
004E 2851    GOTO   0051h
004F 1803    BTFSC  STATUS,C
0050 2860    GOTO   0060h
0051                               {
0051 0384    DECF   FSR             while (--index);
0052 0804    MOVF   FSR,W                      /* 4.6 ms or so delay */
0053 1903    BTFSC  STATUS,Z
0054 2856    GOTO   0056h
0055 2851    GOTO   0051h
0056 0384    DECF   FSR             while (--index);
0057 0804    MOVF   FSR,W
0058 1903    BTFSC  STATUS,Z
0059 285B    GOTO   005Bh
005A 2856    GOTO   0056h
005B 0384    DECF   FSR             while (--index);
005C 0804    MOVF   FSR,W
005D 1903    BTFSC  STATUS,Z
005E 2860    GOTO   0060h
005F 285B    GOTO   005Bh
                                   }
0060 0008    RETURN              }

                             void initLCD(void)
                               {
                                /* LCD display peripheral initialization */
0061 3024    MOVLW  24h           wLCDctrl4(0x24);
0062 2035    CALL   0035h                 /*  Function Set-4-bit,1-line,5X7  */
0063 300C    MOVLW  0Ch           wLCDctrl4(0x0c);
0064 2035    CALL   0035h                 /*  Display on, Cursor off         */
0065 3006    MOVLW  06h           wLCDctrl4(0x06);
0066 2035    CALL   0035h                 /*  entry mode- Inc addr, no shift */
0067 3001    MOVLW  01h           wLCDctrl4(0x01);
0068 2035    CALL   0035h                 /*  Clear Display */
0069 0008    RETURN             }

                             void putcharLCD(char sci_char)
                              /* Send a character to the LCD display */
0037                            {
006A 1283    BCF    STATUS,RP0
006B 00B7    MOVWF  37
006C 300A    MOVLW  0Ah          if ((sci_char == 0x0a) ||
006D 0237    SUBWF  37,W             (sci_char == 0x0d))  /* Look for a LF */
006E 1903    BTFSC  STATUS,Z
006F 2874    GOTO   0074h
0070 300D    MOVLW  0Dh
0071 0237    SUBWF  37,W
0072 1D03    BTFSS  STATUS,Z
0073 2877    GOTO   0077h
0074 3001    MOVLW  01h            wLCDctrl4(0x01); /*  Clear Display */
0075 2035    CALL   0035h
0076 287A    GOTO   007Ah           else
0077 1283    BCF    STATUS,RP0     wLCDdat(sci_char);
0078 0837    MOVF   37,W
0079 201B    CALL   001Bh
007A 0008    RETURN              }

Good Luck!

myke

Today, the commercial sector is advancing computer and communication
technology at a breakneck pace.  In 1992, optical fiber was being installed
within the continental U.S. at rates approaching the speed of sound (if
computed as total miles of fiber divided by the number of seconds in the year).

Aviation Week and Space Technology, October 28, 1996

1996\12\10@193933 by Tony Matthews

flavicon
face
<done> Thanks Tony M.

'initializing a 2x8 lcd'
1996\12\17@142542 by Tony Matthews

flavicon
face
Hello
I am having trouble initializing my 2x8 optrex lcd w/hd44780a
controller
in 4 bit mode.I have tried everything I could glean from the FAQ's but
it just
does'nt shift to 4 bit mode and all subsequent writes cause the cursor
to move
two places.In the simulator the write routine 4 bit writes upper
nybble,lower
nybble with no extra loops and the character printed bears no relation
to the
one I was attempting.I am using bits <4..7>b for data & bits <1..3>b for
control
The rs & r/w bits are output with enable low then enable is toggled high
and the
4 data bits are output then the enable bit is toggled low.
       Thanks in advance for any help. Tony M.
ps Digi_Key #73-1106-nd

1996\12\17@172212 by Kalle Pihlajasaari

flavicon
face
Hi Tony,

>  I am having trouble initializing my 2x8 optrex lcd w/hd44780a
> controller
> in 4 bit mode.I have tried everything I could glean from the FAQ's but
> it just
> does'nt shift to 4 bit mode and all subsequent writes cause the cursor
> to move
> two places.In the simulator the write routine 4 bit writes upper
> nybble,lower
> nybble with no extra loops and the character printed bears no relation
> to the
> one I was attempting.I am using bits <4..7>b for data & bits <1..3>b for
> control
> The rs & r/w bits are output with enable low then enable is toggled high
> and the
> 4 data bits are output then the enable bit is toggled low.

You might have a look at the following I did in Pascal just
to get an idea of the steps to take.  The plan is to write
the reset to 8 bit mode comand to the display 3 times as
recommended in the data sheets and then send the set to
4 bit mode command once.  All 4 of the above were single byte writes
after the last one then you start to write nibble/nibble.

http://www.ip.co.za/people/kalle/project.htm#lcd

Cheers     *<<<-|
--
Kalle Pihlajasaari   spamkallespamspamspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

1996\12\17@212026 by Tony Matthews

flavicon
face
Kalle Pihlajasaari wrote:
{Quote hidden}

Thanks I'll go and look.I did write my code just as you say like the
FAQ's I read
indicated I should. Plus a few variations.Is it necessary to pull the
unused inputs
to the lcd low externally ?
> http://www.ip.co.za/people/kalle/project.htm#lcd
>
> Cheers     *<<<-|
> --
> Kalle Pihlajasaari   spamBeGonekalleKILLspamspamKILLspamip.co.za   http://www.ip.co.za/ip
> Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
> + 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

1996\12\17@235729 by Kalle Pihlajasaari

flavicon
face
Hi Tony,

> > >  I am having trouble initializing my 2x8 optrex lcd w/hd44780a

> indicated I should. Plus a few variations.Is it necessary to pull the
> unused inputs to the lcd low externally ?

Yes.

Cheers     *<<<-|
--
Kalle Pihlajasaari   TakeThisOuTkallespamspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

1996\12\18@001827 by Chee Foon Tiang

flavicon
face
Kalle Pihlajasaari replied:

> Hi Tony,

>> I am having trouble initializing my 2x8 optrex
>> lcd w/hd44780a
>> Is it necessary to pull the unused inputs to the
>> lcd low externally ?

>Yes.

NO!!
The HD44780 is pulled-up internally, therefore, you
can just leave unused inputs open.

Regards,

Peter Tiang
spamBeGonetiangcfoonspamhitachi.com.my

1996\12\18@033242 by Shel Michaels

picon face
In a message dated 96-12-18 00:00:21 EST, Kalle anwered:

>> Is it necessary to pull the unused inputs to the lcd low externally ?
>
>  Yes.
>

Are you sure about that?  My interface _appears_ to be working fine, yet I
leave the four extra data lines DB<3:0> floating.  Am I likely to blow them
up or something?  The example code from Optrex, for 4-bit interface, doesn't
_use_ DB<3:0>

Best regards to all, and wishes for a happy season!!  8^)

Shel Michaels
Massachusetts, USA

1996\12\18@101442 by John Payson

picon face
> >> I am having trouble initializing my 2x8 optrex
> >> lcd w/hd44780a
> >> Is it necessary to pull the unused inputs to the
> >> lcd low externally ?
>
> >Yes.
>
> NO!!
> The HD44780 is pulled-up internally, therefore, you
> can just leave unused inputs open.

Generally true, but if you don't use R/W, you must strap it low.

1996\12\18@102121 by Kalle Pihlajasaari

flavicon
face
Hi Shel,

> >> Is it necessary to pull the unused inputs to the lcd low externally ?
> >
> >  Yes.
>
> Are you sure about that?  My interface _appears_ to be working fine, yet I
> leave the four extra data lines DB<3:0> floating.  Am I likely to blow them
> up or something?  The example code from Optrex, for 4-bit interface, doesn't
>  _use_ DB<3:0>

As Peter Tiang  mentioned they have pullups.  Having checked the data sheet
the only difference will be the mode that the display will be in
while you are setting it up for 4 bit mode, this intemediate mode
gets squashed by the 4 bit mode select command so it looks like it
won't matter which way you leave the low bits.  Letting them float will
consume a few microamps less perhaps.  Pulling them to ground will
prevent ESD from creeping into your display.

I ground them myself and it has always worked.

Cheers     *<<<-|
--
Kalle Pihlajasaari   EraseMEkalleEraseMEspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

1996\12\18@112528 by David Schmidt

flavicon
face
Be sure you are waiting the required amount of time between instruction
writes to the display.

 I had trouble at first writing to displays in 4 bit mode and got
results like you see.  After I checked my code I found I wasn't quite
waiting long enough between writes.  Doubling the delays (for overkill)
worked!  I also found that the delays mentioned in spec sheets are only
approximate.  Increase yours and see if it helps.

Dave


At 02:08 PM 12/17/96 -0500, you wrote:
>Hello
> I am having trouble initializing my 2x8 optrex lcd w/hd44780a
>controller
>in 4 bit mode.I have tried everything I could glean from the FAQ's but
---------------------------------------------------------------------------
( DSchmidt Technologies, Ventura CA         http://www.rain.org/~dschmidt )
( Freq selectors for FME/FMX/FM25, DTMF decoders. Email spamBeGonedschmidtspam_OUTspam.....rain.org )
---------------------------------------------------------------------------

1996\12\19@191401 by Tony Matthews

flavicon
face
I saw only millisecond delays in the spec sheet and in desperation
wrote delays loops several seconds long.nada
I suppose I must have damaged something?
       Thanks  Tony M.
David Schmidt wrote:
{Quote hidden}

1996\12\20@094244 by myke predko

flavicon
face
Tony,

>I saw only millisecond delays in the spec sheet and in desperation
>wrote delays loops several seconds long.nada
> I suppose I must have damaged something?
>        Thanks  Tony M.

Before you dispair, commit hari-kari, or go out and buy another LCD, there
are somethings that you can do:

1.  Check all your connections.  The first time I did an LCD Project (using
Walt Bank's code), I got nothing (and then noticed that the R/W line was
left floating...

2.  Make sure that what you are doing is pretty simple; ie just try to put
"A" on the LCD.  Don't go for the full implementation right from the start.

3.  Look for documentation; I didn't have a lot of luck with the FAQs on the
internet (a *lot* of problems/errors).  But, the Optrex Data Sheet from
Digi-Key (around $3.00) is pretty accurate (I've only found one
inconsistancy/error so far).  I've never been able to find a Hitatchi Data
Sheet for the 44780 (even from the local Toronto Hitatchi office) - they
seem to treat them like the family jewels.

4.  Even without anything valid, you should be able to turn up the contrast
and see the dots of the characters become visible.  If you don't see this,
look at your power and contrast connections.

5.  You can build a simple, manual controller using a dip switch (with
pull-ups) and a single-shot (ie 74121) and figure out what's the problem
pretty easily.

I've been there; I'm convinced that LCDs are pretty easy to use, just a real
bugger the first time.

Good Luck,

myke

Today, the commercial sector is advancing computer and communication
technology at a breakneck pace.  In 1992, optical fiber was being installed
within the continental U.S. at rates approaching the speed of sound (if
computed as total miles of fiber divided by the number of seconds in the year).

Aviation Week and Space Technology, October 28, 1996

1996\12\21@144334 by Tony Matthews

flavicon
face
myke predko wrote:
{Quote hidden}

year).
>
> Aviation Week and Space Technology, October 28, 1996
Your words of encouragement are appreciated and come at a good time.The
possible problems you suggested I tested long before.I suppose your
suggestion of manually operating the device is where I'll go from here
but unsoldering a ribbon cable is not much fun.Thanks Tony M.


'LCD for 16C84'
1997\01\07@094944 by Iannini
flavicon
face
Brasilia, 01/07/1997


          Hello,


          My name is Roberto and I make some projects using
microcontrollers PIC 16C84, from microchip.

          I would like to write a subroutine ( in assembly or PicBasic
from microengineering Labs - http://www.melabs.com ) for my future
programs.

          I need a subroutine that writes messages  in a 2 line x 16
characters LCD display (dot matrix 5x7) that uses the HD44780. The
conections from LCD module to 16C84 are the most used. They are:

             LCD pins                     PIC16C84 pins
             DB0-DB7      connected to       RB0-RB7
              RS                "             RA00
              R/W               "             RA01
             ENABLE             "             RA02


          I can not modify it because the board is done.

          I use the Pic Macro Assembler, PM.EXE, from Micro engineering
labs, version 2.51. Also, I have one file called "LCD.LIB" that maybe
can help...


       If possible, send me some help (or some subroutine!).


          Thank you,

          Roberto Fonseca

          E-mail: RemoveMEianniniKILLspamspamKILLspamrudah.com.br

1997\01\08@155522 by Gael Waiche

picon face
Iannini wrote:
{Quote hidden}

Have a look at: http://www.iaehv.nl/users/pouweha/lcd.htm

You will find exactly what you need.


Gael

'LCD displays Help'
1997\01\09@044537 by efoc

flavicon
face
Hello fellow PIC'ers,

  I know this is a bit off topic but it is related to a PIC project and
I have tried VERY hard to find out for myself without ANY luck so far.

  My question is ....... does anybody out there know of a small say
4*20 char LCD display also able to draw graphs on a pixel by pixel
basis.

  I have a PIC project that requires an updatable graph to be displayed
in real time based upon incoming data.

Thanks In advance Peter .....

Oh BTW happy new year


==================================
= New Ideas come from those who  =
= didn't know it wasn't possible =
==================================

'Serial LCD Interface'
1997\01\13@085707 by Ben Wirz

flavicon
face
Hello Everyone,

    Wirz Electronics has a new product that we would like to introduce to
everyone.

    The Serial LCD Interface (SLI) is a self contained display unit with
TTL and RS232 compatible asynchronous serial inputs. The unit is designed to
allow the engineer, technician, or hobbyist to integrate it into a circuit
with a minimum of interfacing requirements.  Jumperless control and
automatic detection of data rates eliminates difficult interfaces and
complex controlling code.  Low cost and line-powering features make it
suitable for use in commercial products.  With both alphanumeric and
hexadecimal display mode, SLI is a powerful debugging and display tool for
many applications.

Features:

  Jumperless Control/Operation
  Wide Baud Range, 30 to 125,000 bps
  RS232 and TTL Compatible
  RS232 Serial Powered *
  Auto-Baud Rate Detection
  ASCII and Hex Display Mode
  D Sub 9 Female Connector (DB-9) and IDC Connector
  Allows direct control of the LCD functions and features
  Designed for all 8x1 to 40x2 character HD44780 controlled
  LCDs with 14x1 pin connectors

Suggested Retail Price for a complete SLI Kit: $25.00 (US)
Suggested Retail Price for a complete SLI Kit and 16x2 LCD: $30.00 (US)

More information can be found at:  http://wirz.com/sli/

An Adobe Acrobat SLI Technical Reference is available at:
ftp://wirz.com/Serial_LCD/sli.pdf

Distributors:

Australia
DonTronics
PO Box 595, Tullamarine 3043
Tel: +613 9338-6286 Fax: +613 9338-2935
http://www.labyrinth.net.au/~donmck/

South Africa
Interface Products (Pty) Ltd.
PO Box 15775, Doornfontein 2028
Tel: +27 (11) 402-7750 Fax: +27 (11) 402-7751
http://www.ip.co.za/ip/

United States
Wirz Electronics
6100 Pershing 2-A, St. Louis MO 63112
Tel: +1 (314) 862-3370 Fax: +1 (314) 862-3371
http://www.wirz.com/


Sincerely,

Ben Wirz
Wirz Electronics
EraseMEbenspamBeGonespamspamwirz.com
Ben Wirz                For Microchip PIC Products including the Simm Stick
                       development system and Easy PIC'n Book, as well
Wirz Electronics        as Motor Control, Polaroid Sonar Units, and more
KILLspambenspamwirz.com            Hobbyist Robotic & Electronic Supplies, visit:
                       http://www.wirz.com/

'How to move cursor without overwriting LCD display'
1997\01\14@121447 by Brooke

flavicon
face
Hi:

I am trying to move the cursor on an LCD display using a 44780
controler chip.  When the cursor moves it seems to be overwriting
the display with it's location.  How to move the corsor and NOT
change the display?

Thanks,
Brooke

'Old question - LCD modules'
1997\01\14@170359 by Bryan Mumford

flavicon
face
Simon-

There are plenty of code examples for using an LCD display (see Microchip,
Parallax, etc.). There's one big "gotcha" that I ran into with Optrex
displays, however. They usually have just one controller chip, as opposed
to two. LCD modules with one chip locate the 9th character at address 41H.
If you don't know this, you think half the display is bad. See the
following URL for more information that you ever wanted:

http://www.paranoia.com/~filipg/HTML/LINK/F_LCD_tech.html



>  Also has any had any experience with Optrex Dot Matrix
>type LCD modules?? And does anyone know how I can get
>hold of the databook for them??
>  I tried digikey, but they are out of stock.
>
>                Thanks in advance,
>                        simon


Bryan Mumford
Santa Barbara, California

'How to move cursor without overwriting LCD display'
1997\01\14@183922 by Peer Ouwehand

flavicon
face
At 09:08 97/01/14 -0800, you wrote:
>Hi:
>
>I am trying to move the cursor on an LCD display using a 44780
>controler chip.  When the cursor moves it seems to be overwriting
>the display with it's location.  How to move the corsor and NOT
>change the display?
>
>Thanks,
>Brooke

All you have to do is change the address of where the cursor
has to be displayed.

Peer.

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
   Peer Ouwehand
   pouwehaspam_OUTspamspamiaehv.nl
   http://www.iaehv.nl/users/pouweha/

   Wanna chat... try me on PowWow.

   Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

1997\01\14@183929 by Brooke

flavicon
face
Brooke wrote:
>
> Hi:
>
> I am trying to move the cursor on an LCD display using a 44780
>.....

The answer is that the 44780 always either increments or decrements
when the Display Data register ie EITHER read or written.  So I set
the Address Counter one higher than required, setup for decrement,
and READ the DD ram.
> Brooke

1997\01\14@211522 by reddyk

flavicon
face
What code are you using to move the cursor ?
If you are using 32 (space) try sending 20 as an instruction not a
printable character.

Brooke wrote:
>
> Hi:
>
> I am trying to move the cursor on an LCD display using a 44780
> controler chip.  When the cursor moves it seems to be overwriting
> the display with it's location.  How to move the corsor and NOT
> change the display?
>
> Thanks,
> Brooke

1997\01\14@221026 by Brooke

flavicon
face
Peer Ouwehand wrote:
>
> At 09:08 97/01/14 -0800, you wrote:
> >Hi:
> >
> >I am trying to move the cursor on an LCD display using a 44780
> >controler chip.......
>
> All you have to do is change the address of where the cursor
> has to be displayed.

Peer:

Correct.  For some reason it didn't work the first time

Thanks.
Brooke

'Old question - LCD modules'
1997\01\15@175506 by Kim Walker

flavicon
face
I too am interested in dot-matrix LCD module data books or sheets.
Specifically, modules that use the 61830 controller. The example that I
currently have has LM213XB silkscreened on the back of the circuit board.
Thanx in advance for any info.
Kim







On Tue, 14 Jan 1997, Bryan Mumford wrote:

{Quote hidden}

'Lcd driver for C'
1997\01\27@174956 by Barry Carter

flavicon
picon face
I am looking for some information on controlling an LCD screen in C.
Does anyone out there have any code they have written, If so please
reply.

Bazza
/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\_/*\
\Visit My Web page on Internet :  http://www.bazginge.demon.co.uk /
/                                                                 \
\       Barry Carter                                              /
/       bazspamspam@spam@bazginge.demon.co.uk
         \
\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/-\*/

1997\01\27@195053 by rrasa

flavicon
face
> I am looking for some information on controlling an LCD screen in C.
> Does anyone out there have any code they have written, If so please
> reply.

You're welcome to grab the code off my page at:

  http://www.sky.net/~rrasa/ee_lcd.html

It's was originally written and tested with a 4x20 LCD, but should be
adaptable to any character-mode LCD that uses the Hitachi HD44780
driver.


Randy Rasa
spamBeGonerrasa.....spamsky.net
http://www.sky.net/~rrasa

1997\01\28@101832 by Brian Hackett

picon face
>I am looking for some information on controlling an LCD screen in C.
>Does anyone out there have any code they have written, If so please
>reply.
>
>Bazza

Have a look at the book by Jean LaBrosse titled "Embedded Systems Building
Blocks".  Chapter 5 "Character LCD Modules" develops a full set of C LCD
driver code.

The book is published by R&D Books and distributed by Prentice Hall.  The
ISBN number is:  0-13-359779-2.  R&D publications phone number is: (913)
841-1631.

Brian

'LCD FOR PIC16C84 IN C'
1997\01\28@132303 by Barry Carter

flavicon
picon face
Thanks for all the help on connecting a HD44780 to the Paralell port
on a PC. I am now interested in some code on connecting a HD44780 to
A PIC16C84 device. If anyone has code/schematics for this I would be very
greatful as It would save me the time of writing/designing my own.

Barry.

1997\01\28@150548 by Peer Ouwehand

flavicon
face
At 17:30 97/01/28 +0000, you wrote:
>Thanks for all the help on connecting a HD44780 to the Paralell port
>on a PC. I am now interested in some code on connecting a HD44780 to
>A PIC16C84 device. If anyone has code/schematics for this I would be very
>greatful as It would save me the time of writing/designing my own.
>
>Barry.


You might have a look at
http://www.IAEhv.nl/users/pouweha/lcd.htm

Success
Peer

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
   Peer Ouwehand
   .....pouweha@spam@spamiaehv.nl
   http://www.iaehv.nl/users/pouweha/

   Wanna chat... try me on PowWow.

   Welcome my son, welcome to the machine. (Pink Floyd)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

'Lcd driver for C'
1997\01\28@154934 by Philippe TECHER

flavicon
face
on Mon, 27 Jan 1997 20:43:11, Barry Carter wrote:

>I am looking for some information on controlling an LCD screen in C.
>Does anyone out there have any code they have written, If so please
>reply.


This is a sample program given with the MPLABC demo kit, you can
download this demo compiler version at microchip WEB site.
I make some little change in order to use PORTB instead of PORTE,
the "Delay_Ms_4MHz" routine is also adapted just to match the
needed time for LCD wait.
This sample just wrote "LCD Test for 16C84" on the first line
of the LCD panel and move it left and right 5 times.

Hope this will help you, regards,
       Philippe. (@spam@P.TECHERspaminsat.com)


/* ********************************************************************* */
/*    UMPS capabilities to use an external compiler                      */
/*-----------------------------------------------------------------------*/
/* This file is extract from the MPLABC-dŽmo kit and was compiled        */
/* with the MPLABC dŽmo.                                                 */
/* ********************************************************************* */

#include <16c84.h>

/* ********************************************************************* */
/*  These routines implement an 8-bit interface to a Hitachi             */
/*  LCD module, busy flag used when valid.  The data lines               */
/*  are on PORTB, E is on PORTA bit 3, R/W is on PORTA bit 2,            */
/*  RS is on PORTA bit1.  Based off a 4MHz external clock source.        */
/*  These routines were ported to MPLAB-C from the assembly firmware     */
/*  accompanying the PICDEM2 demo board.                                 */
/* ********************************************************************* */

// Defines for control signals to LCD module
#define RS 1
#define RW 2
#define E  3

bits TEMP;

/* ********************************************************************* */
/*  Wait byte x 100us doing nothing                                      */
/* ********************************************************************* */

void Delay_Ms_4MHz (char byte)          // wait more than 100us
 {
   char I,J;

   for (J=1;J<=byte;J++)
     {
       for (I=1;I<10;I++) {}
     }
 }

/* ********************************************************************* */
/*  Busy:This routine checks the busy flag.                              */
/*  Returns a 1 when LCD is busy, or a 0 when the LCD is not busy.       */
/* ********************************************************************* */

void Busy(void)
 {
   do
      {
               PORTB = 0;
               TRISB = 0xff;         // make PORTB all inputs
               PORTA.RS = 0;         // setup LCD to output flags
               PORTA.RW = 1;
               NOP();
               PORTA.E = 1;
               NOP();
               NOP();
               TEMP = PORTB;
               PORTA.E = 0;
       }
   while (TEMP.7);             // check busy flag
   PORTA.RW = 0;
   TRISB = 0x00;             // restore PORTB to outputs
   return;
 }

/* ********************************************************************* */
/*  SendCha  This routine sends the character in byte to the LCD.        */
/* ********************************************************************* */

void SendChar(char byte)
 {
       Busy();                         // wait for LCD to not be busy
       PORTB = byte;                 // load PORTB with byte
       PORTA.RW = 0;                 // send character to LCD
       PORTA.RS = 1;
       NOP();
       PORTA.E = 1;
       NOP();
       PORTA.E = 0;
       return;
 }

/* ********************************************************************* */
/*  SendCmd This routine sends the command in byte to the LCD.           */
/* ********************************************************************* */

void SendCmd(char byte)
 {
       Busy();                         // wait for LCD to not be busy
       PORTB = byte;                 // load PORTB with byte
       PORTA.RW = 0;                 // send command byte to LCD
       PORTA.RS = 0;
       NOP();
       PORTA.E = 1;
       NOP();
       PORTA.E = 0;
       return;
 }

/* ********************************************************************* */
/*  LCDInit This routine initializes the LCD module and ports.           */
/* ********************************************************************* */

void LCDInit(void)
 {
       PORTA = 0x00;                 // clear PORTA and PORTB
       PORTB = 0x00;
       TRISB = 0;                    // make PORTA and PORTB all outputs
       TRISA = 0;
       PORTA = 0x00;                 // clear PORTA
       PORTB = 0b00111000;           // set 8-bit interface
       NOP();
       PORTA.E = 1;
       NOP();
       PORTA.E = 0;
       Delay_Ms_4MHz(5);               // wait more than 4.1ms
       PORTB = 0b00111000;           // set 8-bit interface
       NOP();
       PORTA.E = 1;
       NOP();
       PORTA.E = 0;
       Delay_Ms_4MHz(1);               // wait more than 100us
       SendCmd(0b00001110);            // display on, cursor on
       SendCmd(0b00000001);            // clear display
       SendCmd(0b00000110);            // set entry mode inc, no shift
       SendCmd(0b10000000);            // Address DDRam upper left        
       return;
 }

/* ********************************************************************* */
/* Send a message to the LCD panel                                       */
/* ********************************************************************* */

void SendMessage (char *PSt)
 {
   char I;

   I = *PSt;
   while (I!=0x00)
     {
       SendChar (I);
       PSt++;          
       I = *PSt;
     }
   return;
 }

/* ********************************************************************* */
/* ********************************************************************* */

void main()
{
  char I;

  Delay_Ms_4MHz(1);            // wait more than 100us
  LCDInit ();
  SendMessage ("LCD Test for 16C84");
  for (I=5; I!=0; I--)
    {  Delay_Ms_4MHz(250);            
       SendCmd(0b00011000);         // shift display left
       SendCmd(0b00011000);
       SendCmd(0b00011000);        
       Delay_Ms_4MHz(250);            
       SendCmd(0b00011100);         // shift display right
       SendCmd(0b00011100);        
       SendCmd(0b00011100);
    }

  while(1)
    {
    }
}

'LCD FOR PIC16C84 IN C'
1997\01\28@195112 by Tony Matthews

flavicon
face
Barry Carter wrote:
>
> Thanks for all the help on connecting a HD44780 to the Paralell port
> on a PC. I am now interested in some code on connecting a HD44780 to
> A PIC16C84 device. If anyone has code/schematics for this I would be very
> greatful as It would save me the time of writing/designing my own.
>
> Barry.
Barry
I recently climbed this particular hill and despite the excellent advice
I recieved on the list and at various pic lister web pages it still took
a bit of doing.I'm afraid my code may be a bit unconventional but it
works very well.The problem I ran into was the port pins I chose were
not the ones the code I found on the net was written for.I chose 4 bit
mode and I use portb 1~7 to control the lcd leaving portb 0 to control a
pump.Most of the code I ran into used parts of two ports data/control.I
copied the 8 bit initialization routine nearly verbatim from the FAQ'S
but then I took a left turn.I have but one routine that talks directly
to the lcd and after toggling a data/instruction bit flag and loading
the data/instruction into W you call this routine.It then handles
splitting the command into nibbles preserving the status of the zero bit
w/r r/s and E bits.I have included the preservation of the read/write
bit and included it in the hardware design although I at present write
only. Mine is a development system and I wished to preserve my options.
At any rate this left me all of porta and 1 of bortb. Porta is input
portb is output I thought to simplify things from the start as this was
new to me and an avocation "code written in the evening after supper".I
have made little effort to optimize my code as I have only just finished
getting all the required functions going like their supposed to and the
pic is running at only ~100k. Sorry for the long post but this subject
ocupied a great deal of time and there's a serious dearth of sympathetic
(competent) ears in my real world surroundings .Tony M

'LCD Applications: display managers'
1997\01\28@214751 by Ed Todd

picon face
There are several levels to such an application, hardware access probably
the easiest, assuming some form of user interaction.  I wrote a display
manager that handled 4 x 20 display and a 4x4 keypad (the keypad was on
another chip), centered text lines, European accented characters, text and
numeric entry fields, editing, including backspacing, insertion of choices
from a list and so on.  It can be done, I managed to fit it all on a 57
with a 2-wire serial command/keystroke/reply interface and an I2C bus to
access menu text.

The LCD I used was really easy at the hardware level: parallel 8 bit data,
a command/data line, and a clock/strobe.  The biggest problem was the
strobe length: it varied depending on data or command type.

The point I'm trying to make is: what are you going to do with this LCD?
Static display of status messages, or user interaction.  PIC, PC or
mainframe, design it carefully right from the start.

1997\01\28@215830 by Walter Banks

picon face
While we are on a LCD thread. There is 4 and 8 bit parallel
C code on our BBS. It is essentially the same as any one
of a multitude of other code packages except it is written
in C and the same source works on 9 or 10 platforms with
no changes other than  port definitions.

Does anyone have a favorite graphics display with 64 *128 to
128 * 256 resolution? How about touch overlays?

Walter Banks

'LCD FOR PIC16C84 IN C'
1997\01\29@022508 by Tim Kerby

picon face
Hi

Get a copy of March Everyday Practical Electronics from John Menzies or
alternative newsagent.  They started a series on LCDs on the issue available
at the moment and in the March issue (available early Feb) they are giving
84 code and details.

Tim

At 17:30 28/01/97 +0000, you wrote:
>Thanks for all the help on connecting a HD44780 to the Paralell port
>on a PC. I am now interested in some code on connecting a HD44780 to
>A PIC16C84 device. If anyone has code/schematics for this I would be very
>greatful as It would save me the time of writing/designing my own.
>
>Barry.
>


------------------------------------------------------------------
If you can read this, it is the end of the message!
My web pages are at http://web.ukonline.co.uk/members/tim.kerby/
My PIC site is at web.ukonline.co.uk/members/tim.kerby/pic/
It needs your projects!
------------------------------------------------------------------

1997\01\29@094453 by hoss karoly

flavicon
face
> At 17:30 28/01/97 +0000, you wrote:
> >Thanks for all the help on connecting a HD44780 to the Paralell port
> >on a PC. I am now interested in some code on connecting a HD44780 to
> >A PIC16C84 device. If anyone has code/schematics for this I would be very
> >greatful as It would save me the time of writing/designing my own.
> >
> >Barry.

look for the good old rcv2lcd.src
if you can't find it drop me a line and I'll send it to you

bye
charley

'LCD Displays'
1997\01\29@125902 by Walter Banks

picon face
While we are on a LCD thread. There is 4 and 8 bit parallel
C code on our BBS. It is essentially the same as any one
of a multitude of other code packages except it is written
in C and the same source works on 9 or 10 embedded system
platforms with no changes other than  port definitions.

Does anyone have a favorite graphics display with 64 *128 to
128 * 256 resolution? How about touch overlays?

Walter Banks

'LCD Applications: display managers'
1997\01\29@220356 by Kim Walker

flavicon
face
I have an LCD display that I have been wanting to find hookup data on.
The display area is 5.9" X 1.7". The driver chip is a HD61830AOO (just one)
and on the back of the pcb is the number _LM213XB_ . Any info on where I
could get info is much appreciated. Thanx in advance.
kim walker



On Tue, 28 Jan 1997, Walter Banks wrote:

{Quote hidden}

'pot on the lcd?'
1997\01\29@224935 by Tony Matthews

flavicon
face
hey guys & gals
How do I eliminate the pot for the contrast adjustment on my lcd
display "minimum part count" Thanks in advance. Tony M.

1997\01\29@234143 by Todd Peterson

picon face
At 10:44 PM 1/29/97 -0500, you wrote:
>hey guys & gals
> How do I eliminate the pot for the contrast adjustment on my lcd
>display "minimum part count" Thanks in advance. Tony M.

Well, if you can afford the board space for two resistors, just figure out
where you want the voltage set at (determine with a pot hooked up) and make
a voltage divider using two resistors.  It's been a while since I looked at
the schematic, but that should work.

       -Todd


____________________________________

Todd Peterson (tpetersonRemoveMEspamnetins.net)
 E-LAB Digital Engineering, Inc.

Embedded Control & Integrated Circuit Solutions

ELECTRONICS RESOURCE DIRECTORY at: http://www.netins.net/showcase/elab

Take a look at our new EDE300 PC Interface IC on our web site!

'LCD Applications: display managers'
1997\01\29@235818 by Robert Lunn

flavicon
face
>I have an LCD display that I have been wanting to find hookup data on.
>The display area is 5.9" X 1.7". The driver chip is a HD61830AOO (just one)
>and on the back of the pcb is the number _LM213XB_ . Any info on where I
>could get info is much appreciated. Thanx in advance.

       This is an Hitachi chip.  Their LCD data book contains the info
       you need.  If I'm back at my office between now and Monday (and
       nobody else has given you more info) I will put some details on
       the list.

___Bob

(or you could just call Hitachi and demand they support your use
of the component :) )

'pot on the lcd?'
1997\01\30@054331 by Shel Michaels

picon face
Tony M. asksed:

<<  How do I eliminate the pot for the contrast adjustment on my lcd
display "minimum part count"
 >>

If your LCD is the for the standard temperature range, not the wider
automotive range, you may find you can simply ground that pin.  I've seen it
recommended to bias it up toward +5v by 330 ohms out of 10k (about a sixth of
a volt).  In my application, grounding it worked equally well.  YMMV.

Shel Michaels

'LCD Displays'
1997\01\30@072313 by Frank A. Vostenbosch

flavicon
face
> From:    Walter Banks <spamwalterspamBYTECRAFT.COM>
>
> While we are on a LCD thread. There is 4 and 8 bit parallel
> C code on our BBS. It is essentially the same as any one
> of a multitude of other code packages except it is written
> in C and the same source works on 9 or 10 embedded system
> platforms with no changes other than  port definitions.
>
> Does anyone have a favorite graphics display with 64 *128 to
>  128 * 256 resolution? How about touch overlays?

I use a Sony display with 128x64 resolution which uses an 8-bit
interface.  It needs quite a few control lines (6 IIRC), partly because
it's made for a 6800 bus interface, and partly because the left and
right hand sides of the display have a separate enable input.
Built-in commands are quite limited (i.e. no character mode, no horizontal
panning) but usable.
If enough people request it, I'll post PIC code for the (proportional)
text font that I'm using.

Frank

------------------------------------------------------------------------
Frank A. Vorstenbosch                           Phone:  +44-181-941 7899
Electronics & Software Engineer                 Mobile:  +44-976-430 569
Eidos Technologies Ltd., Hampton, Middx         Fax:    +44-181-941 7895

'pot on the lcd?'
1997\01\30@081454 by hoss karoly

flavicon
face
Todd Peterson wrote:
>
> At 10:44 PM 1/29/97 -0500, you wrote:
> >hey guys & gals
> > How do I eliminate the pot for the contrast adjustment on my lcd
> >display "minimum part count" Thanks in advance. Tony M.
>
> Well, if you can afford the board space for two resistors, just figure out
> where you want the voltage set at (determine with a pot hooked up) and make
> a voltage divider using two resistors.  It's been a while since I looked at
> the schematic, but that should work.
>
>         -Todd

nowadays I'm a dallas fan , so I'd suggest a dallas digital pot
with a user friendly interface and on-screen-display
I guess an lcd should be near somewhere :)

bye
charley

1997\01\30@091559 by Norm Cramer

flavicon
face
At 10:44 PM 1/29/97 -0500, you wrote:
>hey guys & gals
> How do I eliminate the pot for the contrast adjustment on my lcd
>display "minimum part count" Thanks in advance. Tony M.
>
>

I have an idea that I have not tried yet.  Use the PWM output of the pic to
adjust the LCD contrast.  Put the output to an RC circuit with a time
constant that allows the PWM to keep the Cap charged but also allows the
voltage to be changed.  Connect the + side of the Cap to the adjust pin of
the LCD.  Like I said, I haven't tried this yet.

Norm

1997\01\30@093732 by Brian Hackett

picon face
At 10:44 PM 1/29/97 -0500, you wrote:
>hey guys & gals
> How do I eliminate the pot for the contrast adjustment on my lcd
>display "minimum part count" Thanks in advance. Tony M.

I have used a pot in a few applications for an LCD display.  The problem is
that
the contrast changes with temperature.  We find that when we send a unit to
a customers site, the customer has to open up the unit and readjust the
contrast.
We have gone to an electronic contrast developed from a PWM output of our
processor.  Obviously not minimum parts count, but I guess you get what you
pay for.

Brian

1997\01\30@094335 by Brian Hackett

picon face
At 08:12 AM 1/30/97 -0600, you wrote:
>At 10:44 PM 1/29/97 -0500, you wrote:
>>hey guys & gals
>> How do I eliminate the pot for the contrast adjustment on my lcd
>>display "minimum part count" Thanks in advance. Tony M.
>>
>>
>
>I have an idea that I have not tried yet.  Use the PWM output of the pic to
>adjust the LCD contrast.  Put the output to an RC circuit with a time
>constant that allows the PWM to keep the Cap charged but also allows the
>voltage to be changed.  Connect the + side of the Cap to the adjust pin of
>the LCD.  Like I said, I haven't tried this yet.
>
>Norm

The problem with that technique is that it doesn't have a low enough impedance
to drive the LCD properly.  The normal temp range units require a voltage
in the
range of 0 to .5VDC.  You can use your technique but follow it with an OPAMP.
We have used that technique for years.

Brian

'LCD Displays'
1997\01\30@103528 by Walter Banks

picon face
Frank,

> If enough people request it, I'll post PIC code for the (proportional)
> text font that I'm using.


I am interested in seeing the code for it.

Walter Banks

'pot on the lcd?'
1997\01\30@104503 by Ray Gardiner

flavicon
face
>At 10:44 PM 1/29/97 -0500, you wrote:
>>hey guys & gals
>> How do I eliminate the pot for the contrast adjustment on my lcd
>>display "minimum part count" Thanks in advance. Tony M.
>
>I have used a pot in a few applications for an LCD display.  The problem is
>that
>the contrast changes with temperature.  We find that when we send a unit to
>a customers site, the customer has to open up the unit and readjust the
>contrast.
>We have gone to an electronic contrast developed from a PWM output of our
>processor.  Obviously not minimum parts count, but I guess you get what you
>pay for.
>
>Brian

Tony, what sort of display is it that you are using?

With a small 16x2 display like the sharp LM16A21 a diode to ground (0.7V)
lifts the contrast nicely, and that particular display is not especially
temperature sensitive. If you just ground the pin the display darkens
noticeably at higher temperatures.

On larger graphic displays we use a simple thermistor based circuit
to flatten the contrast drift with temperature. I think there was a
series on this in EDN a few years back, might be worth checking the
back issues. The display in this case is an EL backlit 320x240 sharp
which varies a fair bit with temperature.

Either way eliminating the need for the user to do something is more
beneficial than simply reducing component count.. to do both is ideal.


Ray Gardiner, Shepparton, Victoria, Australia       rayspam_OUTspamTakeThisOuTdsp-systems.com
Technical Director DSP Systems               http://www.dsp-systems.com
Private e-mail to:-  spam_OUTray@spam@spamRemoveMEnetspace.net.au

1997\01\30@204552 by Tony Matthews

flavicon
face
Ray Gardiner wrote:
{Quote hidden}

My sentiments exactly and thats exactly the advice I was seeking PIC
list strikes again.
Im using a 2x8 no backlight
Thanks     Tony M.
>
> Ray Gardiner, Shepparton, Victoria, Australia       spamrayspamspamdsp-systems.com
> Technical Director DSP Systems               http://www.dsp-systems.com
> Private e-mail to:-  @spam@rayspam_OUTspamnetspace.net.au

1997\01\30@204558 by Tony Matthews

flavicon
face
Brian Hackett wrote:
{Quote hidden}

I had'nt realized the contrast (Vee) pin drew any current. I'll have to
Quantify that to start with I suppose and here I was trying to reduce
the part count and the general concensus is "more silicon arh arh arh"I
gave up replying individually as this seems to be a popular subject.I
had in mind something in the nature of a thermistor voltage divider.Or
even 2 fixed resistors at a recommended voltage? Thanks people Tony M.

1997\01\30@204602 by Tony Matthews

flavicon
face
Shel Michaels wrote:
>
> Tony M. asksed:
>
> <<  How do I eliminate the pot for the contrast adjustment on my lcd
>  display "minimum part count"
>   >>
>
> If your LCD is the for the standard temperature range, not the wider
> automotive range, you may find you can simply ground that pin.  I've seen it
> recommended to bias it up toward +5v by 330 ohms out of 10k (about a sixth of
> a volt).  In my application, grounding it worked equally well.  YMMV.
>
> Shel Michaels
I will check that out thanks.

1997\01\30@204606 by Tony Matthews

flavicon
face
hoss karoly wrote:
{Quote hidden}

Cute I was concerned with user access to contrast adjustment with only
a two button interface 8)

'LCD trouble'
1997\01\30@212146 by Greg Marchokov

flavicon
face
Hi PICers,
I have a trouble. A big trouble. I want to hook a LCD module to pic16c84.
I build a schematics - it uses 8 bit interface. I get Microchip application
note  AN??? (sorry can't remember the number). I port it for 16c84, program
the chip and ...nothing happens. I use 2x20 LCD with LED backlight, so I
carefully examine LCD data sheet - it says Vo (LCD driving voltage) must be
0..5V, use 10K-20K pot between 5v and ground - well evereting was OK. After
that I wrote a simple program that tests every line - evereting was OK,
but LCD still displays nothing - only the backlite is on but LCD is empty.
Here is my shematic:

                 10K
           Vcc   ____      -----------                 ------
            o----    -----|mclr    RA0|---------------|E     |
                 ----     |        RA1|---------------|R/W   |
                          |        RA2|---------------|RS    |
                  o-------|Vdd        |               |      |
                      ----|Vss     RB0|---------------|D0    |
                      |   |        RB1|---------------|D1    |
                     ---  |        RB2|---------------|D2    |
                          |        RB3|---------------|D3    |
                 33p      |        RB4|---------------|D4    |
          |   | |         |        RB5|---------------|D5    |
          |---| |---o-----|xtal1   RB6|---------------|D6    |
          |   | |   -     |        RB7|---------------|D7    |
             4MHz -----   |           |     oVcc      |      |
                  -----   |           |     |         |      |
          |   | |   -     |           |     |---o-----|Vcc   |
          |---| |---o-----|xtal2      |         |     |      |
          |   | |33p      |           |         -     |      |
                           -----------     10K | |    |      |
                          PIC16C84             | |<---|Vo    |
                                               | |    |      |
                                                -     |      |
                                            |   |     |      |
                                            |---o-----|GND   |
                                            |         |      |
                                                       ------
                                                        LCD

Well thats it. I'm sure pin numbers are correct. Can any one tell me what's
on the hell going on?

Thank you very mutch. Any suggestions are welcome.
                                                        Greg

P.S. Please don't point me any URL location - I have only email access |-(
    Sorry

1997\01\30@222146 by hoss karoly

flavicon
face
Greg Marchokov wrote:
>
> Hi PICers,
> I have a trouble. A big trouble. I want to hook a LCD module to pic16c84.
> I build a schematics - it uses 8 bit interface. I get Microchip application
> note  AN??? (sorry can't remember the number). I port it for 16c84, program
> the chip and ...nothing happens. I use 2x20 LCD with LED backlight, so I
> carefully examine LCD data sheet - it says Vo (LCD driving voltage) must be
> 0..5V, use 10K-20K pot between 5v and ground - well evereting was OK. After
> that I wrote a simple program that tests every line - evereting was OK,
> but LCD still displays nothing - only the backlite is on but LCD is empty.

if you can't solve the problem just by turning the pot upor down then
I guess the code must be the problem
are you sure it's working ?
put a signal on the ra.3 and try to detect it with something like a LED
if all else fails I've got a bullet proof lcd driver code and I can send
it to
you .
also I'd suggest to put your e-mail address into the next mail
so I could decide to answer it private or on the list

bye
charley

'pot on the lcd?'
1997\01\30@222154 by hoss karoly

flavicon
face
Tony Matthews wrote:
>
>  Cute I was concerned with user access to contrast adjustment with only
> a two button interface 8)

why two ?
I did a big sys with menu system
you change selection by pushing the button short
select by pushing it long

if you have to make an inteface one looong push could reset the counter
to "factory default"
short pushes inc
long ones dec

so you'll need only one
button .

bye
charley

'LCD trouble'
1997\01\30@222813 by TONY NIXON 54964

flavicon
picon face
LCD modules can be finicky at powerup. I have a software delay
execute before I begin writing to the display to let it stabilise.
You can also try the initialisation code for the display which
usually consists of sending bytes in the list,

retlw 30h           ; display initialisation
retlw 30h
retlw 30h
retlw 38h           ; 2 lines, 5X7 chars
retlw b'00001100'   ; display = on, no cursor or blink
retlw 1h            ; clear display
retlw 6h            ; increment display

I put a delay after the '30h' commands as defined in the display
initialise instructions.

Tony


Just when I thought I knew it all,
I learned that I didn't.

'Sharp LM64p839 LCD HELP'
1997\01\30@234730 by Stanley Koontz

flavicon
face
HI

Can anyone provide some info on the sharp LM64p839 passive lcd ??

Pin outs ?, Driver onboard ?

I have one I need to test and maybe use for a pic project.

Any help would be greatly appreciated !!

Stanley Koontz
.....stushspam.....sgi.net

'LCD trouble'
1997\01\30@234926 by John Payson

picon face
> LCD modules can be finicky at powerup. I have a software delay
> execute before I begin writing to the display to let it stabilise.
> You can also try the initialisation code for the display which
> usually consists of sending bytes in the list,
>
> retlw 30h           ; display initialisation
> retlw 30h
> retlw 30h
> retlw 38h           ; 2 lines, 5X7 chars
> retlw b'00001100'   ; display = on, no cursor or blink
> retlw 1h            ; clear display
> retlw 6h            ; increment display
>
> I put a delay after the '30h' commands as defined in the display
> initialise instructions.

Note that if you do the four-bit initialization, things are a little bit
trickier as you cannot just send the init-stuff using your byte-output
routine, unless you always have a signifcant delay between outputting the
two halves of a byte (which is useless in all other cases).  For the display
init, of a 4-bit unit, you need to send a bunch of "nybble" "2"s with a
delay after each one, and then a single nybble "3", and then everything else.
Note that if you don't have a delay between the last "2" and the "3", the "3"
may not be registered, and you send something else [even another "3"] after
the "3", if may be interpreted as the high nybble of the next command.

It took me several hours to track down this problem; anyone else using a 4-bit
display should watch for it.

'pot on the lcd?'
1997\01\31@003813 by John Payson

picon face
> I had'nt realized the contrast (Vee) pin drew any current. I'll have to
> Quantify that to start with I suppose and here I was trying to reduce
> the part count and the general concensus is "more silicon arh arh arh"I
> gave up replying individually as this seems to be a popular subject.I
> had in mind something in the nature of a thermistor voltage divider.Or
> even 2 fixed resistors at a recommended voltage? Thanks people Tony M.

The current draw from the Vee pin is, from my experience, pretty negligible
on most LCD units.  While your RC needs to have at least some "oomf" to it,
if you're PWM'ing at 1KHz (easy in software), you would probably be fine
with R==22K, C=1uF [rc=22ms]  If your PWM is faster, you could use a 0.1uF
monolithic cap instead if desired.

BTW, on the 16C924, the LCD charge pump can keep the display up even after
VDD has been removed from the device (the display fades about 1-3 seconds
later)--I don't know whether this is harmful to the LCD (is the oscillator
still going?) but it sure is wierd...

1997\01\31@004040 by John Payson

picon face
> > If your LCD is the for the standard temperature range, not the wider
> > automotive range, you may find you can simply ground that pin.  I've seen it
> > recommended to bias it up toward +5v by 330 ohms out of 10k (about a sixth
of
> > a volt).  In my application, grounding it worked equally well.  YMMV.

This is a small advantage of the 1/16-duty displays over the 1/8-duty displays
(though on the 1/8 duty displays you could always, I suppose, program them
for 1/16 duty...); on the 1/8 duty displays, grounding Vee will produce a
display with an overly dark background while on some 1/16 duty displays this is
not a problem.

'Proportional LCD character set'
1997\01\31@091726 by Frank A. Vostenbosch

flavicon
face
Three of you have now requested my LCD character tables, so here it is.
You'll have to figure out for yourselves how to drive your particular
display (shouldn't be difficult).

The table is in three parts/pages, neccessary because of the PCLATH setup
needed.  On each page unused words are left empty, so that you can store
other routines there if needed.
Characters are stored on 6-instruction-boundaries, the first returns the
number of columns needed for the character (excluding one extra blank
column for character separation), the next return the actual column data.
Note that on my LCD display the MSB is at the bottom, so the exclamation mark
is 0x5f rather than 0xfa.

Note: this might work on a 16C57, but that would leave precious little space
for other subroutines (only 1k instructions are available for subroutine entry
points and tables).

No particular copyright on this code, although if you make a million bucks on
your project I'd like to hear about it :-)

Have fun,
Frank

; ----- Macros ----------------------------------------------------------

               noexpand
               _next=0

store           macro   b
               if ($-_next)!=1
                if b<0
                 org $+1
                else
                 retlw b
                 _next=$
                endif
                exitm
               endif
               if b<0
                org $+1
               else
                org _next
                goto 0
                retlw b
                _next=$
               endif
               endm

table           macro   a,b,c,d,e,f
               store   a
               store   b
               store   c
               store   d
               store   e
               store   f
               endm


; ----- Character set tables --------------------------------------------

               org     0x500
               table   4,0x30,0x4a,0x4d,0x38,-1    ; 22 delta
               table   4,0x3e,0x49,0x49,0x3e,-1    ; 23 theta
               table   5,0x46,0x28,0x10,0x20,0x40  ; 24 lambda
               table   5,0xfc,0x20,0x20,0x1c,0x20  ; 25 mu
               table   5,0x04,0x7c,0x04,0x7c,0x04  ; 26 pi
               table   5,0x63,0x55,0x49,0x41,0x63  ; 27 Sigma
               table   5,0x08,0x04,0x3c,0x44,0x24  ; 28 tau
               table   5,0x5e,0x61,0x01,0x61,0x5e  ; 29 Omega
               table   5,0x10,0x20,0x7f,0x01,0x01  ; 30 root
               table   3,0x1d,0x15,0x17,-1,-1      ; 31 sup2
               table   3,0x00,0x00,0x00,-1,-1      ; SPACE
               table   1,0x5f,-1,-1,-1,-1          ; !
               table   3,0x03,0x00,0x03,-1,-1      ; "
               table   5,0x14,0x7f,0x14,0x7f,0x14  ; #
               table   5,0x04,0x2a,0x7f,0x2a,0x10  ; $
               table   5,0x63,0x13,0x08,0x64,0x63

'LCD Power on'
1997\01\31@093627 by Ed Todd

picon face
I had the same problem in my project.  I sent the first command after power
up (which has a few ms delay in it) 15 times.
 <spamedtoddKILLspamspamsni.net>    Ed Todd

'pot on the lcd?'
1997\01\31@192539 by Tony Matthews

flavicon
face
hoss karoly wrote:
{Quote hidden}

Charley, s'good idea except maybe the frustration factor.  I'll think
about it. Thanks.  Tony M.


'LCD problem'
1997\02\03@070833 by Greg Marchokov
flavicon
face
>>
>> Hi PICers,
>> I have a trouble. A big trouble. I want to hook a LCD module to pic16c84.
>> I build a schematics - it uses 8 bit interface. I get Microchip application
>> note  AN??? (sorry can't remember the number). I port it for 16c84, program
>> the chip and ...nothing happens. I use 2x20 LCD with LED backlight, so I
>> carefully examine LCD data sheet - it says Vo (LCD driving voltage) must be
>> 0..5V, use 10K-20K pot between 5v and ground - well evereting was OK. After
>> that I wrote a simple program that tests every line - evereting was OK,
>> but LCD still displays nothing - only the backlite is on but LCD is empty.
>
Hi PICers. It's me again. Thanks to all who reply. Finally I solve the problem.
I change the LCD and it WORKS, so I think the old LCD is gone.

Best regards,
                                                          Greg

1997\02\03@152301 by Tim Kerby

picon face
Does your code hang the lcd off one port (port b).  I desperately need some
code that frees porta completely but uses lcd on port b.

Thanks

Tim


At 13:07 03/02/97 +0200, you wrote:
{Quote hidden}

problem.
>I change the LCD and it WORKS, so I think the old LCD is gone.
>
>Best regards,
>                                                           Greg
>


------------------------------------------------------------------
If you can read this, it is the end of the message!
My web pages are at http://web.ukonline.co.uk/members/tim.kerby/
My PIC site is at web.ukonline.co.uk/members/tim.kerby/pic/
It needs your projects!
------------------------------------------------------------------

1997\02\03@231226 by David W. Duley

picon face
In a message dated 97-02-03 15:24:51 EST, you write:

<<
Does your code hang the lcd off one port (port b).  I desperately need some
code that frees porta completely but uses lcd on port b.

Thanks

Tim >>
Tim,
I have used this routine with some success,  It uses only the portB on a
16C84.
It is in the form of an include file.
In your source just put : Include LCD4.h.
It is a derivative (if not a direct copy) of the MCHIP app note.
Hope this helps
David Duley
V.P. DreiTek Inc.
;************************************************************
;Use this file for 4 bit LCD interfaces
;************************************************************

lcddata     equ    Port_B  ; these two lines make it easy to port LCD
lcdcntrl    equ    Port_A  ; routines to the PIC 57 or whatever.
LCD_DATA    equ    lcddata
LCD_CNTL    equ    lcdcntrl
;************************************************************
;           Bit Definitions
;************************************************************
E           equ    2       ;LCD enable strobe
RS          equ    3       ;LCD register select
RW          equ    4       ;LCD read write select
lcd_strobe  equ    03fh    ;LCD strobe pulse width
number_of_chars equ .20    ;# of characters on line
Disp_On     equ    0x00C   ;Display on
Disp_On_C   equ    0x00E   ;Display on Cursor on
Disp_On_B   equ    0x00F   ;Display on cursor blink
Disp_Off    equ    0x008   ;Display off
Clr_Disp    equ    0x001   ;Clear display
Entry_Inc   equ    0x006
Entry_Inc_S equ    0x007
Entry_Dec   equ    0x004
Entry_Dec_S equ    0x005
DD_RAM_ADDR equ    0x080   ;Least significant 7 bit are for address
DD_RAM_UL   equ    0x080   ;Upper Left corner of the display




Busy_Check
       movlw   TrisMaskB       ;get I/O assignments
       bsf     status,rp0      ;bank 1 select
       iorlw   0xf0            ;deal with only the upper nibble
       movwf   Tris_B          ;setup LCD to read data
       bcf     status,rp0
       bcf     LCD_CNTL,RS
       bsf     LCD_CNTL,RW
       call    lcd_wait
       bsf     LCD_CNTL,E      ;get upper nibble
       bcf     LCD_CNTL,E
       movf    LCD_DATA,w      ;get upper nibble of display data
       andlw   0xf0            ;mask off the lower nibble
       movwf   temp
       bsf     LCD_CNTL,E      ;get lower nibble
       bcf     LCD_CNTL,E
       swapf   LCD_DATA,W
       andlw   0x0f            ;mask off upper nibble
       iorwf   temp,f
       btfsc   temp,7          ;check busy flag
       goto    Busy_Check      ;do it again if still busy
       bcf     LCD_CNTL,RW
       movlw   TrisMaskB
       bsf     status,rp0
       Movwf   Tris_B
       bcf     status,rp0
       return

LCD_init                        ;init LCD display
       call    lcd_wait
       bcf     lcdcntrl,RS     ;Set register select to command regs
       bcf     lcdcntrl,E      ;Clear the lcd module enable bit.
       bcf     lcdcntrl,RW     ;Clear the lcd module Read/Write bit.
       call    lcd_wait
       movlw   0x020           ;set lcd module for 4 bit operation
       movwf   lcddata
       bsf     LCD_CNTL,E
       bcf     LCD_CNTL,E
       call    lcd_wait
       movlw   0x020           ;set lcd module for 4 bit operation
       movwf   lcddata
       bsf     LCD_CNTL,E
       bcf     LCD_CNTL,E
       call    lcd_wait
       movlw   0x080           ;set lcd module for 8 bit operation
       movwf   lcddata
       bsf     LCD_CNTL,E
       bcf     LCD_CNTL,E
       movlw   Disp_On         ;set lcd on, cursor off
       call    SEND_CMD
       movlw   Clr_Disp        ;Clear Display
       call    SEND_CMD
       movlw   Entry_Inc       ;Set to increment display
       call    SEND_CMD
       movlw   DD_RAM_ADDR
       call    SEND_CMD
       movlw   number_of_chars
       movwf   chcount
       bcf     flag,7
       goto    lcd_wait

;*******************************************************************
;* The LCD Module Subroutines                                      *
;*******************************************************************
;
;*******************************************************************
;*SendChar - Sends character to LCD                                *
;*This routine splits the character into the upper and lower       *
;*nibbles and sends them to the LCD, upper nibble first.           *
;*******************************************************************
;
SEND_CHAR
           MOVWF   CHAR            ;Character to be sent is in W
           call    Busy_Check
           movf    CHAR,w
           ANDLW   0xF0            ;Get upper nibble
           movwf   CharSave
           movf    LCD_DATA,w
           andlw   0x0F
           iorwf   CharSave,w      ;only affect upper nibble of LCD_DATA
           MOVWF   LCD_DATA        ;Send data to LCD
           BSF     LCD_CNTL, RS    ;Set LCD to data mode
           BSF     LCD_CNTL, E     ;toggle E for LCD
           BCF     LCD_CNTL, E
           SWAPF   CHAR, w
           ANDLW   0xF0            ;Get lower nibble
           movwf   CharSave
           movf    LCD_DATA,w
           andlw   0x0F
           iorwf   CharSave,w      ;only affect upper nibble of LCD_DATA
           MOVWF   LCD_DATA        ;Send data to LCD
           BSF     LCD_CNTL, E     ;toggle E for LCD
           BCF     LCD_CNTL, E
           return

;*******************************************************************
;* SEND_CMD - Sends command to LCD                                 *
;* This routine splits the command into the upper and lower        *
;* nibbles and sends them to the LCD, upper nibble first.          *
;*******************************************************************

SEND_CMD
           MOVWF   CHAR            ; Character to be sent is in W
           call    Busy_Check
           movf    CHAR,w
           ANDLW   0xF0            ; Get upper nibble
           movwf   CharSave
           movf    LCD_DATA,w
           andlw   0x0F
           iorwf   CharSave,w      ;only affect upper nibble of LCD_DATA
           MOVWF   LCD_DATA        ; Send data to LCD
           BCF     LCD_CNTL,RS     ; Set LCD to command mode
           BSF     LCD_CNTL,E      ; toggle E for LCD
           BCF     LCD_CNTL,E
           SWAPF   CHAR,w
           ANDLW   0xF0            ; Get lower nibble
           movwf   CharSave
           movf    LCD_DATA,w
           andlw   0x0F
           iorwf   CharSave,w      ;only affect upper nibble of LCD_DATA
           MOVWF   LCD_DATA        ; Send data to LCD
           BSF     LCD_CNTL,E      ; toggle E for LCD
           BCF     LCD_CNTL,E
           return

;********************************************************************
; This routine clears the LCD display                               *
;********************************************************************
dispclear
       bcf   lcdcntrl,RS
       movlw   01h             ;clear lcd display
       call    SEND_CMD
       movlw   06h             ;set entry mode on lcd module
       call    SEND_CMD
       movlw   number_of_chars
       movwf   chcount
       bcf     flag,7

;********************************************************************
; This routine waits 12ms for erase ans write commands              *
;********************************************************************
lcd_wait
       movlw   .48
       movwf   count
wwait
       movlw   0ffh
       movwf   temp
wwait1
       decfsz  temp,f
       goto    wwait1
       decfsz  count,f
       goto    wwait
       retlw   0

;
LCD_Out                         ;put data at current cursor position on LCD
       call    SEND_CHAR
       decf    chcount,f
       retlw   0

set1st                          ;set display to display on the first line
       movlw   080h            ;address cursor to 1st position
       call    SEND_CMD
       movlw   number_of_chars ;reset character counter
       movwf   chcount
       bcf     flag,7          ;reset line flag
       retlw   0

set2nd                          ;set display to display on the second line
       movlw   0c0h            ;address cursor to 1st position 2nd line
       call    SEND_CMD
       movlw   number_of_chars ;reset character counter
       movwf   chcount
       bsf     flag,7          ;set line flag
       retlw   0

'C-compilers, LCD'
1997\02\06@121111 by jiri kuukasjarvi

flavicon
face
Hi!

         I have some questions:

       1. Does anyone know any free c-compilers for PIC`s?
          I use 16C84 and 16C924.

       2. How are LCD`s used? I have these 5 digit 7-segment
          LCD`s, and I would like to use them in my project,
          but the 16C924 doesn4t drive more than 31 or so
          segments with one common, and I need to control
          37 segments.
Bye!

-Jiri K.

1997\02\06@193800 by John Payson

picon face
>         1. Does anyone know any free c-compilers for PIC`s?
>            I use 16C84 and 16C924.

There is one called Pico-C, which was developed as someone's class project.
Limitted to 8 bit numeric types, however, and its generated code is really
pretty bad.  I'd recommend that you contact CCS, makers of the PCM compiler
for the 16Cxx (non-5x, non 12C50x) parts and the PCB compiler (for the 5x
and 12C508).  Their compilers are about $100 each and work pretty well, pro-
ducing much better code than the MPLABC compiler.

>         2. How are LCD`s used? I have these 5 digit 7-segment
>            LCD`s, and I would like to use them in my project,
>            but the 16C924 doesn4t drive more than 31 or so
>            segments with one common, and I need to control
>            37 segments.

The 16C924 allows you to multiplex LCD's one, two, three, or four ways, for
a total of 32, 62, 90, or 116 segments.  For your application, I would guess
your best bet would be a by-two multiplex arrangement.  In this arrangement,
the common wires for the first, third, and fifth digits would be wired to-
gether as would be those of the second and fourth.  The segment wires of the
first two digits would be wired together, as would those of the third and
fourth.

This is assuming, btw, that each display has one common wire and seven segment
wires.  Is this in fact how they are configured?

'16C924 and LCD'
1997\02\08@061719 by jiri kuukasjarvi

flavicon
face
John Payson wrote:
> >         2. How are LCD`s used? I have these 5 digit 7-segment
> >            LCD`s, and I would like to use them in my project,
> >            but the 16C924 doesn4t drive more than 31 or so
> >            segments with one common, and I need to control
> >            37 segments.
>
> The 16C924 allows you to multiplex LCD's one, two, three, or four ways, for
> a total of 32, 62, 90, or 116 segments.  For your application, I would guess
> your best bet would be a by-two multiplex arrangement.  In this arrangement,
> the common wires for the first, third, and fifth digits would be wired to-
> gether as would be those of the second and fourth.  The segment wires of the
> first two digits would be wired together, as would those of the third and
> fourth.
>
> This is assuming, btw, that each display has one common wire and seven segment
> wires.  Is this in fact how they are configured?

         No, that4s not the way here. One common and 39 segment pins in 40 pin
       package. I don4t need more than 36 segments in my current project.
       I guess I could minimize the use of segments to 31, but then
       I would need to use this display as 4 1/2 digit display, but I don4t
       want to do that (More digits = more accuracy).
         I called to our local Microchip distributor, and that salesman I
       spoke to told me aboat some arrangement where I connect some
       I/O - pins to Vcc and GND via a suitable resistor (to drop
       the voltage to 2.5 Volts. Then the control of LCD is done with the
       software. I don4t find that very handy..
         Well see.. I4ll try something first, but then I get lazy and do it the
       easy way..

'C-compilers, LCD'
1997\02\09@175720 by Robert Lunn

flavicon
face
>        2. How are LCD`s used? I have these 5 digit 7-segment
>           LCD`s, and I would like to use them in my project,
>           but the 16C924 doesn4t drive more than 31 or so
>           segments with one common, and I need to control
>           37 segments.

An easy way to add just a few extra segments is with XOR gates, but at
the cost of extra I/O lines.

Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
to common.  Tie the other input of each gate to a separate output pin
on the PIC.  Then connect the output of each gate to a display segment.

By setting the PIC output high/low you will drive the segment on/off.

It's usually easiest to use these extra outputs for the annunciators,
such as decimal point, 'low battery', etc.  This leaves the purely
numeric output to be handled by the standard LCD driver circuitry.
This tends to simplify the coding.

___Bob

1997\02\10@065331 by Jiri Kuukasjarvi

flavicon
face
On Mon, 10 Feb 1997, Robert Lunn wrote:

> >        2. How are LCD`s used? I have these 5 digit 7-segment
> >           LCD`s, and I would like to use them in my project,
> >           but the 16C924 doesn4t drive more than 31 or so
> >           segments with one common, and I need to control
> >           37 segments.
>
> An easy way to add just a few extra segments is with XOR gates, but at
> the cost of extra I/O lines.
>
> Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
> to common.  Tie the other input of each gate to a separate output pin
> on the PIC.  Then connect the output of each gate to a display segment.

       What aboat those special driving voltages that are needed in
       LCD? I haven«t yet done much research to know how LCD«s actually
       work, but I think the driver sends some kind of A.C. voltage.
       Wether it«s sine- or square wave, I don«t know..

> By setting the PIC output high/low you will drive the segment on/off.
>
> It's usually easiest to use these extra outputs for the annunciators,
> such as decimal point, 'low battery', etc.  This leaves the purely
> numeric output to be handled by the standard LCD driver circuitry.
> This tends to simplify the coding.

       Thanks

- Jiri K.

1997\02\10@102149 by John Payson

picon face
>       What aboat those special driving voltages that are needed in
>       LCD? I haven4t yet done much research to know how LCD4s actually
>       work, but I think the driver sends some kind of A.C. voltage.
>       Wether it4s sine- or square wave, I don4t know..

If you are not multiplexing LCD's, the driving waveform for a lit LCD segment
is simply a square wave that goes between [positive some voltage] and [nega-
tive some voltage], relative to the common terminal.  The simplest way to get
this is to drive the common wire with a 5-volt square wave and drive the seg-
ments either in-phase or out-of-phase.

If you are using a multiplexed display, it's desirable to be able to drive
segments with different voltage levels so as to eliminate "bleed-through"
effects; unlike an LED, an LCD does not act as a diode so you definitely
have to worry about balancing all the voltages on the matrix.  I'll write
more on this if you're interested, but I don't have time right now.

1997\02\10@121253 by jiri kuukasjarvi

flavicon
face
John Payson wrote:
>
> >       What aboat those special driving voltages that are needed in
> >       LCD? I haven4t yet done much research to know how LCD4s actually
> >       work, but I think the driver sends some kind of A.C. voltage.
> >       Wether it4s sine- or square wave, I don4t know..
>
> If you are not multiplexing LCD's, the driving waveform for a lit LCD segment
> is simply a square wave that goes between [positive some voltage] and [nega-
> tive some voltage], relative to the common terminal.  The simplest way to get
> this is to drive the common wire with a 5-volt square wave and drive the seg-
> ments either in-phase or out-of-phase.

         No, I4m not. I just have these 39 segment displays with 1 common,
       and I need to drive max. 37 segments with a pic that can control 32.
         Somebody suggested me to use XOR4s for this "extension", but that
       way I can4t get that negative side of voltage. The way he said was
       to connect one common to other input of XOR, and other input to
       PIC4s output pin. Then the XOR4s output goes to LCD4s input.
       I think I4ll try that tomorrow..

-Jiri K.

1997\02\10@202057 by Robert Lunn

flavicon
face
>> Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
>> to common.  Tie the other input of each gate to a separate output pin
>> on the PIC.  Then connect the output of each gate to a display segment.
>
>       What aboat those special driving voltages that are needed in
>       LCD? I haven«t yet done much research to know how LCD«s actually
>       work, but I think the driver sends some kind of A.C. voltage.
>       Wether it«s sine- or square wave, I don«t know..

The simple LCD that you are wanting to use is "static" (as distinct from
"multiplexed").  That is, you have a single 'common' or 'backplane' signal,
and one signal for each segment on the display.

For a static LCD you only need two drive voltages (also called "bias"
voltages).

Unless you have an unusual display, you will find that drive voltages of
+5/-5 volts gives very adequate performance.  Therefore, you can simply
use your standard logic power rail to drive the LCD (don't worry, you'll
see where the -5V comes from soon).

There is then the question of the voltage WAVEFORM to use.  As you correctly
state, you must use an AC waveform to drive the display.  If you apply a DC
voltage across a liquid crystal you very quickly destroy the crystal.  To
avoid this, the applied voltage must be reversed frequently.

Let's look at a _single_ segment on the LCD.  The liquid crystal is sand-
wiched between two sheets of glass, and on each sheet of glass is a trans-
parent metal electrode.  The bottom electrode is connected to 'backplane'
and the top electrode is connected to the 'segment' pin.

Apply the following waveforms to each pin:

           ----      ----      ----      ----
        ____|    |____|    |____|    |____|    |____   common

      ----      ----      ----      ----      ----
       |    |____|    |____|    |____|    |____|               segment

                  ^    ^
                  |    |
                 one  two

Assume that the high voltage is +5V, and the low voltage is 0V.  At point
'one' the segment electrode is +5V relative to the common electrode.  At
point 'two' the segment electrode is -5V relative to the common electrode.
This causes the liquid crystal at this segment to appear opaque.

Note that the voltage continuously reverses.  This prevents the crystal
>from breaking down.  The _average_ DC voltage across the segment is very
nearly zero.  For 'typical' static LCD's the waveform frequency should be
between 60Hz and 120Hz approximately.

To turn the segment off (transparent) simply invert the segment signal.
The voltage across the liquid crystal is now always zero.

Now presumably you already have an LCD driver chip, but it doesn't have
enough segment drive pins for your purpose.  The driver chip will produce
the 'backplane' signal for you, and this signal is simply the square wave
shown above (look at it with an oscilloscope).

To drive an _additional_ segment pin you only need to connect to it the
backplane signal (to turn the segment off), or the backplane signal
inverted (to turn the segment on).  That is, you want a logic element
which either GATES its input to its output, or INVERTS its input to its
output, based on the state of a CONTROL pin.

Such a logic element is simply an XOR gate.

Just in case you _don't_ have an LCD driver chip, you will find the
MM145453 from Motorola is very easy to use.  Phillips also have some
I2C interfaced LCD driver chips.

___Bob

'HD44780 LCD and C'
1997\02\11@193853 by Barry Carter

flavicon
picon face
I am learning the PIC so please bear with me.
I have constructed a LCD module with A pic 16c84 as the LCD
controller. I have run accross a small problem with the c
source/compiler. I am currently using the MPLABC beta program, and I
tested out the LCD example with my built module. Everything went
fine, but when I tried to add some more strings to be sent to the
LCD, the compiler reported "OUT OF ROM SPACE". the compiled hex  file
for the example is only 25% of the pic memory, so adding a few lines
to the code should not make a difference. does it have something to
do wth the fact that the compiler only does up to 256 locations, and
if so when I tried to compile it on the byte craft compiler I got the
same error. Is it the c program, or the beta programs? Please help.

1997\02\11@204332 by Stanley Koontz

flavicon
face
Here's my guess. The 16c84 has a 8 register deep stack. So if in your
subroutines you have more than 8 nested loops that could be what the
complier pukes on.

Just a thought.

Stanley Koontz
RemoveMEstushRemoveMEspamsgi.net

1997\02\11@204532 by Walter Banks

picon face
Barry Carter wrote:
>
> I am learning the PIC so please bear with me.
> I have constructed a LCD module with A pic 16c84 as the LCD
> controller. I have run accross a small problem with the c
> source/compiler. I am currently using the MPLABC beta program, and I
> tested out the LCD example with my built module. Everything went
> fine, but when I tried to add some more strings to be sent to the
> LCD, the compiler reported "OUT OF ROM SPACE". the compiled hex  file
> for the example is only 25% of the pic memory, so adding a few lines
> to the code should not make a difference. does it have something to
> do wth the fact that the compiler only does up to 256 locations, and
> if so when I tried to compile it on the byte craft compiler I got the
> same error. Is it the c program, or the beta programs? Please help.


Could you send me the source youi are using and I'll sort out
what is happening. Also which compiler are you using the demo
or release compiler.


Walter Banks
http://www.bytecraft.com

1997\02\11@211412 by Walter Banks

picon face
Barry Carter wrote:
>
> I am learning the PIC so please bear with me.
> I have constructed a LCD module with A pic 16c84 as the LCD
> controller. I have run accross a small problem with the c
> source/compiler. I am currently using the MPLABC beta program, and I
> tested out the LCD example with my built module. Everything went
> fine, but when I tried to add some more strings to be sent to the
> LCD, the compiler reported "OUT OF ROM SPACE". the compiled hex  file
> for the example is only 25% of the pic memory, so adding a few lines
> to the code should not make a difference. does it have something to
> do wth the fact that the compiler only does up to 256 locations, and
> if so when I tried to compile it on the byte craft compiler I got the
> same error. Is it the c program, or the beta programs? Please help.



Could you send me the source youi are using and I'll sort out
what is happening. Also which Byte Craft compiler are you using
the demo or release compiler.


Walter Banks
http://www.bytecraft.com

'LCD'
1997\02\14@022238 by David BALDWIN

flavicon
face
Subject:
          Re: PIC and LM016 display problem
    Date:
          Thu, 13 Feb 1997 18:47:00 +0000
    From:
          Leon Heller <KILLspamleon.....spamKILLspamlfheller.demon.co.uk>
Reply-To:
          Leon Heller <lfhellerspam_OUTspamspam_OUTlfheller.demon.co.uk>
      To:
          David BALDWIN <KILLspamdbspam@spam@sdm.bel.alcatel.be>


In message <@spam@3302DBF2.41C67EA6RemoveMEspamsdm.bel.alcatel.be>, David BALDWIN
<db@spam@spamEraseMEsdm.bel.alcatel.be> writes
>Leon Heller wrote:
>>
>> I've interfaced a PIC16C84 to a LM016 2 X 16 LCD display, using Norm
>> Cramer's lcd.asm code (which was intended for a LM032 2 X 20 display). I
>> can't get more than nine characters displayed on either of the two
>> lines, using Norm's table message storage. Has anyone got any idea what
>> is causing the problem? The two displays should be identical in terms of
>> the driver code, apart from the line length, shouldn't they?

Your response seems to have disappeared for some reason! Yes, I would
appreciate a copy of your code.

Leon
--
Leon Heller, G1HSM
spam_OUTleonspam_OUTspamRemoveMElfheller.demon.co.uk
Tel: +44 (0) 118 947 1424 (home)
    +44 (0) 1344 385556 (work)


       Ok, I'll send it to you tomorrow because I am at my office
today and doesn't have my soft here ;-)
--

   _____________
   \           /                   David BALDWIN
    \ ALCATEL /                   Design engineer
     \TELECOM/
      \     /            SdM (Societe de Microelectronique)
       \   /
        \ /         B.P. 4205            Phone  : +32 (0)71 442932
         V          B-6000 Charleroi     Fax    : +32 (0)71 442905
                    (Belgium)            E-mail : RemoveMEdbspam.....sdm.bel.alcatel.be
                                                  spambaldwin@spam@spamsdta.sdt.alcatel.be

'LCD and clock'
1997\02\14@040737 by David BALDWIN

flavicon
face
Peter Grey wrote:
{Quote hidden}

.....baldwinspamTakeThisOuTsdta.sdt.alcatel.be
> >
> >
> Peter Grey
> Neosystems
> Australia

--
       Peter, I am using 2x16 LCD to display the time, amongst
other "things". So, if an interrupt occurs when I am writing to
the LCD could be a problem, no?

1997\02\14@200533 by Peter Grey

picon face
At 10:05 AM 14/02/97 +0100, you wrote:
David,

could you give more details on what you are trying to do and I am sure there
will be a way to proceed.




SNIP
>> >2x16 LCD. The problem is that I would also do some other
SNIP
>
>--
>        Peter, I am using 2x16 LCD to display the time, amongst
>other "things". So, if an interrupt occurs when I am writing to
>the LCD could be a problem, no?
>
All the best,
Peter Grey
Neosystems
Australia

'LCD module identification'
1997\02\16@204301 by ermott

flavicon
face
Hello PIClist people,

Having figured out how to get my 16C84 to read switches and turn on
LED's I've decided to try something a little more challenging.

The Microchip application note AN587 describes interfacing a PIC 16Cxx
to the Hitachi LM032L LCD display.  After digging through my "stuff"
in the basement I came up with a completedly undocumented LCD module
that has LM052L printed on the edge of the circuit board.  Does
anybody know if this device differs significantly from the LM032L?

Thanks for listening,

Andrew

'LCD module identification -Reply'
1997\02\16@230800 by Chee Foon Tiang

flavicon
face
What is the LCD controller (check the number on the IC)
used in these module ?

If they are the same, then they are most likely the same,
except for the mapping of the DD RAMs and the actual display.

{Quote hidden}

1997\02\17@061022 by F NPL, 2227

flavicon
face
Andrew McDermott wrote:

>The Microchip application note AN587 describes interfacing a PIC 16Cxx
>to the Hitachi LM032L LCD display.  After digging through my "stuff"
>in the basement I came up with a completedly undocumented LCD module
>that has LM052L printed on the edge of the circuit board.  Does
>anybody know if this device differs significantly from the LM032L?

LM052L is a 16char x 2 line display, whereas
LM032L is a 20char x 2 line display.

Otherwise they're identical (according to the data sheets I have)

    Any problems, just shout,

            Steve Lawther

*** Opinions are mine, not my employers nor my clients ***
web page:-
 ourworld.compuserve.com/homepages/steve_lawther/

'Graphical LCDs'
1997\02\18@152735 by Richard G. Thomas

picon face
Hi

has anyone any experience with Hitachi graphical LCDs based on a HD61830B
controller, specifically a LMG7400?

At the moment we are trying to control it via a PC I/O card because we
thought it would be easier to do this rather than go straight to a PIC.

I'm sure I've used a similar screen with a 6502 but can't find the
program :-(

----------------------------------------------------------------------------
| Richard Thomas                                          Computer Officer |
| Department of Design,                                                    |
| Brunel University,  Runnymede,  Egham,  TW20 0JZ,  UK.                   |
| EraseMERichard.ThomasspamKILLspambrunel.ac.uk                  phone:  01784  431341  x267 |
----------------------------------------------------------------------------

'Powertip LCD Display problem (HD44780 controller)'
1997\02\19@113903 by Jim Main

flavicon
picon face
I'm trying to interface a 16C74 to one of these modules (using 8 bit
wide data).

The problem is that only the first 8 characters are displayed (it's a
16X1 display) and I don't understand why..

I thought it was a fault at first, but another module does exactly the
same - any thoughts??

Jim
--
Jim Main
jimEraseMEspamewcomm.demon.co.uk
Visit Eastwood Communications at http://www.ewcomm.demon.co.uk
Broadcast Electronics & Custom Design

1997\02\19@120228 by myke predko

flavicon
face
Jim,

I suspect you have a 16x1 that is electrically set up as an 8x2.

Keep writing to the LCD, More character should start showing up after you've
sent 0x040 (64d) characters.

myke
{Quote hidden}

"I don't do anything that anybody else in good physical condition and
unlimited funds couldn't do" - Bruce Wayne

1997\02\19@165617 by Andy Kunz

flavicon
face
At 04:32 PM 2/19/97 +0000, you wrote:
>I'm trying to interface a 16C74 to one of these modules (using 8 bit
>wide data).
>
>The problem is that only the first 8 characters are displayed (it's a
>16X1 display) and I don't understand why..
>
>I thought it was a fault at first, but another module does exactly the
>same - any thoughts??

Jim,

The address of the second half of the display is as if it were starting on
Line 2, Column 0.

That's just the way it is wired.

Nice part is that if you ever go to a 8x2 display, you don't need to change
anything except maybe to make it prettier.

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\02\19@191314 by Jim Main

flavicon
picon face
>I suspect you have a 16x1 that is electrically set up as an 8x2.
>
>Keep writing to the LCD, More character should start showing up after you've
>sent 0x040 (64d) characters.
>
>myke

You were right - the second chunk of 8 characters started at 28h - takes
away a lot of the flexibility - I'd thought of scrolling the display
window over the 80 char ram memory to get a moving message display - but
the fragmentation makes that a little bit of a handful.

shame the data sheet didn't mention any of this!!

thanks again

jim
--
Jim Main
TakeThisOuTjimspamTakeThisOuTewcomm.demon.co.uk
Visit Eastwood Communications at http://www.ewcomm.demon.co.uk
Broadcast Electronics & Custom Design

1997\02\19@204328 by Andy Kunz

flavicon
face
>You were right - the second chunk of 8 characters started at 28h - takes
>away a lot of the flexibility - I'd thought of scrolling the display
>window over the 80 char ram memory to get a moving message display - but
>the fragmentation makes that a little bit of a handful.

You can still scroll a message very simply.  Try the attached C code (CCS).
You could
also use the display offset address command (0001sr--, where s=1 causes
display shift, r=1 causes it to shift right) to shift what appears in the
window.

>shame the data sheet didn't mention any of this!!

It probably did.  It's the standard.

Andy

=======================  File T2.C =======================
#include <T2.H>
#include <LCD.C>        // Uses the CCS LCD.C file which I fixed to work on
better
                       // pin choice layout.

Marquee_LCD (char s[32], byte size)
       {
       byte    left, right, i, leftpos;
       byte    cleft, cright;

       leftpos = 0;
       right = 0;

       while (right < size+16)
               {
               left=leftpos++;
               right=left+8;

               for (i=0; i<8; i++)
                       {
                       if (left < size)
                               cleft = s[left];
                       else
                               cleft = ' ';
                       if (right < size)
                               cright = s[right];
                       else
                               cright = ' ';
                       lcd_gotoxy (i+1,1);
                       lcd_putc (cleft);
                       lcd_gotoxy (i+1,2);
                       lcd_putc (cright);
                       left++;
                       right++;
                       }
               if (leftpos == 1)
                       delay_ms (1000);
               delay_ms (300);
               }
       }

main()
       {

       char testmsg[38]= "This is a test of the scroll function";

       setup_counters(RTCC_INTERNAL,WDT_18MS);
       setup_port_a(RA0_RA1_ANALOG_RA3_REF);
       setup_adc(ADC_CLOCK_DIV_8);
       port_b_pullups(TRUE);
       lcd_init();

       lcd_gotoxy (1,1);
       lcd_putc ("Montana ");
       lcd_gotoxy (1,2);
       lcd_putc (" Design ");

       delay_ms (2000);

       Marquee_LCD (testmsg,37);

       lcd_gotoxy (1,1);
       lcd_putc ("Montana ");
       lcd_gotoxy (1,2);
       lcd_putc (" Design ");

       while (TRUE);

       }
=======================  File T2.H =======================
#device PIC16C73A
#use delay(clock=4000000)
#nolist
/////////////////////////////// I/O definitions for INPUT() and OUTPUT_xxx()
#define PIN_A0  0
#define PIN_A1  1
#define ROW2  42
#define PIN_A3  3
#define PIEZO  44
#define ROW1  45
#use fixed_io(A_OUTPUTS=PIEZO)
#byte port_A=5

#define   48
#define COL0  53
#define COL1  54
#define COL2  55
#byte port_B=6

#define PIN_C0  56
#define RX_IN  57
#define SX_OUT  58
#define PIN_C3  59
#define EEPROM_SCL  59
#define PIN_C4  60
#define EEPROM_SDA  60
#define PIN_C5  61
#define TX  62
#define RX  63
#use fixed_io(C_OUTPUTS=SX_OUT,TX)
#byte port_C=7

#use rs232(baud=4800 ,xmit=TX,rcv=RX)

#use i2c(master,sda=PIN_C4,scl=PIN_C3)

/////////////////////////////// Useful defines
#define FALSE 0
#define TRUE 1

#define BYTE int
#define BOOLEAN short int

#define getc getch
#define getchar getch
#define puts(s) {printf(s); putchar(13); putchar(10);}
#define putc putchar

/////////////////////////////// Constants used for RESTART_CAUSE()
#define WDT_FROM_SLEEP  0
#define WDT_TIMEOUT     8
#define MCLR_FROM_SLEEP 16
#define NORMAL_POWER_UP 24
/////////////////////////////// Constants used for SETUP_COUNTERS()
#define RTCC_INTERNAL   0
#define RTCC_EXT_L_TO_H 32
#define RTCC_EXT_H_TO_L 48
#define RTCC_DIV_2      0
#define RTCC_DIV_4      1
#define RTCC_DIV_8      2
#define RTCC_DIV_16     3
#define RTCC_DIV_32     4
#define RTCC_DIV_64     5
#define RTCC_DIV_128    6
#define RTCC_DIV_256    7
#define WDT_18MS        8
#define WDT_36MS        9
#define WDT_72MS       10
#define WDT_144MS      11
#define WDT_288MS      12
#define WDT_576MS      13
#define WDT_1152MS     14
#define WDT_2304MS     15
#define L_TO_H              0x40
#define H_TO_L                 0

#define RTCC_ZERO           0x0B20    // Used for ENABLE/DISABLE INTERRUPTS
#define RB_CHANGE           0x0B08    // Used for ENABLE/DISABLE INTERRUPTS
#define EXT_INT             0x0B10    // Used for ENABLE/DISABLE INTERRUPTS
#define GLOBAL              0x0BC0    // Used for ENABLE/DISABLE INTERRUPTS

///////////////////////////////////// Constants used for Timer1 and Timer2
#define T1_DISABLED         0
#define T1_INTERNAL         5
#define T1_EXTERNAL         7
#define T1_EXTERNAL_SYNC    3
#define T1_CLK_OUT          8
#define T1_DIV_BY_1         0
#define T1_DIV_BY_2         0x10
#define T1_DIV_BY_4         0x20
#define T1_DIV_BY_8         0x30
#byte   TIMER_1_LOW=        0x0e
#byte   TIMER_1_HIGH=       0x0f
#define T2_DISABLED         0
#define T2_DIV_BY_1         4
#define T2_DIV_BY_4         5
#define T2_DIV_BY_16        6
#byte   TIMER_2=            0x11

#define INT_TIMER1          0x8C01    // Used for ENABLE/DISABLE INTERRUPTS
#define INT_TIMER2          0x8C02    // Used for ENABLE/DISABLE INTERRUPTS

//////////////////////////////////// Constants used for SETUP_CCP1()
#define CCP_OFF                         0
#define CCP_CAPTURE_FE                  4
#define CCP_CAPTURE_RE                  5
#define CCP_CAPTURE_DIV_4               6
#define CCP_CAPTURE_DIV_16              7
#define CCP_COMPARE_SET_ON_MATCH        8
#define CCP_COMPARE_CLR_ON_MATCH        9
#define CCP_COMPARE_INT                 0xA
#define CCP_COMPARE_RESET_TIMER         0xB
#define CCP_PWM                         0xC
#define CCP_PWM_PLUS_1                  0x1c
#define CCP_PWM_PLUS_2                  0x2c
#define CCP_PWM_PLUS_3                  0x3c
#byte   CCP_1_LOW=                      0x15
#byte   CCP_1_HIGH=                     0x16

#define INT_CCP1            0x8C04    // Used for ENABLE/DISABLE INTERRUPTS

//////////////////////////////////// Constants used for SETUP_CCP2()
#byte   CCP_2_LOW=                      0x1B
#byte   CCP_2_HIGH=                     0x1C
#define INT_CCP2            0x8D01    // Used for ENABLE/DISABLE INTERRUPTS

//////////////////////////////////// Constants used in SETUP_SSP()
#define SPI_MASTER       0x20
#define SPI_SLAVE        0x24
#define SPI_L_TO_H       0
#define SPI_H_TO_L       0x10
#define SPI_CLK_DIV_4    0
#define SPI_CLK_DIV_16   1
#define SPI_CLK_DIV_64   2
#define SPI_CLK_T2       3
#define SPI_SS_DISABLED  1
#define INT_SSP             0x8C08    // Used for ENABLE/DISABLE INTERRUPTS

#define INT_SSP             0x8C08    // Used for ENABLE/DISABLE INTERRUPTS

#define INT_RDA             0x8C20    // Used for ENABLE/DISABLE INTERRUPTS
#define INT_TBE             0x8C10    // Used for ENABLE/DISABLE INTERRUPTS

///////////////////////////////////// Constants used for SETUP_ADC()
#define ALL_ANALOG             0
#define ANALOG_RA3_REF         1
#define RA0_RA1_RA3_ANALOG     4
#define RA0_RA1_ANALOG_RA3_REF 5
#define NO_ANALOGS             6
#define ADC_OFF                0
#define ADC_CLOCK_DIV_2        1
#define ADC_CLOCK_DIV_8     0x41
#define ADC_CLOCK_DIV_32    0x81
#define ADC_CLOCK_INTERNAL  0xc1

#define ADC_DONE            0x8C40    // Used for ENABLE/DISABLE INTERRUPTS

#list
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\02\19@221132 by John Payson

picon face
> >You were right - the second chunk of 8 characters started at 28h - takes
> >away a lot of the flexibility - I'd thought of scrolling the display
> >window over the 80 char ram memory to get a moving message display - but
> >the fragmentation makes that a little bit of a handful.
>
> >shame the data sheet didn't mention any of this!!
>
> It probably did.  It's the standard.

I just got the 16x1 display sold by Radio Shack (at $24.95 it's a bit pricey,
but the catalog picture suggested it was encased nicely.  The actual unit
meets that expectation.  Perhaps the extra $15 (versus Timeline's prices on
such things) is a bit much for a bit of plastic, but anyway, it looks pretty
nice.

Anyhow, the data sheet with the display does not seem to mention the split
addressing, even though from the "block diagram" it's clear that that's how
the thing works.  So I would not be surprised if other people with 16x1
displays are in the same boat.  It seems the prices for "true" 16x1 displays
that are in fact wired as such (for 1/8 duty cycle drive) are more than the
prices for 16x2 displays, so the split addressing should probably be in any
type of LCD-related FAQ.

'Olivetti M10 LCD'
1997\02\19@233814 by tjaart

flavicon
face
Hi all!

I discovered an old Olivetti M10 in my junkbox the other day. It has
a massive LCD (I think 8*40) that I can't wait to fire up. Problem is,
I can't figure out the pinouts. It uses the standard Hitachi chips, but
has (If I recall correctly) about 33 lines.

1) Has anyone played with it before?
2) Is there a standard way of creating a 8*40 LCD

I don't want your code, just the pin functions :-)

--
Friendly Regards

Tjaart van der Walt
tjaartspamspam_OUTwasp.co.za
_____________________________________________________________
| Another sun-deprived R&D Engineer slaving away in a dungeon |
|             ASP International  http://wasp.co.za            |
|             GSM and GPS value-added applications            |
|  Voice : +27-(0)11-622-8686   |   Fax : +27-(0)11-622-8686  |
|_____________________________________________________________|

'Powertip LCD Display problem (HD44780 controller)'
1997\02\20@044558 by Jim Main

flavicon
picon face
In article <spam199702200258.UAA28055@spam@spamJupiter.Mcs.Net>, John Payson
<spam_OUTsupercatTakeThisOuTspamKILLspamMCS.NET> writes

>I just got the 16x1 display sold by Radio Shack (at $24.95 it's a bit pricey,
>but the catalog picture suggested it was encased nicely.  The actual unit
>meets that expectation.  Perhaps the extra $15 (versus Timeline's prices on
>such things) is a bit much for a bit of plastic, but anyway, it looks pretty
>nice.

I paid 35 (about $52) for my 16x1 display (and that was a 'new low cost
alternative') - although it does have LED backlighting..

The Sanyo version would have been the equivalent of around $80  (!)
>
>the split addressing should probably be in any
>type of LCD-related FAQ.

absolutely - I read a couple of faqs & neither mentioned the split
addressing

Jim

--
Jim Main
RemoveMEjim@spam@spamspamewcomm.demon.co.uk
Visit Eastwood Communications at http://www.ewcomm.demon.co.uk
Broadcast Electronics & Custom Design

1997\02\20@045220 by Jim Main

flavicon
picon face
In article <RemoveME1.5.4.32.19970220014422.006a1d38RemoveMEspamTakeThisOuTpop.fast.net>, Andy Kunz
<montanaTakeThisOuTspam@spam@FAST.NET> writes
>>shame the data sheet didn't mention any of this!!
>
>It probably did.  It's the standard.
>
>Andy

no - it definitely didn't - I went through it over & over (it was a
generic data sheet for about 6 or 7 displays in the range)  I also had a
look at a data sheet for a Sanyo equivalent and it didn't mention it -
so I think I can be forgiven!

thanks for the c code - do you find c saves you a lot of time when
programming the PIC - or is it not a bit loose in compiled code size??

bye for now

jim

--
Jim Main
jimTakeThisOuTspamspamBeGoneewcomm.demon.co.uk
Visit Eastwood Communications at http://www.ewcomm.demon.co.uk
Broadcast Electronics & Custom Design

1997\02\20@051828 by Andy Kunz

flavicon
face
>I just got the 16x1 display sold by Radio Shack (at $24.95 it's a bit pricey,
>but the catalog picture suggested it was encased nicely.  The actual unit
>meets that expectation.  Perhaps the extra $15 (versus Timeline's prices on
>such things) is a bit much for a bit of plastic, but anyway, it looks pretty
>nice.

Try the Optrex units from Digi-Key.

I use Hantronix myself, as they are half the Optrex price in smaller
quantities.  Same glass and controller, though.

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\02\20@054358 by Andy Kunz

flavicon
face
>no - it definitely didn't - I went through it over & over (it was a
>generic data sheet for about 6 or 7 displays in the range)  I also had a
>look at a data sheet for a Sanyo equivalent and it didn't mention it -
>so I think I can be forgiven!

You are forgiven, Jim.  Guess I'm spoiled by Optrex and Hantronix documentation.

Somebody commented on power-up timing.  That's a good point to consider.
Can you power it up, then hit the reset button and see if it works.  If so,
that's probably the culprit.

>thanks for the c code - do you find c saves you a lot of time when
>programming the PIC - or is it not a bit loose in compiled code size??

C has its place.  When a customer wants to see if something will do what
they want, it's very easy to code up something quick in C.  He can start
selling it, but it costs money because I frequently start with a bigger chip
then.  (It's also an incentive for him to come back to me for more work <G>).

After he's sold a few, he has me do Version 2 in assembly to cut mfg costs
(cheaper chip).

Sometimes it just doesn't matter.  The example I sent you is still coded
mostly in C (I had to write 16-bit decimal display (CCS doesn't have one
that works) and ISRs in assembly for speed).  It was based on a '73 because
that chip has the A/D and PWM output (1uS resolution) that I needed.  Lots
of code space.  I could have used a '71 or '72, but then the PWM resolution
would suffer.

The CCS stuff is OK.  Definitely better than ByteCraft/Microchip.  Still
very buggy, though.  (I often have to proofread the assembly to look for
errors).

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

1997\02\20@115700 by John Dammeyer

flavicon
face
At 05:44 AM 20/02/1997 -0500, you wrote:
[snip]

>The CCS stuff is OK.  Definitely better than ByteCraft/Microchip.  Still
>very buggy, though.  (I often have to proofread the assembly to look for
>errors).
>
>Andy

So Andy,  you have used the MPC from Bytecraft as well as the MPLAB-C correct?

When I make comments about the MPLAB-C I try my best to qualify them with
Version numbers.  So many of the compiler writers are trying their best to
repair their products and version numbers are the way to keep score.  My
complaints with MPLAB-C stem from version #1.10 and yes,  you have to walk
through the code to verify it generated correct assembler.  At some point I
quit that futile effort after it wouldn't generate the correct code.

As for Bytecraft, they manufacture MPC Ver #1.20c which does _not_ require
walking through the code at all.  When I do examine the code it's to figure
out how to rewrite the C to recover some program space or check timing.  The
only time I needed to walk through resulted in the change from 1.20b to
1.20c in 1/2 a day from Bytecraft.  OTOH,  it took 4 weeks to receive a
reply from Microchip on a bug in MPLAB-C 1.10.  Didn't matter by then,  I
had already purchased MPC.

Similarily with your comments about CCS and proofreading.  Which version?
I'm sure Clyde would like to know.

Regards,

John


Pioneers are the ones, face down in the mud,
with arrows in their backs.
Automation Artisans Inc.      Ph. 1-250-544-4950
PO Box 20002                  Fax 1-250-544-4954
Sidney, BC CANADA V8L 5C9

1997\02\20@161602 by Andy Kunz

flavicon
face
>Similarily with your comments about CCS and proofreading.  Which version?
>I'm sure Clyde would like to know.

John,

CCS C versions:
       2.250, 2.256, 2.262, 2.264, 2.268, 2.271

These versions span the time from 12/13/96 to 2/14/97 (the dates I
downloaded them, anyway).  21 versions in about 63 days works out to a
release every 3 days on average.  Does that sound like stable software to you?

Version 2.268 is what I'm using now, because a feature I was utilizing in it
was broken in v2.271.  And it was done on-purpose, can you believe that!?!?!
I have reported the problem to CCS several days ago, but there has been no
reply since then.  I see myself as an unpaid (actually, PAYING) beta-tester,
so I feel mildly screwed.  But I have to admit, it's definitely the better
product.

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

'Hantronix LCD'
1997\02\20@161605 by Andy Kunz

flavicon
face
The url is

http://ww.hantronix.com

or spaminfoTakeThisOuTspamhantronix.com

Andy
==================================================================
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
         Hardware & Software for Industry & R/C Hobbies
       "Go fast, turn right, and keep the wet side down!"
==================================================================

'Compiler Version Numbers (was: "Re: Powertip LCD D'
1997\02\20@180331 by Andrew Warren

face
flavicon
face
John Dammeyer <.....PICLISTspamspamBeGoneMITVMA.MIT.EDU> wrote:

> When I make comments about the MPLAB-C I try my best to qualify them
> with Version numbers.  So many of the compiler writers are trying
> their best to repair their products and version numbers are the way
> to keep score.

   Good point.  By the way, CCS is a prime offender in this regard;
   the "Compiler Comparison" page on their web site compares their
   compiler to a VERY old version of MPC.

   A number of people have asked them to update that page, but CCS
   apparently believe that it wouldn't serve their interests to do
   so, since (at least, the last time I checked) they haven't yet
   gotten around to it.

   -Andy

=== Andrew Warren - .....fastfwdTakeThisOuTspamEraseMEix.netcom.com
=== Fast Forward Engineering, Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\02\21@171343 by ccs

flavicon
face
Andrew Warren wrote:
>
> John Dammeyer <RemoveMEPICLISTspamspamKILLspamMITVMA.MIT.EDU> wrote:
>
> > When I make comments about the MPLAB-C I try my best to qualify them
> > with Version numbers.  So many of the compiler writers are trying
> > their best to repair their products and version numbers are the way
> > to keep score.
>
>     Good point.  By the way, CCS is a prime offender in this regard;
>     the "Compiler Comparison" page on their web site compares their
>     compiler to a VERY old version of MPC.
>
>     A number of people have asked them to update that page, but CCS
>     apparently believe that it wouldn't serve their interests to do
>     so, since (at least, the last time I checked) they haven't yet
>     gotten around to it.

       We are quite aware of the age of our comparison.  We do have
several customers working on that comparison so it will be current.
anybody that asks me about the page I tell me that it is comparing
the older version of the compiler.  You can also note that it does not
cover Microchip's compiler, just the ByteCraft compiler.  This also will
soon be changed.

       I will change our web page today to reflect that this is an old
version of the comparison and to look for a new one soon.

Thanks

Cheryl
--
Custom Computer Services, Inc
PO Box 2452, Brookfield WI 53008
(414)781-2794 or FAX (414)781-3241
http://www.execpc.com/~ccs
STOPspamccsEraseMEspamexecpc.com

1997\02\21@172559 by Andrew Warren

face
flavicon
face
ccs <PICLISTspamBeGonespamMITVMA.MIT.EDU> wrote:

> I will change our web page today to reflect that this is an old
> version of the comparison and to look for a new one soon.

   Thanks, Cheryl.

   -Andy

=== Andrew Warren - fastfwd@spam@spamix.netcom.com
=== Fast Forward Engineering, Vista, California
=== http://www.geocities.com/SiliconValley/2499

'ISProgramming with LCD Problem'
1997\02\25@121756 by Bernd.S

flavicon
face
I use a PIC16C84 , a 2 x 20 character display (LM032XMBL with LSI HD44780
Controller) for my circuit with the JDM84 PIC programmer:
<http://www.gbar.dtu.dk/~c888600/newpic.htm> with in Circuit Programming.

The PINAPI Driver of my programmer gives "Programmer not found at COM1" when i
use it with a Display data bus pin connected to RB7 = DATA for programming.
Without this connection, but with all other: no problem! (Connect: RB1: RS, RB2:
E,
RB3: R/W, RB4: DB4, RB5: DB5, RB6: DB6, RB7: DB7. The RB4 to RB7 are in
addition to momentary switches connected, which are usually open circuit.)

Does someone know WHY? Has someone got this problen, too and solved it?
And what i can DO easily (resistor?) to make this work? Has the display
INTERNAL pull ups or pull downs?

Is this triple usage dangerous for the display? (if no data transfer happens, E
= Low
then RB4 to RB7 will be used with PIC internal pull ups as function keys which
are pulled down at keypress with Interrupt on change).

All sorts of suggestions are much appreciated
      Bernd

Display limited to first 300 matches. Add keywords to narrow the result set or browse by year:
- In 1997 , 1998 only
- Today
- New search...