Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | LCD display Busy Flag

There are 12 messages in this thread.

You are currently looking at messages 0 to 10.

LCD display Busy Flag - Sagaert Johan - 12:58 29-12-06

Hi

Can i check the busy flag of the display while continously keeping the
Enable high or should i pulse the enable ?

Johan








Re: LCD display Busy Flag - Arlet - 06:03 30-12-06

Sagaert Johan wrote:

> Can i check the busy flag of the display while continously keeping the
> Enable high or should i pulse the enable ?
>
> Johan

Not a direct answer to your question, but I found it easier to just
ignore the busy flag, and use a timer to wait for the display. That way
you can have the CPU do something useful instead of wasting time
waiting for the display.

Using a timer also simplifies the code (no need to toggle I/O direction
bits), and you won't need the R/W signal, saving an I/O pin.


Re: LCD display Busy Flag - 04:17 31-12-06

Sagaert Johan wrote:

> Hi
>
> Can i check the busy flag of the display while continously keeping the
> Enable high or should i pulse the enable ?
>
> Johan

You need to strobe the enable. Someone else has mentioned that you dont
need to use it if you use a timer, this is fine for small displays (up
to 16 chars for a 2mS timer) or if you can accept a short delay in
updating. If you need a fast update on a larger display, say if you
were editing text or monitoring real time data, you need to reduce the
timer to 50uS and use the busy flag with a character buffer.


Re: LCD display Busy Flag - Arlet - 05:32 31-12-06

c...@aol.com wrote:
> Sagaert Johan wrote:
>
> > Hi
> >
> > Can i check the busy flag of the display while continously keeping the
> > Enable high or should i pulse the enable ?
> >
> > Johan
>
> You need to strobe the enable. Someone else has mentioned that you dont
> need to use it if you use a timer, this is fine for small displays (up
> to 16 chars for a 2mS timer) or if you can accept a short delay in
> updating. If you need a fast update on a larger display, say if you
> were editing text or monitoring real time data, you need to reduce the
> timer to 50uS and use the busy flag with a character buffer.

Strobing the enable isn't such a big deal anyway, if you intend to busy
wait. No need to optimize a delay loop :)

I agree that a timer based solution is best suited to smaller displays,
although with a suitably fast processor, bigger sized displays can be
handled fine. Right now, I'm working with a 4x20 character display.
Using a 2kHz timer interrupt, I get 25 screen updates/second, which is
plenty for the slow LCD. Interrupt overhead is about 2
usecs/character,resulting in 0.4% CPU utilization.


Re: LCD display Busy Flag - 06:56 31-12-06

Arlet wrote:

> c...@aol.com wrote:
> > Sagaert Johan wrote:
> >
> > > Hi
> > >
> > > Can i check the busy flag of the display while continously keeping the
> > > Enable high or should i pulse the enable ?
> > >
> > > Johan
> >
> > You need to strobe the enable. Someone else has mentioned that you dont
> > need to use it if you use a timer, this is fine for small displays (up
> > to 16 chars for a 2mS timer) or if you can accept a short delay in
> > updating. If you need a fast update on a larger display, say if you
> > were editing text or monitoring real time data, you need to reduce the
> > timer to 50uS and use the busy flag with a character buffer.
>
> Strobing the enable isn't such a big deal anyway, if you intend to busy
> wait. No need to optimize a delay loop :)
>
> I agree that a timer based solution is best suited to smaller displays,
> although with a suitably fast processor, bigger sized displays can be
> handled fine. Right now, I'm working with a 4x20 character display.
> Using a 2kHz timer interrupt, I get 25 screen updates/second, which is
> plenty for the slow LCD. Interrupt overhead is about 2
> usecs/character,resulting in 0.4% CPU utilization.

Why would you want to busy wait? If busy just exit, try again on next
timer interrupt. You should use the busy flag at 2kHz since some
intructions take 1.6mS. 25 screen updates is fine I have found that 10
per second is fine as well, its just noticable when editing or
scrolling through a menu.


Re: LCD display Busy Flag - Arlet - 11:35 31-12-06

c...@aol.com wrote:
> Arlet wrote:
>
> > c...@aol.com wrote:
> > > Sagaert Johan wrote:
> > >
> > > > Hi
> > > >
> > > > Can i check the busy flag of the display while continously keeping the
> > > > Enable high or should i pulse the enable ?
> > > >
> > > > Johan
> > >
> > > You need to strobe the enable. Someone else has mentioned that you dont
> > > need to use it if you use a timer, this is fine for small displays (up
> > > to 16 chars for a 2mS timer) or if you can accept a short delay in
> > > updating. If you need a fast update on a larger display, say if you
> > > were editing text or monitoring real time data, you need to reduce the
> > > timer to 50uS and use the busy flag with a character buffer.
> >
> > Strobing the enable isn't such a big deal anyway, if you intend to busy
> > wait. No need to optimize a delay loop :)
> >
> > I agree that a timer based solution is best suited to smaller displays,
> > although with a suitably fast processor, bigger sized displays can be
> > handled fine. Right now, I'm working with a 4x20 character display.
> > Using a 2kHz timer interrupt, I get 25 screen updates/second, which is
> > plenty for the slow LCD. Interrupt overhead is about 2
> > usecs/character,resulting in 0.4% CPU utilization.
>
> Why would you want to busy wait? If busy just exit, try again on next
> timer interrupt. You should use the busy flag at 2kHz since some
> intructions take 1.6mS. 25 screen updates is fine I have found that 10
> per second is fine as well, its just noticable when editing or
> scrolling through a menu.

I was talking about two different things. The busy wait solution is
apparently what the OP is trying to use, and in that case, it doesn't
really matter how optimized the wait loop is.

The module I'm using has a worst case time of 43 usecs for writing
character data, and 1.53 ms only for clear display/cursor home. I only
use the 'clear display' command once during initialization, with timer
disabled, and using fixed long delays. After the display has been
initialized, the timer is enabled, and only the fast commands are used.
The fast commands are all guaranteed to finish before the next timer
tick.

Using a timer also allows easy implementation of blinking text, by
temporarily replacing it by spaces after so many timer interrupts.


Re: LCD display Busy Flag - antedeluvian - 17:44 31-12-06

>
>Using a timer also simplifies the code (no need to toggle I/O direction
>bits), and you won't need the R/W signal, saving an I/O pin.
>
>
You guys have not hit any display freeze problems yet. Remember the
controller is a micro and can also go "nuts" for any of the reasons that
any micro can. If you treat this as a write only memory, you have
absolutley no indication whether your data is being written to the display
or not. Using the busy bit provides you with a little more confidence that
the system is working. If the display fails to go ready within a
pre-determined time period, you can try to reset the display through
software by re-initializing, and failing that (provided you have enough
foresight to include it in the hardware design), by cycling the power to
the display since it does not have a reset line.
-Aubrey



Re: LCD display Busy Flag - Arlet - 03:17 01-01-07

antedeluvian wrote:

> >Using a timer also simplifies the code (no need to toggle I/O direction
> >bits), and you won't need the R/W signal, saving an I/O pin.
> >
> >
> You guys have not hit any display freeze problems yet. Remember the
> controller is a micro and can also go "nuts" for any of the reasons that
> any micro can. If you treat this as a write only memory, you have
> absolutley no indication whether your data is being written to the display
> or not. Using the busy bit provides you with a little more confidence that
> the system is working. If the display fails to go ready within a
> pre-determined time period, you can try to reset the display through
> software by re-initializing, and failing that (provided you have enough
> foresight to include it in the hardware design), by cycling the power to
> the display since it does not have a reset line.

That's a good point. I haven't had problems yet, but some LCD display
hardware may be more vulnerable than others. The display I'm using for
my next project does have a real reset line, so I'll connect the R/W
line just in case. For maximum efficiency, the timer interrupt can
check the busy bit only every screen refresh, rather than for every
character.


Re: LCD display Busy Flag - sani_figs - 08:19 29-07-08

Hi,

I need to use a 4x20 lcd but it's my first time to use suce a device. Can
you suggest any online material that I can read so that I can implement the
LCD display on my project? I'm using a zilog mcu and I have enough pins for
all the pins of the lcd.
Thanks!

Re: LCD display Busy Flag - Jack - 08:36 29-07-08

"sani_figs" <a...@yahoo.com> wrote in
news:d...@giganews.com: 

> Hi,
> 
> I need to use a 4x20 lcd but it's my first time to use suce a device.
> Can you suggest any online material that I can read so that I can
> implement the LCD display on my project? I'm using a zilog mcu and I
> have enough pins for all the pins of the lcd.
> Thanks!
> 

You have to read the datasheet of the lcd controller.

Bye Jack
-- 
Eroi non si nasce, ti incastrano
- Jim Belushi

| 1 | 2 | next