I am new for xbee .I have two XB24-ACI-001 series1module. I want to transfer data which is read from infrared ,from one module to other wirelessly & display the data on hyperterminal of PC which is placed at remotely. Block diagram is as
My question is that-
- How can I configure xbee1 & xbee2 module without using x-ctu?
- Can I configure xbee2 module with controller?
- I get error msg as timeout period while downloading new firmware version. How can I get new version of x-ctu?
- is there any necessity to add Max232 at receiver side ? or can I directly connect xbee2 to com port.
Here I attched sample code which transmit data “hello world”
Is there is any requirement for TMOD & SCON reg. I set baudrate two times
As th1=0xfd & ATBD3 .
Pls ,help me .
void main(){
setUP:
UART_init(); // start timer
while(1){
TR1=1;
UART_prints(“X”);
msdelay(400); // delay of 1sec
UART_prints(“+++”);
msdelay(800); // wait for 2sec
if(returnedOK()=='T'){ // check the status of module
UART_prints("ATID1011,DH0,DL1,MY0,BD3,WR,CN");
UART_prints("Hello World!!!!");} // print data
else
goto setUP;
}
}
void UART_init(void){
PCON=0X80;
TMOD=0X20; //timer 1,mode 2
TH1=0XFD; // baud rate 9600
SCON=0X50; //1 start,1 stop,8 bit data
}
void UART_prints(uchar *string){
while (*string){
SBUF=*string++; //mov to SBUF
while(TI==0); // check for TI
TI=0; }
}
uchar returnedOK(void){
uchar incomingChar[3];
uchar okString[] = "OK";
uchar i,result;
while(RI==0){
for(i=0;i<3;i++){
incomingChar[i]=SBUF;
}
}
if(incomingChar[0]=='O'&& incomingChar[1]=='K'){
result='T';}
else
result='F';
return(result);
}