Searching \ for '[EE]: LCD operation Q's...' 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 operation Q's...'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: LCD operation Q's...'
2002\10\01@025726 by Pic Dude

flavicon
face
First time using an LCD (Jameco/Ampire 2x16 unit), and just
experimenting a bit for now.  If you're curious, datasheet
is at: https://www.jameco.com/Jameco/Products/ProdDS/171715.pdf

I'm controlling the LCD manually (for now) with 11 DIP switches.
Sounds painful I know, but it's not that bad... if it works.
Which it doesn't exactly.

For each bit-combo. I setup the bits with enable set LOW, then
toggle enable to HIGH and back to LOW.  First I ran though the
initialization sequence this way, then set DDRAM to address 0,
then wrote data LLHHLLHH to the RAM.  What I get is the char
'3' display, but on the first 6 character positions.  If I
toggle the enable to HIGH and back to LOW again, it writes '3'
in the next 6 or so positions.

That's odd.  Anyone know why?  My guess is that I'm missing
something fundamental on the operation of LCD's, and the
datasheet is not exactly as well detailed as, say, a Microchip
datasheet.

Another Q... I guess CG stands for character generator, but
why is there an operation to write to CG RAM?  What's the
purpose of that?  Can I create my own fonts or something?

Thanks,
-Neil.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@040150 by Pic Mailingliste

picon face
Hi Neil,


PD> First time using an LCD (Jameco/Ampire 2x16 unit), and just
PD> experimenting a bit for now.  If you're curious, datasheet
PD> is at: https://www.jameco.com/Jameco/Products/ProdDS/171715.pdf

PD> I'm controlling the LCD manually (for now) with 11 DIP switches.
PD> Sounds painful I know, but it's not that bad... if it works.
PD> Which it doesn't exactly.

PD> For each bit-combo. I setup the bits with enable set LOW, then
PD> toggle enable to HIGH and back to LOW.  First I ran though the
PD> initialization sequence this way, then set DDRAM to address 0,
PD> then wrote data LLHHLLHH to the RAM.  What I get is the char
PD> '3' display, but on the first 6 character positions.  If I
PD> toggle the enable to HIGH and back to LOW again, it writes '3'
PD> in the next 6 or so positions.

PD> That's odd.  Anyone know why?  My guess is that I'm missing
PD> something fundamental on the operation of LCD's, and the
PD> datasheet is not exactly as well detailed as, say, a Microchip
PD> datasheet.

Well my guess would be that you're not missing something on the
operation of the LCD's, but in the operation of a switch ... did you
debounce the switches ?? If not you'll have to do that, because a
switch does not switch a signal digital !


  _   _   _____________________
__| |_| |_|
 ^
 - Switch set to high, followed by bouncing an finally signal is
   stable high

PD> Another Q... I guess CG stands for character generator, but
PD> why is there an operation to write to CG RAM?  What's the
PD> purpose of that?  Can I create my own fonts or something?

Hmm only had a short look at the datasheet and I don't know the
KS0066U-controller, but if it's compatible to the Hitachi HD 44780 the
answer to your question is yes, you can create at least some
characters on your own.

Greets,
      Michael

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@075922 by Olin Lathrop

face picon face
> I'm controlling the LCD manually (for now) with 11 DIP switches.

Bad idea.

Mechanical switches will bounce so that one on or off transition looks like
many to the LCD.  You could have the switches go into a PIC that debounces
them, then drives the LCD.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@075934 by Jinx

face picon face
Just curious - why are you using switches instead of a micro ?
Is it a 60s revival thing ?

> Another Q... I guess CG stands for character generator, but
> why is there an operation to write to CG RAM?  What's the
> purpose of that?  Can I create my own fonts or something?

Yes, there are normally 8 characters (ASCII 00 to 07) that can
be drawn with your own data. For example I use this set of data
to define 00 as a +/- sign

        movlw   0x40         ;set LCD address to CG 00
        call    write_c         ;write command
        clrf   temp              ;byte address and counter

getbyte  movlw   0x04  ;get data
             movwf   pclath
        movf    temp,w
        call    pmsign

        call    write_d       ;write it to LCD

        incf    temp,f
        movlw   0x08       ;count 8
        xorwf   temp,w
        btfss   status,z
        goto    getbyte    ;loop

=========================

org 0x400

pmsign   addwf   pcl,f        ;redefine char 00 as +/-
        retlw   0x04
        retlw   0x04
        retlw   0x1f
        retlw   0x04
        retlw   0x04
        retlw   0x00
        retlw   0x1f
        retlw   0x00

The CG RAM can also be used as general purpose storage RAM
for the micro btw

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@084147 by Spehro Pefhany

picon face
At 02:02 AM 10/1/02 -0400, you wrote:
>First time using an LCD (Jameco/Ampire 2x16 unit), and just
>experimenting a bit for now.  If you're curious, datasheet
>is at: https://www.jameco.com/Jameco/Products/ProdDS/171715.pdf
>
>I'm controlling the LCD manually (for now) with 11 DIP switches.
>Sounds painful I know, but it's not that bad... if it works.
>Which it doesn't exactly.

You need to debounce the E input, which is pin 6 on the
typical HD44780-based module. You can use an RC circuit with
a Schmitt trigger inverter, for example. All the other inputs
can go directly to the switches as you have them, as they
are level sensitive rather than edge sensitive.

>Another Q... I guess CG stands for character generator, but
>why is there an operation to write to CG RAM?  What's the
>purpose of that?  Can I create my own fonts or something?

Do a google search for "LCD FAQ". All will be answered.

Best regards,

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

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@084519 by Wouter van Ooijen

face picon face
> > I'm controlling the LCD manually (for now) with 11 DIP switches.
>
> Bad idea.
>
> Mechanical switches will bounce so that one on or off
> transition looks like
> many to the LCD.  You could have the switches go into a PIC
> that debounces
> them, then drives the LCD.

Actually it is only the E line that requires de-bouncing. The classic
2-nand debounce circuit would do fine.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@084845 by Wagner Lipnharski

flavicon
face
Pic Dude wrote:
> First time using an LCD (Jameco/Ampire 2x16 unit), and just
> experimenting a bit for now.  If you're curious, datasheet
> is at: https://www.jameco.com/Jameco/Products/ProdDS/171715.pdf

[snip]

... needing any extra info (and extra
info is ALWAYS welcome), also related
how to generate your own chars, check
http://www.ustr.net/lcd001.shtml
the first part is related to the 8051,
after the middle page you will find
LCD learning stuff.

Want a tip? forget switches, go and
try programmign your uC and go fast
to a nice happy face.  :)

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Wagner Lipnharski - UST Research Inc
Orlando FLorida - USA - http://www.ustr.net
/_/_/_/ Atmel AVR Consultant /_/_/_/

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@091509 by ISO-8859-1?Q?Ruben_J=F6nsson?=

flavicon
face
{Quote hidden}

You have to use a debounced signal to the enable input. The LCD writes one character and advances to the next position with every high to low transition on the enable input. Since the input isn't debounced you get several high to low transitions for every toggle of the switch.

>
> Another Q... I guess CG stands for character generator, but
> why is there an operation to write to CG RAM?  What's the
> purpose of that?  Can I create my own fonts or something?

Character number 0-7 (mirrored in 8-15) are mapped to CGRAM (character generator RAM) instead of the internal ROM character table. One character needs 8 bytes in the CGRAM to represent it's image on the display. Character 0 uses address 0-7 in CGRAM, character 1 uses address 8-15 and so on. The First byte is the top row and only the five lowest bits in every byte are used.

This means that you can only show 8 different user defined characters on the display simultaneously.

You write to the CGRAM just as you write to the DDRAM, You just have to send the 'set CGRAM address' command to the display first. You do this once, then the LCD controller advances the address for every byte you write to it. When you are done, writing to the CGRAM you have to reset the address pointer to DDRAM with the 'set DDRAM address' command or 'Cursor home' or 'Clear display'.

Hope this helps,
Ruben

>
> Thanks,
> -Neil.
> ==============================
Ruben Jönsson
AB Liros Electronic
Box 9124, 200 39 Malmö, Sweden
TEL INT +46 40142078
FAX INT +46 40947388
.....rubenKILLspamspam@spam@pp.sbbs.se
==============================

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@094228 by Pic Dude

flavicon
face
> ... debounce 'E' ...

That explains a lot, as I was indeed missing something
fundamental about LCD's:  I was not aware that it would
jump to the next character, so I didn't debounce.
Just tried a tactile switch instead, and can get it to
set just one character at a time.

> ... why not PIC controlled instead of manual ...

This was just an experiment (incremental development to
it's extreme :-).  Forgot my PIC programmer back in Texas
but I just got a 7407 and will re-build the programmer for
the next phase of the LCD experiments.

Much thanks,
-Neil.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\01@140813 by Peter L. Peres

picon face
On Tue, 1 Oct 2002, Pic Dude wrote:

*>That's odd.  Anyone know why?  My guess is that I'm missing
*>something fundamental on the operation of LCD's, and the
*>datasheet is not exactly as well detailed as, say, a Microchip
*>datasheet.

Debounce the enable switch using a flipflop (a capacitor debouncer may
also work -- put a 0.01uF cap between E and GND).

*>Another Q... I guess CG stands for character generator, but
*>why is there an operation to write to CG RAM?  What's the
*>purpose of that?  Can I create my own fonts or something?

Yes, 8 characters.

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...