Bijesh Kawan
Newbie level 5

hey friends
I have got and problem with the 4 Mhz oscillator with pic16f877a.I have programmed a code using mplab for sending string to labview and when i check the output value from the PuTTY software I got and output as in picture i attached instead of getting string.But in proteus simulation it gives and exact string written in code.
Please help me to figure out the problem.
Thanks in advance

I have got and problem with the 4 Mhz oscillator with pic16f877a.I have programmed a code using mplab for sending string to labview and when i check the output value from the PuTTY software I got and output as in picture i attached instead of getting string.But in proteus simulation it gives and exact string written in code.
Please help me to figure out the problem.
Thanks in advance

Code:
#include<pic.h>
void main()
{
TRISD=0x00;
TXSTA=0b00100100; //configure serial port
RCSTA=0b10010000; //configure serial port
SPBRG=25;
while(1)
{
for(int i=0;i<10;i++)
{
TXREG='F';
delay(100);
TXREG='2';
delay(100);
TXREG='0';
delay(100);
TXREG='2';
delay(100);
TXREG='1';
delay(100);
TXREG='2';
delay(100);
TXREG='0';
delay(100);
TXREG='0';
delay(100);
TXREG='0';
delay(100);
TXREG='4';
delay(100);
TXREG='5';
delay(100);
TXREG='0';
delay(100);
TXREG='0';
delay(100);
TXREG='5';
delay(100);
TXREG='2';
delay(100);
TXREG='5';
delay(100);
TXREG='0';
delay(100);
TXREG='0';
delay(1000);
}
}
}