stephansbest
Newbie level 4
- Joined
- Jan 28, 2014
- Messages
- 7
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- 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
and for the reciever pic:
ild be glad if you can help me with this :sad:
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: