Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 23rd May 2008, 02:12 PM   (permalink)
Default Delay for LCD

Hi..
I need some help with few delays for LCD.
I am using PIC18F4620 running at 40MHz and am trying to use C18 xlcd library to control LCD.

Inside there I need to create 3 delay functions namely
void DelayFor18TCY(void);
void DelayPORXLCD(void);
void DelayXLCD(void);

For void DelayPORXLCD(void), i can use Delay10KTCYx(15) to generate a delay of 15ms.
And as for DelayXLCD(void); i can use Delay10KTCYx(5) to generate a delay of 5ms.

However, what is the duration of delay for DelayFor18TCY(void).

Please advise.. Thanks..

Last edited by MrNobody; 23rd May 2008 at 02:19 PM.
MrNobody is offline  
Reply With Quote
Old 23rd May 2008, 02:33 PM   (permalink)
Default

If you're doing 44780 LCDs you should have these must-read articles from EPE Magazine:
http://www.epemag.wimborne.co.uk/lcd1.pdf
http://www.epemag.wimborne.co.uk/lcd2.pdf

The information you need is in there.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now  
Reply With Quote
Old 23rd May 2008, 02:35 PM   (permalink)
Default

I read the C18 Compiler libraries and it wrote the DelayFor18TCY( void ) as

void DelayFor18TCY( void )
{
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
}

Any reason why it is 12 Nop()s..?
Thanks..
MrNobody is offline  
Reply With Quote
Old 23rd May 2008, 02:36 PM   (permalink)
Default

Thanks for the post futz.. Will read it..
MrNobody is offline  
Reply With Quote
Old 23rd May 2008, 03:52 PM   (permalink)
Default

Quote:
Originally Posted by MrNobody View Post
I read the C18 Compiler libraries and it wrote the DelayFor18TCY( void ) as

void DelayFor18TCY( void )
{
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
Nop();
}

Any reason why it is 12 Nop()s..?
Thanks..
Perhaps they're including cycles used for the call or rcall and return instructions?
Mike, K8LH is online now  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
help about delay wael_73 Electronic Projects Design/Ideas/Reviews 2 14th January 2008 10:53 PM
On delay DSGarcia General Electronics Chat 7 30th January 2007 07:58 PM
delay off ....... then on captnstoed General Electronics Chat 17 3rd January 2007 12:34 AM
Delay ckt tewills Electronic Projects Design/Ideas/Reviews 3 6th November 2003 07:54 PM
30 sec delay Mullemeck General Electronics Chat 4 28th August 2003 06:56 PM



All times are GMT. The time now is 01:44 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.