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.

xbees not communicating.

Status
Not open for further replies.

stephansbest

Newbie level 4
Newbie level 4
Joined
Jan 28, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
53
hi all,

As part of my project i require that two pic microcontrollers communicate wirelessly using xbees.
My code is in pic basic pro,but the xebess dont seem to be communicating at all.
Below is the code i am using:
for the transmitter pic

Code:
INCLUDE "modedefs.BAS"
DEFINE HSER_TXSTA 24h
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
TRISC=   %10000000
LED1 VAR PORTc.0
char var byte
LOW LED1
high portC.0
HSerout ["1",13,10]
HIGH LED1
Pause 1000

and for the reciever pic:
Code:
INCLUDE "modedefs.BAS"
DEFINE HSER_TXSTA 24h
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
TRISC=%10000000
LED1 VAR PORTB.0
char var byte
LOW LED1
HSerin [char]
if char == "1" Then
HIGH LED1
Pause 2000
ENDIF

ild be glad if you can help me with this :sad:
 
Last edited by a moderator:

hi
i am using pic16f876a for the receiver side and pic 16f877a for the transmitter side, also i am using a 4mhz ceramic resonator,
Thanks
 

I wrote a code using 2 x PIC16F877A. Change one PIC to PIC6F876A. PBP code and Proteus 8.1 file inside attached file. Simulate and see. The LED2 @ RB1 of Transreceiver #2 blinks whenever a "1" is received from Transreceiver #1.

103339d1395178591-proteus-schemaic.png
 

Attachments

  • PBP.rar
    125.9 KB · Views: 45
  • Proteus Schemaic.png
    Proteus Schemaic.png
    64.9 KB · Views: 68
  • PBP.rar
    95 KB · Views: 44
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top