thisiswasif
Newbie level 3
Delay, 11 micro seconds using a For loop?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
delay_us(11); //11 microsecond delay
void main()
{
int i;
TRISC = 0x00;
while(1){
RC0_bit=1;
for(i=0; i<11; i++)
delay_us(1);
RC0_bit=0;
for(i=0; i<11; i++)
delay_us(1);
}
}
void main()
{
int i;
TRISC = 0x00;
while(1){
RC0_bit=1;
delay_us(11);
RC0_bit=0;
delay_us(11);
}
}