piclist 1997\09\16\151438a >
Thread: LCD "busy" signal
www.piclist.com/techref/lcds.htm?key=lcd
picon face BY : Martin R. Green email (remove spam text)



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
spamBeGoneelimar.....spambigfoot.com

----------
From:   Ed VanderPloeg[SMTP:TakeThisOuTevanderploegspamspamRemoveMECREO.COM]
Sent:   Tuesday, September 16, 1997 2:29 PM
To:     RemoveMEPICLISTTakeThisOuTspamEraseMEmitvma.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.
<01BCC2B2.DD1F1420@ifs-greenm.sybase.com>

See also: www.piclist.com/techref/lcds.htm?key=lcd
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) LCD "busy" signal

month overview.

new search...