Home/Support/Support Forum/Problem while communicating via SPI between a PIC microcontroller and Xbee
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Problem while communicating via SPI between a PIC microcontroller and Xbee

0 votes
Hello, i Have an XB3-24Z8PS-J that communicates with a pic24FJ64GA306 via spi using protocole ZigBee 3.0. My xbee is configured in API mode, with the XCTU application i disable all the UART pins and enable the SPI pins, the mesaage send from the pic respects the API format (generated using the tool in XCTU). With an oscilloscope i verify that ship select signal is zero, a serial clock is generated and the MOSI data is also generated when the pic issues a writting command. My problem that is the XBee does not send via RF the received data on its SPI pins : i didn’t receive anything on the coordinator serial screen ( I used another xbee as a coordinator to verify correctly that the data has been sent). I can’t find the problem, please advice ???
asked Jan 14 in Embedded Devices by joumana New to the Community (3 points)

Please log in or register to answer this question.

1 Answer

0 votes
Are you able to query any of the AT commands from the pic to the local xbee via the SPI port?
answered Jan 14 by mvut Veteran of the Digi Community (15,108 points)
no, it doesn't work. However i checked the output siganls of my PIC using an oscilloscope and i verified that the pic generates correctly the signalsof MOSI, CLK and chip select pins. My xbee is behaving like the spi is not at all activated.
The XBee SPI interface is a slave device. Your PIC needs to be a SPI master for it to work. You also need to send 0xFF's to read data from the SPI port.
the pic is the master. and during reading process i send 0xFF to be able to read. my problem is that when the pic writes on MOSI the data received on the spi pins of the xbee is not forwarded via RF (in the case of a transmit request) and i even try to send local AT commands via SPI to the Xbee but without any success. Apparently my xbee is not taking into consideration the spi pins, eventhough in its configuration i enable the spi pins and disbale the serial pins.
In this case, please send an email to Digi Technical Support at tech.support@digi.com