Searching \ for '[PIC]: Time needed to display on a 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/io/lcd/pic.htm?key=lcd
Search entire site for: 'Time needed to display on a LCD?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Time needed to display on a LCD?'
2001\05\13@161645 by David Queen

flavicon
face
I am just starting to lay out the basics of a project and I am not sure of how fast you can write to a LCD display.

I am going to use a 16F877 at 20mhz and a 4bit interface.
If things go as planed I hope to have an interrupt every 1/160 second.
That should give me about 31,000 instructions to get some work done.
The interrupt will set a byte and then return to the main loop. Each task will then have to finish in no more than 1/160 second.

I will need to be to write a 20 char line to the display whit in that time. Is it possible?

Also anyone see a major problem with this kind of loop tasking?
I am hope it works, it will let me break the project down into smaller parts to debug.

main loop         nop
                      if task =0 call0
                               ****
                      if task=15 call15
busywait          if task = same_as_last_Time goto busywait
                   
--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\13@165036 by BENEDICIC SAMO

flavicon
face
Hi!

Execution times for LCD are:

       clear display:          82microseconds - 1.64ms (you put  space char into each
display address)
       display&cursor home:    40micro - 1.64ms

First two commands have variable execution times. You should also wait 10-15
ms after power up for full initialisation sequence of LCD.

       character entry mode:   40micro
       display on/off & cursor:        40micro
       display/cursor shift:   40micro
       function set:           40micro
       set cgram address:      40micro
       set display address:    40micro
       write data:             40micro
       read data:              40micro
       read status:            1micro

You have 6,25ms time, so displaying 20 characters  shouldn't be any problem
even with fixed delays, but the fastest way would probably be by checking
LCD's busy flag. Regards, Samo

{Original Message removed}

2001\05\13@210326 by Drew Vassallo

picon face
>I am just starting to lay out the basics of a project and I am not sure of
>how fast you can write to a LCD display.
>
>I am going to use a 16F877 at 20mhz and a 4bit interface.

You should have no trouble writing to a display with the times that you
specified.  However, if you're really concerned about time, you should try
to use an 8-bit wide interface if possible.  Of course, I don't know how
many lines you have free, but you could always use a serial-parallel buffer
if you need more.

>If things go as planed I hope to have an interrupt every 1/160 second.

Typically we speak in terms of microseconds or milliseconds to make things a
little easier.  1/160 = 6.25 ms.  Personally, I don't really have a "feel"
for what "1/160 of a second" actually is.. but I do have a feel for how long
6.25 ms is :)

>I will need to be to write a 20 char line to the display whit in that time.
>Is it possible?

Should be no problem.  Even at 4MHz, a 4-bit wide interface should only take
~160us including cursor positioning.  So if you just use the default cursor
advance to write a 20 character stream, you should be able to do this in
approximately 160us + 19*75us = 1.6 ms.

Since you're talking 20MHz, it should be no concern whatsoever.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\05\14@090656 by Mark Newland

flavicon
face
This kind of "loop tasking" is done all the time.  Some call it a "time slicing" or "round robin" OS. Some could agrue
if this method is better or worse than other ways.  I personally use it myself for most things I do.  If not just for
the debugging aspect but for my own need to organize the program.  It is the way that I can keep track of things the
easiest.


David Queen wrote:

{Quote hidden}

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


2001\05\14@161248 by David VanHorn

flavicon
face
>
> > I will need to be to write a 20 char line to the display whit in that
> time. Is it possible?

Should be no problem at all.
I'm doing this in an 8 MHz AVR, exactly the same approach.
A routine that wants to write to the display, writes to the display buffer,
and sets the "dirty" bit.
On ISR (I use a 1mS int) I see the "dirty" bit set, so I blast the buffer
to the display, and clear the "dirty" bit.

> > Also anyone see a major problem with this kind of loop tasking?

Not from where I sit, just don't let tasks sit there and spin their wheels
waiting for things.
Check and go is the name of the game.

--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
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 2001 , 2002 only
- Today
- New search...