Microcontroller › 8051 › Serial Communication › 2 answers without reading my
June 26, 2011 at 9:28 am
#6372
Participant
2 answers without reading my question properly. The link above shows a project in which the “receive()” function is called to receive a character in SBUF. Unless you make the following modification nothing will come in SBUF!
The function should be like below:-
//Function to receive serial data
void recieve(unsigned char value)
{
while(RI==0);
SBUF=value;
P1=SBUF;
RI=0;
}