top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the meaning of while(!RCIF) in C?

+3 votes
195 views
What is the meaning of while(!RCIF) in C?
posted Jul 20, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+3 votes

RCIF is a bit which get set when there is a data in the Hardware Queue. See the following code

unsigned char getch ()
{
unsigned char c;

/* wait until character is received */
while (!RCIF);

c = RCREG;
return(c);
}

In the above code control will wait at the while (!RCIF); and once there is a character the RCIF bit would be true and condition will fail and control will reach the next line c = RCREG...

answer Jul 20, 2015 by Salil Agrawal
Similar Questions
+3 votes
#include <stdio.h>
int main()
{
    char vowels[5]={'a','e','i','o','u'};
    int x;

    printf("Vowel Letters");
    for(x=0;x<=5;x++)
    {
         printf("\n %C",vowels[x]);
    }
}

Output

Vowel Letters
a
e
i
o
u
♣
Process exited after 0.1132 seconds with return value 3

What is the meaning of return value 3

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...