Searching \ for '[OT] LCD "busy" signal' 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 "busy" signal'.

Exact match. Not showing close matches.
PICList Thread
'[OT] LCD "busy" signal'
1997\09\16@144944 by Ed VanderPloeg

flavicon
face
I'm trying to use a PIC to drive a standard, run-of-the-mill, LCD display,
and am having trouble understanding the operation of the "busy flag".  The
model is an Optrex DMC-20481 (or something like that) with an
industry-standard Hitachi HD44780 controller.  Some important bits were
lost in the manual's translation from Japanese, so I'm left a little
confused.  After sending a command or data byte to the LCD I think you can
do 1 of 2 things before sending the next:

1. Wait a worst-case period of time before sending the next byte (not a
problem).
2. Read the "busy" flag before sending the next byte (problem).

For efficiency I'm trying to wait for the busy signal as described in the
databook but it's not working as expected.  Seems like the LCD is forever
busy.

First of all, this busy signal is intended for use as I've described above,
yes?  (or is it a busy signal for the 4-bit interface mode only?)  Next,
when reading a byte from the LCD the PIC is still in control of the
"enable" signal, correct? (i.e. it's not driven by the LCD).  Here's my
psuedo-code sequence for waiting for the LCD:

1. Set TRIS register for LCD connection to input, control lines output.
2. Set the "data/command" line to low to indicate a command
3. Set the "read/write" to high to indicate a read
4. Set "data ready" high, wait a NOP (16MHz clock) for the LCD to spit out
the byte
5. Read in the LCD data byte to W
6. Pull the "data ready" signal low again
7. AND W with 0x80 (busy flag is bit 7)
8. If zero, it's not busy and we can continue, otherwise wait and read busy
flag again.

But this seems to hang and think the LCD is forever busy.  Ideas?

-Ed V.

1997\09\16@151438 by Martin R. Green

picon face
Ed, I don't have the answer for you, but I bet you can find it here:

  http://www.paranoia.com/~filipg/HTML/LINK/F_Tech_LCD.html


CIAO - Martin R. Green
spam_OUTelimarTakeThisOuTspambigfoot.com

----------
From:   Ed VanderPloeg[SMTP:.....evanderploegKILLspamspam@spam@CREO.COM]
Sent:   Tuesday, September 16, 1997 2:29 PM
To:     PICLISTspamKILLspammitvma.mit.edu
Subject:        [OT] LCD "busy" signal

I'm trying to use a PIC to drive a standard, run-of-the-mill, LCD display,
and am having trouble understanding the operation of the "busy flag".  The
model is an Optrex DMC-20481 (or something like that) with an
industry-standard Hitachi HD44780 controller.  Some important bits were
lost in the manual's translation from Japanese, so I'm left a little
confused.  After sending a command or data byte to the LCD I think you can
do 1 of 2 things before sending the next:

1. Wait a worst-case period of time before sending the next byte (not a
problem).
2. Read the "busy" flag before sending the next byte (problem).

For efficiency I'm trying to wait for the busy signal as described in the
databook but it's not working as expected.  Seems like the LCD is forever
busy.

First of all, this busy signal is intended for use as I've described above,
yes?  (or is it a busy signal for the 4-bit interface mode only?)  Next,
when reading a byte from the LCD the PIC is still in control of the
"enable" signal, correct? (i.e. it's not driven by the LCD).  Here's my
psuedo-code sequence for waiting for the LCD:

1. Set TRIS register for LCD connection to input, control lines output.
2. Set the "data/command" line to low to indicate a command
3. Set the "read/write" to high to indicate a read
4. Set "data ready" high, wait a NOP (16MHz clock) for the LCD to spit out
the byte
5. Read in the LCD data byte to W
6. Pull the "data ready" signal low again
7. AND W with 0x80 (busy flag is bit 7)
8. If zero, it's not busy and we can continue, otherwise wait and read busy
flag again.

But this seems to hang and think the LCD is forever busy.  Ideas?

-Ed V.

1997\09\16@165606 by Andy Kunz

flavicon
face
At 03:05 PM 9/16/97 -0400, you wrote:

Better yet, check out http://www.hantronix.com

They have Optrex replacements as well as their own products, at prices
1/3-1/2 the Optrex equivalent.  Even small quantities are lower-priced
(about $12.00 for one 2x16).

I spec their stuff in all my designs.

Andy


>Ed, I don't have the answer for you, but I bet you can find it here:
>
>   http://www.paranoia.com/~filipg/HTML/LINK/F_Tech_LCD.html

==================================================================
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\09\16@170531 by Ed VanderPloeg

flavicon
face
Excellent site!  This led me to the following, which has PIC-specific
examples:

http://www.iaehv.nl/users/pouweha/lcd.htm

Thanks!

-Ed V.

At 12:22 PM 9/16/97 PST, you wrote:
{Quote hidden}

1997\09\16@173222 by STEENKAMP [M.ING E&E]

flavicon
picon face
Hi,

I'm currently working with a 2x16 display and I have opted to not read
the display and simply wait the maximum time (The application is not
time critical, so I save one IO). But just to check: You should not read
the busy flag between the two 4 bit operations, it is only valid after
the whole operation is completed.

I have the Hitachi LCD display modules data book here with me and it
sucks!!  The translation is deplorable plus its full of errors.  They
should really consider a better translator.

Niki

1997\09\17@024529 by Fowler, Gary

flavicon
face
part 0 759 bytes
Gary.

--------------------------------------------
Email: @spam@Gary.FowlerKILLspamspamdsto.defence.gov.au
Phone: +61 8 8259 5767  Fax: +61 8 8259 5672
Defence Science & Technology Organisation
PO Box 1500, Salisbury, South Australia 5108
--------------------------------------------



Date:    Tue, 16 Sep 1997 11:29:49 -0700
From:    Ed VanderPloeg <KILLspamevanderploegKILLspamspamCREO.COM>
Subject: [OT] LCD "busy" signal

I'm trying to use a PIC to drive a standard, run-of-the-mill, LCD  
display,
and am having trouble understanding the operation of the "busy flag".
 

        <snip>

For efficiency I'm trying to wait for the busy signal as described in the
databook but it's not working as expected.  Seems like the LCD is forever
busy.




1997\09\17@063852 by Alec Myers

flavicon
face
>I'm currently working with a 2x16 display and I have opted to not read
>the display and simply wait the maximum time (The application is not
>time critical, so I save one IO). But just to check: You should not read
>the busy flag between the two 4 bit operations, it is only valid after
>the whole operation is completed.


Surely you *have* to read the busy flag between the two 4-bit reads?
'Busy' is bit7 which appears after the first read. After the second,
you're looking at bits 0-3.

It works OK for me like this, anyway.



Alec

1997\09\17@195200 by anick

flavicon
face
Well I am using the Optrex 16117A 16x1 LCD.
I could not get it to work at all with the 4-bit mode described in the
data book. So I am using a 74HCT164E Serial Shift register to drive the
thing with ah 16C57 with only 7 I/O lines, I'm sure I could use less,
but I have not tried it. Anyway I connected one of the I/O line to the
ouput of the Bit-7 register for the "BUSY" flag from the LCD. I also
found that the software was much simpler this way. Of course I cannot
read any of the LCD data, but I dont need to for my application.

Alan Nickerson

1997\09\19@071652 by STEENKAMP [M.ING E&E]

flavicon
picon face
Hi,

> >I'm currently working with a 2x16 display and I have opted to not read
> >the display and simply wait the maximum time (The application is not
> >time critical, so I save one IO). But just to check: You should not read
> >the busy flag between the two 4 bit operations, it is only valid after
> >the whole operation is completed.
>
>
> Surely you *have* to read the busy flag between the two 4-bit reads?
> 'Busy' is bit7 which appears after the first read. After the second,
> you're looking at bits 0-3.
>
> It works OK for me like this, anyway.
>
I think you misunderstood me.  I meant that, when you write something to
the LCD, you can first check the busy flag (which requires 2 reads),
then write both nibbles to the LCD.  Don't try to check the busy flag
between the writing of the two nibbles.

Niki

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