beauty world
Newbie level 5
Hi friends.I see that in all of program with LCD In mplabx c8 compiler,3 function delay use.
[/CODE]
i have 2 questions:
1.why we use 3 function delay with each other?
2.and if every NOP()give 1 cycle delay why we use 14 NOP() for 18 cycle delay?
Code:
void DelayFor18TCY(void){
NOP(); NOP(); NOP(); NOP();
NOP(); NOP(); NOP(); NOP();
NOP(); NOP(); NOP(); NOP();
NOP(); NOP();
return;}
void DelayPORXLCD(void){ //15ms delay
Delay1KTCYx(30);
}
void DelayXLCD(void){ //5ms delay
__delay_ms(5);
}[CODE]
i have 2 questions:
1.why we use 3 function delay with each other?
2.and if every NOP()give 1 cycle delay why we use 14 NOP() for 18 cycle delay?