Hi guys,
Here's the situation: I've got 2 XBee modules, each one is connected to an HCS08 (the GT60A) via SCI.
I'm trying to implement a basic communication to exchange data from MCU1 to MCU2, like this:
MCU1 <--SCI--> XBee1 <<----------RF---------->> XBee2 <--SCI--> MCU2
So far I've been able to send commands from the MCUs to the Xbees, which reply "OK\r" through SCI when they receive the command.
I have configured the XBees with the parameters DL=0xFFFF and MY=0xFFFF, because I want to broadcast messages, using the transparent mode.
After leaving the Command mode (with the "ATCN" command), the Xbees go to Idle mode. My problem is that in this mode, everytime I will try to send data from the MCU to the SCI register, the MCU would reset and the XBee would never receive the data to transmit.
So my concern is: why can I send data through SCI when the XBee is in Command mode, but not when it is in Idle mode?
Thanks for your help,
Benoit
For example, here's what I'm doing:
void main() {
XBeeSetStateRequest(XBEE_CMD); //Enter command mode - OK
XBeeInit(); //Send all my commands to the XBee - OK
XBeeSetStateRequest(XBEE_IDLE); //Leave command mode - OK
//OK, the command mode works well, now let's try to send a simple character with my SCI function when I'm out of the command mode:
SCIStartTransmit_2('A'); //At executing this instruction the MCU will reset
}
I'm sure that the problem comes from the XBee, it must be configured wrong but I can't see what I missed...
Found the problem =)
The board I use has an alim of 5V, and a "regulation circuit" on the board gives me 3V for the SCI port. The problem is located in this "regulation circuit", because when I put an alim of 3V directly through the SCI port, it works perfectly.