aameer
Full Member level 4
- Joined
- May 12, 2010
- Messages
- 216
- Helped
- 33
- Reputation
- 64
- Reaction score
- 32
- Trophy points
- 1,308
- Location
- Bangalore
- Activity points
- 2,503
Hello friends,
I am trying to interface tarang RF module with AT89S52.
But i am facing a weird problem...
the 2 zigbee module are working fine on 2 hyper terminal windows.
i connect rs232 wire to micro controller it is also working fine
but when i connect 1 zigbee module to micro controller side and other to pc.
i am able to receive only from micro controller to PC but i cannot transmit data to micro controller.
when i type something in hyper terminal is sending junk value back to PC
I am confused where is the problem
Zigbee modules are working fine ,program is also fine
This is the code
I am trying to interface tarang RF module with AT89S52.
But i am facing a weird problem...
the 2 zigbee module are working fine on 2 hyper terminal windows.
i connect rs232 wire to micro controller it is also working fine
but when i connect 1 zigbee module to micro controller side and other to pc.
i am able to receive only from micro controller to PC but i cannot transmit data to micro controller.
when i type something in hyper terminal is sending junk value back to PC
I am confused where is the problem
Zigbee modules are working fine ,program is also fine
This is the code
Code:
#include<Reg52.h>
sbit led=P1^0;
unsigned char value;
void main() // main function
{
TMOD=0x20;
SCON=0x50;
TH1=0xfd;
TR1=1;
SBUF='A';
while(TI==0);
TI=0;
led=0;
while(1)
{
while(RI==0);
value=SBUF;
RI=0;
if(value=='A')
led=1;
else
led=0;
}