Re: doubt on xbee
thanks for your reply. here i have uploaded my code.
*******************************************************************/
#class auto
#define COUTBUFSIZE 31
#define CINBUFSIZE 15
const long baud_rate = 9600L;
main()
{
auto char send_buffer[128];
auto int received, i;
serCopen(baud_rate);
printf("Starting...\n");
strcpy(send_buffer,"A");
while (1)
{
costate
{
for(i = 0; i < 8;i++) //here i dont know why i am using this 'for' loop
{
waitfordone
{
cof_serCputs(send_buffer);// here i am writting my data to serial
} //buffer
}
}
costate
{
//receive characters in a leisurely fashion
waitfordone
{
received = cof_serCgetc();//here i am geeting data from
} //PIC16f877a
putchar(received); //just printing wat i've received
}
}
}
when i run this program i am receiving _ this only. if i transmit any other charactr i am receiving some other different special charactr , on the Hyperterminal of the system which is conneced with my PIC. i dont know why its happening. i am trying to explain my all doubts. pls adjust if i have any wrong.
what should i do more than this