Delay for LCD

Status
Not open for further replies.

MrNobody

New Member
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:
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..
 
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?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…