I have connected PIC16F877a to PC using usb to rs232 cable , and i wanna view the output in Hyperterminal.
Pic16f877a
IDE Xc8
I think I am using wrong software
Pic16f877a
IDE Xc8
Code:
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;
}
}
}
I think I am using wrong software