orxanb
Newbie level 3

Hi everyone
As it is apparent from the title, I have a communication problem between PC and the PIC. Xbees are definitely configured correctly because I tested them by connecting between two computers and sending data from one to another.
What I am basically trying to do is send a character from a computer terminal to PIC and eventually turn on a led in the circuit.
I am using polling to test whether data has arrived or not:
while(!kbhit())
{}
c = getc();
Actually the code inside the while loop is not empty, but it is just blinking a LED such that when the blinking goes off, I know that the PIC has received the data. But the thing is, it never stops even though I keep sending characters on and on.
If there is anything you can suggest, it is greatly appreciated.
Thanks.
P.S.: I attached the part of the code I am talking about from the whole
As it is apparent from the title, I have a communication problem between PC and the PIC. Xbees are definitely configured correctly because I tested them by connecting between two computers and sending data from one to another.
What I am basically trying to do is send a character from a computer terminal to PIC and eventually turn on a led in the circuit.
I am using polling to test whether data has arrived or not:
while(!kbhit())
{}
c = getc();
Actually the code inside the while loop is not empty, but it is just blinking a LED such that when the blinking goes off, I know that the PIC has received the data. But the thing is, it never stops even though I keep sending characters on and on.
If there is anything you can suggest, it is greatly appreciated.
Thanks.
P.S.: I attached the part of the code I am talking about from the whole
Attachments
Last edited: