junhao_wu
Newbie level 3
Hi guys! Newbie here need your help....
Can anyone explain to me how the below C code work for a 20us delay?
void delay_20us (void)
{
char count = 0x07;
loop:
if (-- count == 0)
{
return;}
else goto loop;
}
I mean how to i get count = 0x07?? what's the calculation?
I am using the CC5X complier and PIC16F873
Thanks Guys!
Can anyone explain to me how the below C code work for a 20us delay?
void delay_20us (void)
{
char count = 0x07;
loop:
if (-- count == 0)
{
return;}
else goto loop;
}
I mean how to i get count = 0x07?? what's the calculation?
I am using the CC5X complier and PIC16F873
Thanks Guys!