--------------------------------------------
void delay_ms(unsigned int i)
{
unsigned char j;
unsigned char p;
for(j=0;j<i;j++)
for(p=0;p<933;p++)
} //example: delay_ms(50);
--------------------------------------------
void delay(void)
{
unsigned int k = 0;
unsigned int j = 0;
unsigned int g = 0;
for(j=0;j<12000;j++)
{
k = 5;
//k ^=5;
}
}
--------------------------------------------
void delay(void);
void delay(void)
{
unsigned int j = 0;
unsigned int g = 0;
for(j=0;j<5;j++)
{
for(g=0;g<60000;g++)
{
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
}
}
} |