Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Xbee and PIC RS232 communication

Status
Not open for further replies.

thurmc

Newbie level 2
Joined
Mar 14, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
xbee pic

I am trying to set up a pic to send and receive commands using the Xbee RF transceiver. I am able to output commands from one PIC and I observe them on the receive pin of the Xbee on the other PIC. My problem is that the communication is not being registered by the remote PIC. We checked the receive pin of the RS-232 on the PIC and it looks like the signal is being input correctly and is 5V. Can anyone tell me what might be wrong? My code is below.

#if defined(__PCM__)
#include <16F877.h>
#device *=16,ADC=8
#fuses HS, NOWDT, NOLVP, NOBROWNOUT, NOPROTECT, PUT
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#endif


char reply;

void main() {
reply = '0';
output_bit(PIN_E1, 0);
while(1) {
output_b((byte)reply);
reply = fgetc();
if(reply != '0') {
output_bit(PIN_E1, 1);
}


}
}

We also tried using an if(kbhit()) so that the PIC does not hang while waiting for a character but this is not working either (no kbhit() is being registered). Thanks for your help.
 

pic xbee

Hi, did you try 3.3V instead of 5V , i think the XBee can receive 3.3V only , think i saw someone with the same problem with aurdiano , that solved it by reducing the V

Added after 1 minutes:

check
**broken link removed**
 

pic rs232

I am trying to set up a pic16f877 to send and receive commands using the Xbee RF transceiver,i used xbee series 2,at first i sent (atnd,atdb)from pic16f877 attached with coordenator to 3 end devic,
my application requierd to send these information to another local area network(xbee 2 also),if i use the same pic to send to the new area,the problem that this pic16f877 has only one UART(pin 25,26),if anyone can help me pliz or has any other sugestion to communicat between 2 local area network

Added after 15 minutes:

I am trying to set up a pic16f877 to send and receive commands using the Xbee RF transceiver,i used xbee series 2,at first i sent (atnd,atdb)from pic16f877 attached with coordenator to 3 end devic,
my application requierd to send these information to another local area network(xbee 2 also),if i use the same pic to send to the new area,the problem that this pic16f877 has only one UART(pin 25,26),if anyone can help me pliz or has any other sugestion to communicat between 2 local area network
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top