void main()
{
TRISC6=0; //Configure RC6/TX Pin as Output
RC6=0;
unsigned char a;
unsigned char msg[]=" ELECTRONICS "; //To Send the Data Serial
TXSTA=0x24; //Set Transmit Enable Bit and High Speed Baudrate in Asynchronous Mode
SPBRG=0x81; //Load the Value of Baud Rate Generator Register
TXEN=1; //Set Transmit Enable Bit
SPEN=1; //Set Serial Port Enable Bit
while(1)
{
for(a=0;a<26;a++)
{
while(TXIF==0); //RC6 Connect to Rx Pin of Serial Port//
TXREG=msg[a];
RC7=TXREG;
}
}
}