You are here: Home
http://www.engineersgarage.com/microcontroller/8051projects/interface-serialport-RS232-AT89C51-circuit
In the above link, can anybody explain the following function:-
void recieve() //Function to receive serial data
{
unsigned char value;
while(RI==0);
SBUF=value;
P1=SBUF;
RI=0;
}
What will be the value of SBUF?
Actually I want to say how come the project described in the above link suppose to run properly without getting a value in SBUF?
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;
}
A bleeder resistor is a resistor placed in parallel with a high-voltage supply for the purposes of discharging the energy stored in the power source’s filter capacitors or other components that store electrical energy when the equipment is turned off.
It is a use for a standard resistor rather than a separate type of component.