Microcontroller › 8051 › May anyone help me to interface rs232 with 8051 to recieve data from PC and to again send it to PC › void recieve() //Function to
May 11, 2011 at 2:36 pm
#6156
romel emperado
Participant
void recieve() //Function to receive serial data
{
unsigned char value;
while(RI==0);
SBUF=value;
P1=SBUF;
RI=0;
}
void transmit() // Funtion to transmit serial data
{
P2=P1-32;
SBUF=P2;
while(TI==0);
TI=0;
SBUF=P1;
while(TI==0);
TI=0;
}
actually the description of this project is not correct...
the authot must edit his post..
check the code above there is no fucntion to
convert small letters to capital its only receive and transmit function.
you can make your own function to do that..
study the ASCII equivalents.. here’s the example you want
A = 65 in ASCII
a = 97 in ASCII
actually you just need to add 32H to have the lowe case equivalent or vice versa..