[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?

From: David Kelly
Subject: Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
Date: Tue, 20 Sep 2005 00:56:02 -0500

On Sep 19, 2005, at 11:38 PM, Vincent Trouilliez wrote:

Still don't know what's wrong with _delay_us(45), so replaced it with a
for(i=15;i;i--);  which does give exactly 45us and generates only 2
instructions, versus about 30 for _delay_us().... so I guess I will
stick with that, just need to remember to revisit the routine when I put
a 16MHz quartz instead of the on-chip 1MHz oscillator...

I prefer to read the busy flag in bit 7 of register 0 on the LCD rather than timed loops. Text LCDs are fairly predictable but I'm more comfortable delaying my next write until the particular LCD says its ready. Some LCD commands take longer than others (scrolling and clearing) and I fear a slightly different model or brand would take a different length of time.

Might take longer to change the DDR, poll, and restore than your calibrated delay loop.

I do a lot of clearing, scrolling, and cursor movement in my LCD app. Its CPU is slower than Vincent's. MC68HC711E9 at 8 MHz. E clock runs at 2 MHz and IIRC nothing takes less than 2 E clocks, most take 3 to 5. It was originally written in 1993, last updated in 1994. Would change the E9 to an AVR but for the hassle and expense of FCC and UL/ ETL certification. So it has to wait until I have a really major enhancement for the product.

Boy I thought my LCD was slow, but it's now lightening quick, I am truly

Should be able to write faster than the LCD bars can change polarity.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]